|
Packit |
6c4009 |
/* Copyright (C) 1996-2018 Free Software Foundation, Inc.
|
|
Packit |
6c4009 |
This file is part of the GNU C Library.
|
|
Packit |
6c4009 |
Contributed by David Mosberger <davidm@cs.arizona.edu>.
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
The GNU C Library is free software; you can redistribute it and/or
|
|
Packit |
6c4009 |
modify it under the terms of the GNU Lesser General Public
|
|
Packit |
6c4009 |
License as published by the Free Software Foundation; either
|
|
Packit |
6c4009 |
version 2.1 of the License, or (at your option) any later version.
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
The GNU C Library is distributed in the hope that it will be useful,
|
|
Packit |
6c4009 |
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit |
6c4009 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
Packit |
6c4009 |
Lesser General Public License for more details.
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
You should have received a copy of the GNU Lesser General Public
|
|
Packit |
6c4009 |
License along with the GNU C Library; if not, see
|
|
Packit |
6c4009 |
<http://www.gnu.org/licenses/>. */
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
/* This file specifies the format of gmon.out files. It should have
|
|
Packit |
6c4009 |
as few external dependencies as possible as it is going to be included
|
|
Packit |
6c4009 |
in many different programs. That is, minimize the number of #include's.
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
A gmon.out file consists of a header (defined by gmon_hdr) followed by
|
|
Packit |
6c4009 |
a sequence of records. Each record starts with a one-byte tag
|
|
Packit |
6c4009 |
identifying the type of records, followed by records specific data. */
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
#ifndef _SYS_GMON_OUT_H
|
|
Packit |
6c4009 |
#define _SYS_GMON_OUT_H 1
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
#include <features.h>
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
#define GMON_MAGIC "gmon" /* magic cookie */
|
|
Packit |
6c4009 |
#define GMON_VERSION 1 /* version number */
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
/* For profiling shared object we need a new format. */
|
|
Packit |
6c4009 |
#define GMON_SHOBJ_VERSION 0x1ffff
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
__BEGIN_DECLS
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
/*
|
|
Packit |
6c4009 |
* Raw header as it appears on file (without padding). This header
|
|
Packit |
6c4009 |
* always comes first in gmon.out and is then followed by a series
|
|
Packit |
6c4009 |
* records defined below.
|
|
Packit |
6c4009 |
*/
|
|
Packit |
6c4009 |
struct gmon_hdr
|
|
Packit |
6c4009 |
{
|
|
Packit |
6c4009 |
char cookie[4];
|
|
Packit |
6c4009 |
char version[4];
|
|
Packit |
6c4009 |
char spare[3 * 4];
|
|
Packit |
6c4009 |
};
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
/* types of records in this file: */
|
|
Packit |
6c4009 |
typedef enum
|
|
Packit |
6c4009 |
{
|
|
Packit |
6c4009 |
GMON_TAG_TIME_HIST = 0,
|
|
Packit |
6c4009 |
GMON_TAG_CG_ARC = 1,
|
|
Packit |
6c4009 |
GMON_TAG_BB_COUNT = 2
|
|
Packit |
6c4009 |
} GMON_Record_Tag;
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
struct gmon_hist_hdr
|
|
Packit |
6c4009 |
{
|
|
Packit |
6c4009 |
char low_pc[sizeof (char *)]; /* base pc address of sample buffer */
|
|
Packit |
6c4009 |
char high_pc[sizeof (char *)]; /* max pc address of sampled buffer */
|
|
Packit |
6c4009 |
char hist_size[4]; /* size of sample buffer */
|
|
Packit |
6c4009 |
char prof_rate[4]; /* profiling clock rate */
|
|
Packit |
6c4009 |
char dimen[15]; /* phys. dim., usually "seconds" */
|
|
Packit |
6c4009 |
char dimen_abbrev; /* usually 's' for "seconds" */
|
|
Packit |
6c4009 |
};
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
struct gmon_cg_arc_record
|
|
Packit |
6c4009 |
{
|
|
Packit |
6c4009 |
char from_pc[sizeof (char *)]; /* address within caller's body */
|
|
Packit |
6c4009 |
char self_pc[sizeof (char *)]; /* address within callee's body */
|
|
Packit |
6c4009 |
char count[4]; /* number of arc traversals */
|
|
Packit |
6c4009 |
};
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
__END_DECLS
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
#endif /* sys/gmon_out.h */
|