Re: profilers

"William A. Barath" <wi534@victoria.tc.ca>
7 Dec 1997 22:02:35 -0500

          From comp.compilers

Related articles
profilers Waverly@DigitSW.com (Waverly Edwards) (1997-12-05)
Re: profilers wi534@victoria.tc.ca (William A. Barath) (1997-12-07)
Re: profilers fjh@mundook.cs.mu.OZ.AU (1997-12-10)
Re: profilers bwm@bwmartin.demon.co.uk (Barry Martin) (1997-12-10)
Re: profilers adewitt@cs.cmu.edu (Tony DeWitt) (1997-12-10)
Re: profilers debray@CS.Arizona.EDU (1997-12-12)
Re: profilers cfc@world.std.com (Chris F Clark) (1997-12-12)
Re: profilers wi534@victoria.tc.canada (William A. Barath) (1997-12-12)
| List of all articles for this month |
From: "William A. Barath" <wi534@victoria.tc.ca>
Newsgroups: comp.compilers
Date: 7 Dec 1997 22:02:35 -0500
Organization: Victoria Freenet Association
References: 97-12-017
Keywords: performance

On 5 Dec 1997, Waverly Edwards wrote:


|Can anyone tell me where to find resources for making an execution profiler.
|Books, Websites, source code and just about anything else is welcome.


The most efficient way I can imagine to do it is this: compile into
each function a small code fragment at the entry and exit points which
read a global variable containing the seed of a high-resolution timer
and add the difference between the two reads to a table entry for that
function. Easy, little overhead, little bloat, and accurate even if
the timer is only good for milliseconds (due to the averaging effect
of repeated updates.) I've never done it, but it seems quite
reasonable.


Wil Barath, aka WseM : "I feel as though I see my pen to write"
Author of VPM, EDITPLN, and other VGA Planets support programs
Visit my homepage! -------------> http://victoria.tc.ca/~wi534
[That's what Unix C compilers do with the -p flag. -John]






--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.