Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: Notesfiles $Revision: 1.6.2.17 $; site uiucdcsb.UUCP
Path: utzoo!watmath!clyde!burl!ulysses!mhuxj!mhuxn!houxm!ihnp4!inuxc!pur-ee!uiucdcsb!essick
From: essick@uiucdcsb.UUCP
Newsgroups: net.bugs.4bsd
Subject: prof at 60 Hz, profil at 100 Hz
Message-ID: <6300013@uiucdcsb.UUCP>
Date: Wed, 19-Dec-84 00:45:00 EST
Article-I.D.: uiucdcsb.6300013
Posted: Wed Dec 19 00:45:00 1984
Date-Received: Fri, 7-Dec-84 01:46:11 EST
Lines: 33
Nf-ID: #N:uiucdcsb:6300013:000:858
Nf-From: uiucdcsb!essick    Dec  5 23:45:00 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@csnet-relay