* emultempl/ppc64elf.em (new_vers_pattern): Warning fix.
[deliverable/binutils-gdb.git] / gprof / gprof.h
CommitLineData
252b5132
RH
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
252b5132
RH
24/* Include the BFD sysdep.h file. */
25#include "sysdep.h"
6d9c411a 26#include "bfd.h"
252b5132
RH
27
28/* Undefine the BFD PACKAGE and VERSION macros before including the
29 gprof config.h file. */
30#undef PACKAGE
31#undef VERSION
252b5132
RH
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
63999bc7 49#define A_OUTNAME "a.out" /* default core filename */
252b5132
RH
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
f067e7fb
NC
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
c20f4f8c 63#include "bin-bugs.h"
252b5132 64
252b5132
RH
65#define STYLE_FLAT_PROFILE (1<<0)
66#define STYLE_CALL_GRAPH (1<<1)
67#define STYLE_SUMMARY_FILE (1<<2)
68#define STYLE_EXEC_COUNTS (1<<3)
69#define STYLE_ANNOTATED_SOURCE (1<<4)
70#define STYLE_GMON_INFO (1<<5)
71#define STYLE_FUNCTION_ORDER (1<<6)
72#define STYLE_FILE_ORDER (1<<7)
73
74#define ANYDEBUG (1<<0) /* 1 */
75#define DFNDEBUG (1<<1) /* 2 */
76#define CYCLEDEBUG (1<<2) /* 4 */
77#define ARCDEBUG (1<<3) /* 8 */
78#define TALLYDEBUG (1<<4) /* 16 */
79#define TIMEDEBUG (1<<5) /* 32 */
80#define SAMPLEDEBUG (1<<6) /* 64 */
81#define AOUTDEBUG (1<<7) /* 128 */
82#define CALLDEBUG (1<<8) /* 256 */
83#define LOOKUPDEBUG (1<<9) /* 512 */
84#define PROPDEBUG (1<<10) /* 1024 */
85#define BBDEBUG (1<<11) /* 2048 */
86#define IDDEBUG (1<<12) /* 4096 */
87#define SRCDEBUG (1<<13) /* 8192 */
88
89#ifdef DEBUG
90#define DBG(l,s) if (debug_level & (l)) {s;}
91#else
92#define DBG(l,s)
93#endif
94
95typedef enum
96 {
97 FF_AUTO = 0, FF_MAGIC, FF_BSD, FF_BSD44, FF_PROF
98 }
99File_Format;
100
252b5132
RH
101typedef unsigned char UNIT[2]; /* unit of profiling */
102
103extern const char *whoami; /* command-name, for error messages */
104extern const char *function_mapping_file; /* file mapping functions to files */
105extern const char *a_out_name; /* core filename */
106extern long hz; /* ticks per second */
107
108/*
109 * Command-line options:
110 */
bde52789 111extern int debug_level; /* debug level */
252b5132 112extern int output_style;
bde52789
AM
113extern int output_width; /* controls column width in index */
114extern boolean bsd_style_output; /* as opposed to FSF style output */
115extern boolean demangle; /* demangle symbol names? */
116extern boolean discard_underscores; /* discard leading underscores? */
117extern boolean ignore_direct_calls; /* don't count direct calls */
118extern boolean ignore_static_funcs; /* suppress static functions */
119extern boolean ignore_zeros; /* ignore unused symbols/files */
120extern boolean line_granularity; /* function or line granularity? */
121extern boolean print_descriptions; /* output profile description */
122extern boolean print_path; /* print path or just filename? */
123extern boolean ignore_non_functions; /* Ignore non-function symbols. */
124
125extern File_Format file_format; /* requested file format */
126
127extern boolean first_output; /* no output so far? */
252b5132 128
1355568a 129extern void done PARAMS ((int status)) ATTRIBUTE_NORETURN;
252b5132
RH
130
131#endif /* gprof_h */
This page took 0.119578 seconds and 4 git commands to generate.