Re: Instrumenting code for profiling.

glen herrmannsfeldt <gah@ugcs.caltech.edu>
17 Nov 2004 11:31:05 -0500

          From comp.compilers

Related articles
Instrumenting code for profiling. par_ianth@yahoo.com (2004-11-14)
Re: Instrumenting code for profiling. gah@ugcs.caltech.edu (glen herrmannsfeldt) (2004-11-17)
Re: Instrumenting code for profiling. s.bosscher@student.tudelft.nl (2004-11-17)
Re: Instrumenting code for profiling. nmm1@cus.cam.ac.uk (2004-11-19)
Re: Instrumenting code for profiling. diablovision@yahoo.com (2004-11-20)
Re: Instrumenting code for profiling. idbaxter@semdesigns.com (Ira Baxter) (2004-11-20)
Re: Instrumenting code for profiling. tmk@netvision.net.il (2004-11-20)
Re: Instrumenting code for profiling. nmm1@cus.cam.ac.uk (2004-11-26)
| List of all articles for this month |
From: glen herrmannsfeldt <gah@ugcs.caltech.edu>
Newsgroups: comp.compilers
Date: 17 Nov 2004 11:31:05 -0500
Organization: Comcast Online
References: 04-11-043
Keywords: debug, performance
Posted-Date: 17 Nov 2004 11:31:05 EST

PK wrote:


> I had a question regarding how compilers do instrumentation to
> collect profile information. Specifically, how do compilers handle the
> part of mapping the collected profile back to the original program
> (which is without the instrumentation).


Not long after I started learning Fortran (a long time ago by now), I
found a program called FETE. Actually, it was a cataloged procedure
on an IBM system, which would run the FETE program and then the
Fortran compiler.


FETE would read in a Fortran 66 program and then write out a new
Fortran program that would count the number of times each statement
was executed. For logical IF statements, it would separately count
the number of times the condition was true. At the end it would then
print out the source program with execution counts, approximate times,
and number of times an IF was true. The normal compiler source output
was turned off, so the only source listing you saw was that generated
by the executing program.


Not so long ago I tried to trace down FETE, but it seems that
it doesn't exist anymore.


Presumably a similar system could be done for other languages.


-- glen


Post a followup to this message

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