update from main archive 961001
[glibc.git] / gmon / sys / gmon_out.h
blobef5b191f3d029e57ee876e281d7d483be3a8303e
1 /* Copyright (C) 1996 Free Software Foundation, Inc.
2 Contributed by David Mosberger (davidm@cs.arizona.edu).
4 This file is part of the GNU C Library.
6 The GNU C Library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Library General Public License as
8 published by the Free Software Foundation; either version 2 of the
9 License, or (at your option) any later version.
11 The GNU C Library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Library General Public License for more details.
16 You should have received a copy of the GNU Library General Public
17 License along with the GNU C Library; see the file COPYING.LIB. If
18 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
19 Cambridge, MA 02139, 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 included
23 in many different programs. That is, minimize the number of #include's.
25 A gmon.out file consists of a header (defined by gmon_hdr) followed by
26 a sequence of records. Each record starts with a one-byte tag
27 identifying the type of records, followed by records specific data. */
29 #ifndef _SYS_GMON_OUT_H_
30 #define _SYS_GMON_OUT_H_
32 #define GMON_MAGIC "gmon" /* magic cookie */
33 #define GMON_VERSION 1 /* version number */
36 * Raw header as it appears on file (without padding). This header
37 * always comes first in gmon.out and is then followed by a series
38 * records defined below.
40 struct gmon_hdr {
41 char cookie[4];
42 int version;
43 int spare[3];
46 /* types of records in this file: */
47 typedef enum {
48 GMON_TAG_TIME_HIST = 0, GMON_TAG_CG_ARC = 1, GMON_TAG_BB_COUNT = 2
49 } GMON_Record_Tag;
51 struct gmon_hist_hdr {
52 unsigned long low_pc; /* base pc address of sample buffer */
53 unsigned long high_pc; /* max pc address of sampled buffer */
54 int hist_size; /* size of sample buffer */
55 int prof_rate; /* 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 {
61 unsigned long from_pc; /* address within caller's body */
62 unsigned long self_pc; /* address within callee's body */
63 int count; /* number of arc traversals */
66 #endif /* !_SYS_GMON_OUT_H_ */