X-Git-Url: https://git.subgeniuskitty.com/unix-history/.git/blobdiff_plain/16051da53b6cb716b11931e1547949ef1a5c82a4..77002fe106c8c541f942bf42dcc1c061a0a614ae:/usr/src/usr.bin/gprof/gprof.c diff --git a/usr/src/usr.bin/gprof/gprof.c b/usr/src/usr.bin/gprof/gprof.c index 5aac2c573e..87b84079f7 100644 --- a/usr/src/usr.bin/gprof/gprof.c +++ b/usr/src/usr.bin/gprof/gprof.c @@ -1,5 +1,5 @@ #ifndef lint - static char *sccsid = "@(#)gprof.c 1.17 (Berkeley) %G%"; + static char *sccsid = "@(#)gprof.c 1.19 (Berkeley) %G%"; #endif lint #include "gprof.h" @@ -93,6 +93,10 @@ main(argc, argv) eflag = TRUE; addlist( elist , *sp ); } + /* + * how long is a clock tick? + */ + hz = hertz(); /* * get information about a.out file. */ @@ -472,7 +476,7 @@ asgnsamples() /* read samples and assign to namelist symbols */ scale = highpc - lowpc; scale /= nsamples; - for (i = 0, j = 0; i < nsamples; i++) { + for (i = 0, j = 1; i < nsamples; i++) { ccnt = samples[i]; if (ccnt == 0) continue;