gprof -A gives execution times (how many times, a unitless number). gcov -b gives percentages within each block ("first line in this loop took 77% of its execution time"). Potential options involving ifort would be acceptable: codecov is available, with similar functionality. The Internet seems silent about means to measure loop execution time ("this look took 16% of this function execution time")...
Asked
Active
Viewed 116 times
1
-
2Did you consider also [oprofile](http://oprofile.sourceforge.net/) ? – Basile Starynkevitch Nov 14 '13 at 23:00
-
Have you considered using the intrinsic subroutine [cpu_time](http://gcc.gnu.org/onlinedocs/gfortran/CPU_005fTIME.html#CPU_005fTIME)? While not a profiling tool & requires (potentially significant) additions to your current code, it definitely will give you loop execution times. – Kyle Kanos Nov 15 '13 at 02:18
-
If you have the money Intel VTune (http://software.intel.com/en-us/intel-vtune-amplifier-xe) offers a multitude of timing information which may meet your needs. – High Performance Mark Nov 15 '13 at 09:31
-
How much precision do you need? If you use a stack sampler like [*Zoom*](http://www.rotateright.com/) the percent of stack samples that pierce that loop is the number you want. If you only need low precision, you can [*take the samples by hand under `gdb`*](http://stackoverflow.com/a/378024/23771). – Mike Dunlavey Nov 15 '13 at 14:44