*BSD News Article 56612


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!news.mel.connect.com.au!munnari.OZ.AU!news.hawaii.edu!ames!olivea!wetware!nntp-hub.barrnet.net!inet-nntp-gw-1.us.oracle.com!news.caldera.com!park.uvsc.edu!usenet
From: Terry Lambert <terry@lambert.org>
Newsgroups: comp.unix.bsd.misc
Subject: Re: Timing analysis with the prof utility
Date: 12 Dec 1995 05:23:34 GMT
Organization: Utah Valley State College, Orem, Utah
Lines: 32
Message-ID: <4aj3km$g98@park.uvsc.edu>
References: <4ai3m2$dfg@cnn.MOTOWN.GE.COM>
NNTP-Posting-Host: hecate.artisoft.com

jyun@motown.ge.com (James K. Yun) wrote:
]
] Can anyone tell me how accurate the prof timing numbers are?  For a given function,
] can I assume that the corresponding prof execution number accurately represents the
] function's actual execution time or is the number simply a rough estimate?

Prof produces statistical profiling information based on where the
program counter was when a clock tick went.

I actually have some non-statistical (block) profiling using
entry/exit logging and P5 time stamping (or the 486 also works,
but the system clock access is a high fraction of the time for
some routines).  I think my employer may want to sell it, though,
so I can't post it.

The statistical profiling accuracy is a function of the profiling
clock and the stastical liklihood of it being in a particular
routine based on the instruction timing of the routine.

Personally, I'm profiling file system code and kernel services
with a resoloution of 1-4uS (depending on hardware).

There are documents in the source tree where the gprof program
is located that explain theory of operation, etc.  You will
probably want to look at them if you are very serious at all.


                                        Terry Lambert
                                        terry@cs.weber.edu
---
Any opinions in this posting are my own and not those of my present
or previous employers.