projects
/
unix-history
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fixed a bug in multi-subscript calculation
[unix-history]
/
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
5aac2c5
..
87b8407
100644
(file)
--- a/
usr/src/usr.bin/gprof/gprof.c
+++ b/
usr/src/usr.bin/gprof/gprof.c
@@
-1,5
+1,5
@@
#ifndef lint
#ifndef lint
- static char *sccsid = "@(#)gprof.c 1.1
7
(Berkeley) %G%";
+ static char *sccsid = "@(#)gprof.c 1.1
9
(Berkeley) %G%";
#endif lint
#include "gprof.h"
#endif lint
#include "gprof.h"
@@
-93,6
+93,10
@@
main(argc, argv)
eflag = TRUE;
addlist( elist , *sp );
}
eflag = TRUE;
addlist( elist , *sp );
}
+ /*
+ * how long is a clock tick?
+ */
+ hz = hertz();
/*
* get information about a.out file.
*/
/*
* get information about a.out file.
*/
@@
-472,7
+476,7
@@
asgnsamples()
/* read samples and assign to namelist symbols */
scale = highpc - lowpc;
scale /= nsamples;
/* 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;
ccnt = samples[i];
if (ccnt == 0)
continue;