summaryrefslogtreecommitdiffstats
path: root/usr.bin/gprof/gprof.h
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>2002-03-06 11:25:58 +0000
committerbde <bde@FreeBSD.org>2002-03-06 11:25:58 +0000
commitacab62a802a890955c63730629ae1635151daef9 (patch)
tree1d204f3d5dc13a81eedf846e24d6eb5de1966db8 /usr.bin/gprof/gprof.h
parent7d6942219698b48fdb39fb2d4a402b775e9f96bf (diff)
downloadFreeBSD-src-acab62a802a890955c63730629ae1635151daef9.zip
FreeBSD-src-acab62a802a890955c63730629ae1635151daef9.tar.gz
Support runtime specification of the history counter type by whatever
generated the gmon data. The support is currently limited to what is easy to implement and/or needed: signedess: signed or insigned size: 8, 16, 32 or 64 bits format: a binary integer in gprof's format (gprof is not a cross-tool). High-resolution kernel profiling uses signed 64-bit counters. Normal kernel profiling and user profiling use unsigned 16-bit counters but should use 32-bit ones.
Diffstat (limited to 'usr.bin/gprof/gprof.h')
-rw-r--r--usr.bin/gprof/gprof.h15
1 files changed, 6 insertions, 9 deletions
diff --git a/usr.bin/gprof/gprof.h b/usr.bin/gprof/gprof.h
index c37c00e..e17e085 100644
--- a/usr.bin/gprof/gprof.h
+++ b/usr.bin/gprof/gprof.h
@@ -89,11 +89,8 @@ typedef int bool;
*/
long hz;
-#ifdef GPROF4
-typedef int64_t UNIT;
-#else
-typedef u_short UNIT; /* unit of profiling */
-#endif
+size_t histcounter_size;
+int histcounter_type;
char *a_outname;
#define A_OUTNAME "a.out"
@@ -207,8 +204,8 @@ int ncycle; /* number of cycles discovered */
* Backward compatible old style header
*/
struct ophdr {
- UNIT *lpc;
- UNIT *hpc;
+ u_short *lpc;
+ u_short *hpc;
int ncnt;
};
@@ -218,11 +215,11 @@ int debug;
* Each discretized pc sample has
* a count of the number of samples in its range
*/
-UNIT *samples;
+double *samples;
unsigned long s_lowpc; /* lowpc from the profile file */
unsigned long s_highpc; /* highpc from the profile file */
-unsigned long lowpc, highpc; /* range profiled, in UNIT's */
+unsigned long lowpc, highpc; /* range profiled, in historical units */
unsigned sampbytes; /* number of bytes of samples */
int nsamples; /* number of samples */
double actime; /* accumulated time thus far for putprofline */
OpenPOWER on IntegriCloud