Efficient Execution Time Profiling ?

thomasf+@cs.cmu.edu (Thomas Fahringer)
Wed, 29 Apr 1992 11:18:02 GMT

          From comp.compilers

Related articles
Efficient Execution Time Profiling ? thomasf+@cs.cmu.edu (1992-04-29)
Re: Efficient Execution Time Profiling ? pardo@cs.washington.edu (1992-04-30)
Re: Efficient Execution Time Profiling ? grunwald@foobar.cs.colorado.edu (1992-05-08)
Re: Efficient Execution Time Profiling ? grunwald@foobar.cs.colorado.edu (1992-05-09)
Re: Efficient Execution Time Profiling ? grunwald@foobar.cs.colorado.edu (1992-05-11)
| List of all articles for this month |
Newsgroups: comp.compilers
From: thomasf+@cs.cmu.edu (Thomas Fahringer)
Keywords: debug, testing
Organization: School of Computer Science, Carnegie Mellon
Date: Wed, 29 Apr 1992 11:18:02 GMT

I am currently building a conventional execution time profiler (very
similar to gprof) for F77 programs. The instrumented F77 program is
executed on a Sun Sparc Workstation.


For my profiler I want to have an option to instrument the profiled
program (in particular all procedure calls and loops) for execution times.


For my first trial I simply insert two system calls (ETIME - gets the
current system clock time in msec) before and after the program part to be
profiled, thus deriving execution times for specific program parts.


As expected I get incredible wrong values in particular for nested ETIME
calls (e.g. procedure call within a DO-loop, measuring both the procedure
call and DO-loop).


I figured out that gprof and prof derive very accurate execution times for
their instrumented programs.


Does anyone know how gprof or prof are deriving their execution times that
accurately ?


Does anyone know how I can improve my method of execution time profiling ?


I am eternal thankful for any kind of programs, article, reference, e-mail
address, etc. on this topic.


Thanks a lot in advance.


tom
--
Thomas Fahringer Universitaet Wien
Institut fuer Statistik und Informatik
Bruenner Str. 72, 1210 Wien, Austria


e-mail: tf@sophie.par.univie.ac.at fax: +43 1 39 26 47 224
[Unix systems use the monitor(3) routine which calls the profil(2) system
call, both documented in the FM. They build a histogram of program counters
sampling every time the hardware clock ticks. What do other systems do?
-John]
--


Post a followup to this message

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