]>
Commit | Line | Data |
---|---|---|
5489fcc3 KR |
1 | /* |
2 | * This file specifies the format of gmon.out files. It should have | |
3 | * as few external dependencies as possible as it is going to be | |
4 | * included in many different programs. That is, minimize the | |
5 | * number of #include's. | |
6 | * | |
7 | * A gmon.out file consists of a header (defined by gmon_hdr) followed | |
8 | * by a sequence of records. Each record starts with a one-byte tag | |
9 | * identifying the type of records, followed by records specific data. | |
10 | */ | |
11 | #ifndef gmon_out_h | |
12 | #define gmon_out_h | |
13 | ||
14 | #define GMON_MAGIC "gmon" /* magic cookie */ | |
15 | #define GMON_VERSION 1 /* version number */ | |
16 | ||
17 | /* | |
18 | * Raw header as it appears on file (without padding): | |
19 | */ | |
12516a37 KR |
20 | struct gmon_hdr |
21 | { | |
22 | char cookie[4]; | |
23 | char version[4]; | |
24 | char spare[3 * 4]; | |
25 | }; | |
5489fcc3 KR |
26 | |
27 | /* types of records in this file: */ | |
12516a37 KR |
28 | typedef enum |
29 | { | |
03c35bcb | 30 | GMON_TAG_TIME_HIST = 0, GMON_TAG_CG_ARC = 1, GMON_TAG_BB_COUNT = 2 |
12516a37 KR |
31 | } |
32 | GMON_Record_Tag; | |
5489fcc3 | 33 | |
12516a37 KR |
34 | struct gmon_hist_hdr |
35 | { | |
03c35bcb KR |
36 | char low_pc[sizeof (char*)]; /* base pc address of sample buffer */ |
37 | char high_pc[sizeof (char*)]; /* max pc address of sampled buffer */ | |
38 | char hist_size[4]; /* size of sample buffer */ | |
39 | char prof_rate[4]; /* profiling clock rate */ | |
40 | char dimen[15]; /* phys. dim., usually "seconds" */ | |
41 | char dimen_abbrev; /* usually 's' for "seconds" */ | |
12516a37 | 42 | }; |
5489fcc3 | 43 | |
12516a37 KR |
44 | struct gmon_cg_arc_record |
45 | { | |
03c35bcb KR |
46 | char from_pc[sizeof (char*)]; /* address within caller's body */ |
47 | char self_pc[sizeof (char*)]; /* address within callee's body */ | |
48 | char count[4]; /* number of arc traversals */ | |
12516a37 | 49 | }; |
5489fcc3 KR |
50 | |
51 | #endif /* gmon_out_h */ |