prof at 60 Hz, profil at 100 Hz
essick at uiucdcsb.UUCP
essick at uiucdcsb.UUCP
Wed Dec 19 15:45:00 AEST 1984
Description:
/usr/bin/prof still lives in the days of 60 Hz. Meanwhile,
profil(2) generates data at 100 Hz. Thus prof reports numbers
that are about 1.6 times as large as they should be.
Repeat-By:
pick some program, compile it with profiling, and execute:
time testit
prof testit
Look at the difference between the numbers reported by "time" and
by "prof".
Fix:
2a3
> static char rcsid[] ="$Header: prof.c,v 4.3.1.2 84/12/05 23:32:37 root Exp $";
12a14
> #define HERTZ 100 /* RBE -- 4.2 uses 100 not 60 */
171c173
< printf("%6.1f%9.2f", 100*time, actime/60);
---
> printf("%6.1f%9.2f", 100*time, actime/HERTZ);
174c176
< np->ncall, np->time/(np->ncall*.06));
---
> np->ncall, ((float) np->time*1000)/(np->ncall*HERTZ));
-- Ray Essick, University of Illinois
-- {ihnp4,pur-ee,convex}!uiucdcs!essick essick%uiuc at csnet-relay
More information about the Comp.bugs.4bsd.ucb-fixes
mailing list