Re: profile g95




beliavsky@xxxxxxx wrote:
I use mingw g95 on Windows XP. Is there a profiling tool to measure how
CPU time is consumed, or should I just sprinkle calls to the CPU_TIME
intrinsic in the code? If there is a tool that works only on Linux, I
could profile the code there -- I'd guess that the timings should be
similar.

There has been a rather detailed mail in the gg95 google group :
HOWTO: execution time profiling with
g95/valgrind/callgrind/kcacheg­rind

http://groups.google.com/group/gg95/browse_frm/thread/dab64d1ce9b8d80e/#

which describes a linux-only tool, which is, however very instructive
and very detailed (i.e. line by line timings). The standard tool, which
should also be available for mingw (but I can't test), is gprof. It
requires that the code is recompiled/linked with -pg. The executable
will generate a timing report (gmon.out) which can be transformed in
something more or less readable with gprof.

Cheers,

Joost

.



Relevant Pages

  • Re: porting code from VRTX on 68K to vxWorks on pentium
    ... really represent amount of CPU time used in your task, ... things like interrrupts and other tasks can be running. ... I still think somethings uo with your timings. ... 10 volts at the top of the task loops and 0 volts at the bottom of the ...
    (comp.os.vxworks)
  • gprof/time/clock oddities
    ... I'm measuring CPU times for comparing many different algorithms for a ... the "clock" C function are different from the value given by "gprof". ... CPU time: 20.4s ...
    (comp.unix.programmer)