This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: profiling of contained procedures


On Wednesday 08 November 2006 18:47, Steve Kargl wrote:
> You failed to mention the OS.   On FreeBSD, with one of my applications
> I see [snipped example]

Linux, different distros (SuSE, Debian flavours, Gentoo).

Example:

$> cat prof.f90
PROGRAM test_prof
  CALL contained()
  CONTAINS
    SUBROUTINE contained()
      INTEGER :: i
      DO i = 1, 10000000
        WRITE(*,*) "contained"
      END DO
    END SUBROUTINE
END PROGRAM

$> gfortran-svn -g -pg -Wall -fno-inline prof.f90

$> ./a.out > dump

$> gprof a.out | head
Flat profile:

Each sample counts as 0.01 seconds.
  %   cumulative   self              self     total
 time   seconds   seconds    calls  ms/call  ms/call  name
100.00      0.08     0.08        1    80.00    80.00  MAIN__

 %         the percentage of the total running time of the
time       program used by this function.

$> nm a.out | grep contained
08048722 t contained.899

$> gprof --version
GNU gprof 2.16.1



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]