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