2 * Copyright (c) 1983 Regents of the University of California.
5 * Redistribution and use in source and binary forms are permitted
6 * provided that: (1) source distributions retain this entire copyright
7 * notice and comment, and (2) distributions including binaries display
8 * the following acknowledgement: ``This product includes software
9 * developed by the University of California, Berkeley and its contributors''
10 * in the documentation or other materials provided with the distribution
11 * and in all advertising materials mentioning features or use of this
12 * software. Neither the name of the University nor the names of its
13 * contributors may be used to endorse or promote products derived
14 * from this software without specific prior written permission.
15 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
16 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
17 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
19 * @(#)gprof.h 5.9 (Berkeley) 6/1/90
26 /* Include the BFD sysdep.h file. */
29 /* Undefine the BFD PACKAGE and VERSION macros before including the
30 gprof config.h file. */
37 #define MIN(a,b) ((a) < (b) ? (a) : (b))
40 #define MAX(a,b) ((a) > (b) ? (a) : (b))
43 /* AIX defines hz as a macro. */
50 #define A_OUTNAME "a.out" /* default core filename */
51 #define GMONNAME "gmon.out" /* default profile filename */
52 #define GMONSUM "gmon.sum" /* profile summary filename */
56 #define _(String) gettext (String)
58 #define N_(String) gettext_noop (String)
60 #define N_(String) (String)
63 /* Stubs that do something close enough. */
64 #define textdomain(String) (String)
65 #define gettext(String) (String)
66 #define dgettext(Domain,Message) (Message)
67 #define dcgettext(Domain,Message,Type) (Message)
68 #define bindtextdomain(Domain,Directory) (Domain)
69 #define _(String) (String)
70 #define N_(String) (String)
71 /* In this case we don't care about the value. */
78 * These may already be defined on some systems. We could probably
79 * just use the BFD versions of these, since BFD has already dealt
87 #define STYLE_FLAT_PROFILE (1<<0)
88 #define STYLE_CALL_GRAPH (1<<1)
89 #define STYLE_SUMMARY_FILE (1<<2)
90 #define STYLE_EXEC_COUNTS (1<<3)
91 #define STYLE_ANNOTATED_SOURCE (1<<4)
92 #define STYLE_GMON_INFO (1<<5)
93 #define STYLE_FUNCTION_ORDER (1<<6)
94 #define STYLE_FILE_ORDER (1<<7)
96 #define ANYDEBUG (1<<0) /* 1 */
97 #define DFNDEBUG (1<<1) /* 2 */
98 #define CYCLEDEBUG (1<<2) /* 4 */
99 #define ARCDEBUG (1<<3) /* 8 */
100 #define TALLYDEBUG (1<<4) /* 16 */
101 #define TIMEDEBUG (1<<5) /* 32 */
102 #define SAMPLEDEBUG (1<<6) /* 64 */
103 #define AOUTDEBUG (1<<7) /* 128 */
104 #define CALLDEBUG (1<<8) /* 256 */
105 #define LOOKUPDEBUG (1<<9) /* 512 */
106 #define PROPDEBUG (1<<10) /* 1024 */
107 #define BBDEBUG (1<<11) /* 2048 */
108 #define IDDEBUG (1<<12) /* 4096 */
109 #define SRCDEBUG (1<<13) /* 8192 */
112 #define DBG(l,s) if (debug_level & (l)) {s;}
119 FF_AUTO = 0, FF_MAGIC, FF_BSD, FF_PROF
124 typedef unsigned char UNIT[2]; /* unit of profiling */
126 extern const char *whoami; /* command-name, for error messages */
127 extern const char *function_mapping_file; /* file mapping functions to files */
128 extern const char *a_out_name; /* core filename */
129 extern long hz; /* ticks per second */
132 * Command-line options:
134 extern int debug_level; /* debug level */
135 extern int output_style;
136 extern int output_width; /* controls column width in index */
137 extern bool bsd_style_output; /* as opposed to FSF style output */
138 extern bool demangle; /* demangle symbol names? */
139 extern bool discard_underscores; /* discard leading underscores? */
140 extern bool ignore_direct_calls; /* don't count direct calls */
141 extern bool ignore_static_funcs; /* suppress static functions */
142 extern bool ignore_zeros; /* ignore unused symbols/files */
143 extern bool line_granularity; /* function or line granularity? */
144 extern bool print_descriptions; /* output profile description */
145 extern bool print_path; /* print path or just filename? */
146 extern bool ignore_non_functions;/* Ignore non-function symbols. */
148 extern File_Format file_format; /* requested file format */
150 extern bool first_output; /* no output so far? */
152 extern void done PARAMS ((int status));