3 Copyright (C) 2000 Free Software Foundation, Inc.
5 This file is part of GNU Binutils.
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2 of the License, or
10 (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
21 /* This file specifies the format of gmon.out files. It should have
22 as few external dependencies as possible as it is going to be
23 included in many different programs. That is, minimize the
26 A gmon.out file consists of a header (defined by gmon_hdr) followed
27 by a sequence of records. Each record starts with a one-byte tag
28 identifying the type of records, followed by records specific data. */
32 #define GMON_MAGIC "gmon" /* magic cookie */
33 #define GMON_VERSION 1 /* version number */
35 /* Raw header as it appears on file (without padding). */
43 /* Types of records in this file. */
46 GMON_TAG_TIME_HIST
= 0, GMON_TAG_CG_ARC
= 1, GMON_TAG_BB_COUNT
= 2
52 char low_pc
[sizeof (char*)]; /* Base pc address of sample buffer. */
53 char high_pc
[sizeof (char*)]; /* Max pc address of sampled buffer. */
54 char hist_size
[4]; /* Size of sample buffer. */
55 char prof_rate
[4]; /* Profiling clock rate. */
56 char dimen
[15]; /* Phys. dim., usually "seconds". */
57 char dimen_abbrev
; /* Usually 's' for "seconds". */
60 struct gmon_cg_arc_record
62 char from_pc
[sizeof (char*)]; /* Address within caller's body. */
63 char self_pc
[sizeof (char*)]; /* Address within callee's body. */
64 char count
[4]; /* Number of arc traversals. */
67 #endif /* gmon_out_h */