* bfdlink.h (struct bfd_link_info): Change type of base_file to
[deliverable/binutils-gdb.git] / gprof / gprof.h
CommitLineData
3d6c6501
SEF
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 *
12516a37 19 * @(#)gprof.h 5.9 (Berkeley) 6/1/90
3d6c6501 20 */
5489fcc3
KR
21#ifndef gprof_h
22#define gprof_h
3d6c6501 23
8739c727 24#include <ansidecl.h>
9d651373 25#include "sysdep.h"
5489fcc3
KR
26
27#ifndef MIN
12516a37 28#define MIN(a,b) ((a) < (b) ? (a) : (b))
5489fcc3
KR
29#endif
30#ifndef MAX
12516a37 31#define MAX(a,b) ((a) > (b) ? (a) : (b))
5489fcc3 32#endif
3d6c6501 33
7508b715
ILT
34/* AIX defines hz as a macro. */
35#undef hz
36
5489fcc3 37#ifdef MACHINE_H
12516a37 38#include MACHINE_H
3d6c6501 39#else
12516a37
KR
40#if vax
41#include "vax.h"
42#endif
43#if sun
44#include "sun.h"
45#endif
46#if tahoe
47#include "tahoe.h"
48#endif
5489fcc3
KR
49#endif
50
51#ifndef FOPEN_RB
12516a37 52#define FOPEN_RB "r"
5489fcc3
KR
53#endif
54#ifndef FOPEN_WB
12516a37 55#define FOPEN_WB "w"
3d6c6501
SEF
56#endif
57
5489fcc3 58#ifndef PATH_MAX
12516a37 59#define PATH_MAX 1024
5489fcc3 60#endif
3d6c6501 61
12516a37 62#define A_OUTNAME "a.out" /* default core filename */
5489fcc3
KR
63#define GMONNAME "gmon.out" /* default profile filename */
64#define GMONSUM "gmon.sum" /* profile summary filename */
3d6c6501 65
5489fcc3
KR
66/*
67 * These may already be defined on some systems. We could probably
68 * just use the BFD versions of these, since BFD has already dealt
69 * with this problem.
70 */
d20d64bb 71#undef FALSE
3d6c6501 72#define FALSE 0
d20d64bb 73#undef TRUE
3d6c6501
SEF
74#define TRUE 1
75
5489fcc3
KR
76#define STYLE_FLAT_PROFILE (1<<0)
77#define STYLE_CALL_GRAPH (1<<1)
78#define STYLE_SUMMARY_FILE (1<<2)
79#define STYLE_EXEC_COUNTS (1<<3)
80#define STYLE_ANNOTATED_SOURCE (1<<4)
81#define STYLE_GMON_INFO (1<<5)
82
12516a37
KR
83#define ANYDEBUG (1<<0) /* 1 */
84#define DFNDEBUG (1<<1) /* 2 */
85#define CYCLEDEBUG (1<<2) /* 4 */
86#define ARCDEBUG (1<<3) /* 8 */
87#define TALLYDEBUG (1<<4) /* 16 */
88#define TIMEDEBUG (1<<5) /* 32 */
89#define SAMPLEDEBUG (1<<6) /* 64 */
90#define AOUTDEBUG (1<<7) /* 128 */
91#define CALLDEBUG (1<<8) /* 256 */
92#define LOOKUPDEBUG (1<<9) /* 512 */
93#define PROPDEBUG (1<<10) /* 1024 */
94#define BBDEBUG (1<<11) /* 2048 */
95#define IDDEBUG (1<<12) /* 4096 */
96#define SRCDEBUG (1<<13) /* 8192 */
5489fcc3
KR
97
98#ifdef DEBUG
12516a37 99#define DBG(l,s) if (debug_level & (l)) {s;}
5489fcc3 100#else
12516a37 101#define DBG(l,s)
5489fcc3 102#endif
3d6c6501 103
12516a37
KR
104typedef enum
105 {
5489fcc3 106 FF_AUTO = 0, FF_MAGIC, FF_BSD, FF_PROF
12516a37
KR
107 }
108File_Format;
3d6c6501 109
5489fcc3 110typedef int bool;
12516a37 111typedef unsigned char UNIT[2]; /* unit of profiling */
3d6c6501 112
12516a37
KR
113extern const char *whoami; /* command-name, for error messages */
114extern const char *a_out_name; /* core filename */
115extern long hz; /* ticks per second */
3d6c6501 116
3d6c6501 117/*
5489fcc3
KR
118 * Command-line options:
119 */
12516a37 120extern int debug_level; /* debug level */
5489fcc3 121extern int output_style;
12516a37
KR
122extern int output_width; /* controls column width in index */
123extern bool bsd_style_output; /* as opposed to FSF style output */
5489fcc3
KR
124extern bool discard_underscores; /* discard leading underscores? */
125extern bool ignore_direct_calls; /* don't count direct calls */
126extern bool ignore_static_funcs; /* suppress static functions */
12516a37
KR
127extern bool ignore_zeros; /* ignore unused symbols/files */
128extern bool line_granularity; /* function or line granularity? */
129extern bool print_descriptions; /* output profile description */
130extern bool print_path; /* print path or just filename? */
131extern File_Format file_format; /* requested file format */
5489fcc3 132
12516a37 133extern bool first_output; /* no output so far? */
5489fcc3 134
12516a37 135extern void done PARAMS ((int status));
5489fcc3
KR
136
137#endif /* gprof_h */
This page took 0.132292 seconds and 4 git commands to generate.