This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: profiling of contained procedures
- From: Daniel Franke <franke dot daniel at gmail dot com>
- To: fortran at gcc dot gnu dot org
- Cc: Steve Kargl <sgk at troutmask dot apl dot washington dot edu>
- Date: Wed, 8 Nov 2006 19:09:39 +0100
- Subject: Re: profiling of contained procedures
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:from:to:subject:date:user-agent:references:in-reply-to:cc:mime-version:content-type:content-transfer-encoding:content-disposition:message-id; b=UVu9DBQFgd0GsT1HkozcfUvGMoev4C/kgyVnhoSf+aNQW2eoZcgXcH9zucD7UE27B7XFNmrnuU1G532EM5ROwVztabbsr4zvujmZBL8JmepZZyQ+lNvzrGrg10gj6cARFrbRYcXGvIY9dRzpqaPzz9mF/d/uX7EEa1CwhEKhEJM=
- References: <640ad44b0611080815s10ceffb5s64443a07270e73e3@mail.gmail.com> <20061108174716.GA88879@troutmask.apl.washington.edu>
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