]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - gprof/gprof.h
Move bug report string to one place.
[thirdparty/binutils-gdb.git] / gprof / gprof.h
1 /*
2 * Copyright (c) 1983 Regents of the University of California.
3 * All rights reserved.
4 *
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.
18 *
19 * @(#)gprof.h 5.9 (Berkeley) 6/1/90
20 */
21 #ifndef gprof_h
22 #define gprof_h
23
24 #include <ansidecl.h>
25
26 /* Include the BFD sysdep.h file. */
27 #include "sysdep.h"
28
29 /* Undefine the BFD PACKAGE and VERSION macros before including the
30 gprof config.h file. */
31 #undef PACKAGE
32 #undef VERSION
33 /* Also undefine BFD's `_' macro; we have our own definition. */
34 #undef _
35
36 #include "gconfig.h"
37
38 #ifndef MIN
39 #define MIN(a,b) ((a) < (b) ? (a) : (b))
40 #endif
41 #ifndef MAX
42 #define MAX(a,b) ((a) > (b) ? (a) : (b))
43 #endif
44
45 /* AIX defines hz as a macro. */
46 #undef hz
47
48 #ifndef PATH_MAX
49 #define PATH_MAX 1024
50 #endif
51
52 #define A_OUTNAME "a.out" /* default core filename */
53 #define GMONNAME "gmon.out" /* default profile filename */
54 #define GMONSUM "gmon.sum" /* profile summary filename */
55
56 #ifdef HAVE_LOCALE_H
57 # include <locale.h>
58 #endif
59
60 #ifdef ENABLE_NLS
61 # include <libintl.h>
62 # define _(String) gettext (String)
63 # ifdef gettext_noop
64 # define N_(String) gettext_noop (String)
65 # else
66 # define N_(String) (String)
67 # endif
68 #else
69 /* Stubs that do something close enough. */
70 # define textdomain(String) (String)
71 # define gettext(String) (String)
72 # define dgettext(Domain,Message) (Message)
73 # define dcgettext(Domain,Message,Type) (Message)
74 # define bindtextdomain(Domain,Directory) (Domain)
75 # define _(String) (String)
76 # define N_(String) (String)
77 #endif
78
79 #include "bin-bugs.h"
80
81 /*
82 * These may already be defined on some systems. We could probably
83 * just use the BFD versions of these, since BFD has already dealt
84 * with this problem.
85 */
86 #undef FALSE
87 #define FALSE 0
88 #undef TRUE
89 #define TRUE 1
90
91 #define STYLE_FLAT_PROFILE (1<<0)
92 #define STYLE_CALL_GRAPH (1<<1)
93 #define STYLE_SUMMARY_FILE (1<<2)
94 #define STYLE_EXEC_COUNTS (1<<3)
95 #define STYLE_ANNOTATED_SOURCE (1<<4)
96 #define STYLE_GMON_INFO (1<<5)
97 #define STYLE_FUNCTION_ORDER (1<<6)
98 #define STYLE_FILE_ORDER (1<<7)
99
100 #define ANYDEBUG (1<<0) /* 1 */
101 #define DFNDEBUG (1<<1) /* 2 */
102 #define CYCLEDEBUG (1<<2) /* 4 */
103 #define ARCDEBUG (1<<3) /* 8 */
104 #define TALLYDEBUG (1<<4) /* 16 */
105 #define TIMEDEBUG (1<<5) /* 32 */
106 #define SAMPLEDEBUG (1<<6) /* 64 */
107 #define AOUTDEBUG (1<<7) /* 128 */
108 #define CALLDEBUG (1<<8) /* 256 */
109 #define LOOKUPDEBUG (1<<9) /* 512 */
110 #define PROPDEBUG (1<<10) /* 1024 */
111 #define BBDEBUG (1<<11) /* 2048 */
112 #define IDDEBUG (1<<12) /* 4096 */
113 #define SRCDEBUG (1<<13) /* 8192 */
114
115 #ifdef DEBUG
116 #define DBG(l,s) if (debug_level & (l)) {s;}
117 #else
118 #define DBG(l,s)
119 #endif
120
121 typedef enum
122 {
123 FF_AUTO = 0, FF_MAGIC, FF_BSD, FF_BSD44, FF_PROF
124 }
125 File_Format;
126
127 typedef int bool;
128 typedef unsigned char UNIT[2]; /* unit of profiling */
129
130 extern const char *whoami; /* command-name, for error messages */
131 extern const char *function_mapping_file; /* file mapping functions to files */
132 extern const char *a_out_name; /* core filename */
133 extern long hz; /* ticks per second */
134
135 /*
136 * Command-line options:
137 */
138 extern int debug_level; /* debug level */
139 extern int output_style;
140 extern int output_width; /* controls column width in index */
141 extern bool bsd_style_output; /* as opposed to FSF style output */
142 extern bool demangle; /* demangle symbol names? */
143 extern bool discard_underscores; /* discard leading underscores? */
144 extern bool ignore_direct_calls; /* don't count direct calls */
145 extern bool ignore_static_funcs; /* suppress static functions */
146 extern bool ignore_zeros; /* ignore unused symbols/files */
147 extern bool line_granularity; /* function or line granularity? */
148 extern bool print_descriptions; /* output profile description */
149 extern bool print_path; /* print path or just filename? */
150 extern bool ignore_non_functions;/* Ignore non-function symbols. */
151
152 extern File_Format file_format; /* requested file format */
153
154 extern bool first_output; /* no output so far? */
155
156 extern void done PARAMS ((int status));
157
158 #endif /* gprof_h */