From: roland Date: Tue, 19 Mar 1996 20:08:48 +0000 (+0000) Subject: Sun Feb 25 22:36:10 1996 David Mosberger-Tang X-Git-Tag: libc-960320~30 X-Git-Url: http://git.csclub.uwaterloo.ca/?p=kopensolaris-gnu%2Fglibc.git;a=commitdiff_plain;h=3c710ee102c1a31c369ec95cf2d011c2a4df8064 Sun Feb 25 22:36:10 1996 David Mosberger-Tang * gmon/gmon.c (__bb_head): new variable. (write_hist, write_call_graph, write_bb_counts): new functions. (_mcleanup): modified to call above functions instead of directly writing out gmon.out. * gmon/sys/gmon.h (struct __bb): New type. (struct gmonhdr): Type removed. (struct gmonparam): New member `log_hashfraction'. (GMONVERSION): Macro removed. --- diff --git a/gmon/sys/gmon.h b/gmon/sys/gmon.h index f7af72b98a..8cbd6bdeda 100644 --- a/gmon/sys/gmon.h +++ b/gmon/sys/gmon.h @@ -39,17 +39,23 @@ #include /* - * Structure prepended to gmon.out profiling data file. + * See gmon_out.h for gmon.out format. */ -struct gmonhdr { - u_long lpc; /* base pc address of sample buffer */ - u_long hpc; /* max pc address of sampled buffer */ - int ncnt; /* size of sample buffer (plus this header) */ - int version; /* version number */ - int profrate; /* profiling clock rate */ - int spare[3]; /* reserved */ + +/* structure emitted by "gcc -a". This must match struct bb in + gcc/libgcc2.c. It is OK for gcc to declare a longer structure as + long as the members below are present. */ +struct __bb +{ + long zero_word; + const char *filename; + long *counts; + long ncounts; + struct __bb *next; + const unsigned long *addresses; }; -#define GMONVERSION 0x00051879 + +extern struct __bb *__bb_head; /* * histogram counters are unsigned shorts (according to the kernel). @@ -137,6 +143,7 @@ struct gmonparam { u_long highpc; u_long textsize; u_long hashfraction; + long log_hashfraction; }; extern struct gmonparam _gmonparam;