xref: /netbsd-src/external/gpl3/binutils.old/dist/gprof/gmon_out.h (revision e992f068c547fd6e84b3f104dc2340adcc955732)
175fd0b74Schristos /* gmon_out.h
275fd0b74Schristos 
3*e992f068Schristos    Copyright (C) 2000-2022 Free Software Foundation, Inc.
475fd0b74Schristos 
575fd0b74Schristos    This file is part of GNU Binutils.
675fd0b74Schristos 
775fd0b74Schristos    This program is free software; you can redistribute it and/or modify
875fd0b74Schristos    it under the terms of the GNU General Public License as published by
975fd0b74Schristos    the Free Software Foundation; either version 3 of the License, or
1075fd0b74Schristos    (at your option) any later version.
1175fd0b74Schristos 
1275fd0b74Schristos    This program is distributed in the hope that it will be useful,
1375fd0b74Schristos    but WITHOUT ANY WARRANTY; without even the implied warranty of
1475fd0b74Schristos    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1575fd0b74Schristos    GNU General Public License for more details.
1675fd0b74Schristos 
1775fd0b74Schristos    You should have received a copy of the GNU General Public License
1875fd0b74Schristos    along with this program; if not, write to the Free Software
1975fd0b74Schristos    Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
2075fd0b74Schristos    MA 02110-1301, USA.  */
2175fd0b74Schristos 
2275fd0b74Schristos /* A gmon.out file consists of a header (defined by gmon_hdr) followed
2375fd0b74Schristos    by a sequence of records.  Each record starts with a one-byte tag
2475fd0b74Schristos    identifying the type of records, followed by records specific data.  */
2575fd0b74Schristos #ifndef gmon_out_h
2675fd0b74Schristos #define gmon_out_h
2775fd0b74Schristos 
2875fd0b74Schristos #define	GMON_MAGIC	"gmon"	/* magic cookie */
2975fd0b74Schristos #define GMON_VERSION	1	/* version number */
3075fd0b74Schristos 
3175fd0b74Schristos /* Raw header as it appears on file (without padding).  */
3275fd0b74Schristos struct gmon_hdr
3375fd0b74Schristos   {
3475fd0b74Schristos     char cookie[4];
3575fd0b74Schristos     char version[4];
3675fd0b74Schristos     char spare[3 * 4];
3775fd0b74Schristos   };
3875fd0b74Schristos 
3975fd0b74Schristos /* Types of records in this file.  */
4075fd0b74Schristos typedef enum
4175fd0b74Schristos   {
4275fd0b74Schristos     GMON_TAG_TIME_HIST = 0, GMON_TAG_CG_ARC = 1, GMON_TAG_BB_COUNT = 2
4375fd0b74Schristos   }
4475fd0b74Schristos GMON_Record_Tag;
4575fd0b74Schristos 
4675fd0b74Schristos #endif /* gmon_out_h */
47