]>
Commit | Line | Data |
---|---|---|
5ae9d168 | 1 | /* Copyright (C) 1996, 1997 Free Software Foundation, Inc. |
54d79e99 UD |
2 | This file is part of the GNU C Library. |
3 | Contributed by David Mosberger <davidm@cs.arizona.edu>. | |
b20e47cb | 4 | |
54d79e99 UD |
5 | The GNU C Library is free software; you can redistribute it and/or |
6 | modify it under the terms of the GNU Library General Public License as | |
7 | published by the Free Software Foundation; either version 2 of the | |
8 | License, or (at your option) any later version. | |
b20e47cb | 9 | |
54d79e99 UD |
10 | The GNU C Library is distributed in the hope that it will be useful, |
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
13 | Library General Public License for more details. | |
b20e47cb | 14 | |
54d79e99 UD |
15 | You should have received a copy of the GNU Library General Public |
16 | License along with the GNU C Library; see the file COPYING.LIB. If not, | |
17 | write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, | |
18 | Boston, MA 02111-1307, USA. */ | |
b20e47cb RM |
19 | |
20 | /* This file specifies the format of gmon.out files. It should have | |
54d79e99 UD |
21 | as few external dependencies as possible as it is going to be included |
22 | in many different programs. That is, minimize the number of #include's. | |
b20e47cb | 23 | |
54d79e99 UD |
24 | A gmon.out file consists of a header (defined by gmon_hdr) followed by |
25 | a sequence of records. Each record starts with a one-byte tag | |
26 | identifying the type of records, followed by records specific data. */ | |
b20e47cb | 27 | |
8a4b65b4 UD |
28 | #ifndef _SYS_GMON_OUT_H |
29 | ||
30 | #define _SYS_GMON_OUT_H 1 | |
31 | #include <features.h> | |
b20e47cb RM |
32 | |
33 | #define GMON_MAGIC "gmon" /* magic cookie */ | |
34 | #define GMON_VERSION 1 /* version number */ | |
35 | ||
8a4b65b4 UD |
36 | __BEGIN_DECLS |
37 | ||
b20e47cb RM |
38 | /* |
39 | * Raw header as it appears on file (without padding). This header | |
40 | * always comes first in gmon.out and is then followed by a series | |
41 | * records defined below. | |
42 | */ | |
5ae9d168 UD |
43 | struct gmon_hdr |
44 | { | |
45 | char cookie[4]; | |
46 | char version[4]; | |
47 | char spare[3 * 4]; | |
48 | }; | |
b20e47cb RM |
49 | |
50 | /* types of records in this file: */ | |
5ae9d168 UD |
51 | typedef enum |
52 | { | |
53 | GMON_TAG_TIME_HIST = 0, | |
54 | GMON_TAG_CG_ARC = 1, | |
55 | GMON_TAG_BB_COUNT = 2 | |
56 | } GMON_Record_Tag; | |
b20e47cb | 57 | |
5ae9d168 UD |
58 | struct gmon_hist_hdr |
59 | { | |
60 | char low_pc[sizeof (char *)]; /* base pc address of sample buffer */ | |
61 | char high_pc[sizeof (char *)]; /* max pc address of sampled buffer */ | |
62 | char hist_size[4]; /* size of sample buffer */ | |
63 | char prof_rate[4]; /* profiling clock rate */ | |
64 | char dimen[15]; /* phys. dim., usually "seconds" */ | |
65 | char dimen_abbrev; /* usually 's' for "seconds" */ | |
66 | }; | |
b20e47cb | 67 | |
5ae9d168 UD |
68 | struct gmon_cg_arc_record |
69 | { | |
70 | char from_pc[sizeof (char *)]; /* address within caller's body */ | |
71 | char self_pc[sizeof (char *)]; /* address within callee's body */ | |
72 | char count[4]; /* number of arc traversals */ | |
b20e47cb RM |
73 | }; |
74 | ||
8a4b65b4 UD |
75 | __END_DECLS |
76 | ||
77 | #endif /* _SYS_GMON_OUT_H */ |