This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: profiling of contained procedures
- From: Steve Kargl <sgk at troutmask dot apl dot washington dot edu>
- To: Daniel Franke <franke dot daniel at gmail dot com>
- Cc: fortran at gcc dot gnu dot org
- Date: Wed, 8 Nov 2006 09:47:16 -0800
- Subject: Re: profiling of contained procedures
- References: <640ad44b0611080815s10ceffb5s64443a07270e73e3@mail.gmail.com>
On Wed, Nov 08, 2006 at 05:15:50PM +0100, Daniel Franke wrote:
>
> profiling of contained procedures is next to impossible as they are
> not seen by gprof (FCFLAGS="-g -pg -fno-inline"). The procedures in
> question are listed within the binary as local symbols in text ("t")
> by 'nm'. Problem: the profiler attributes the time spent in contained
> procedures to the container. In my case, a single subroutine accounts
> for 60% of the runtime - but I won't get any detailed information as
> long as the contained procedures are hidden(?) from gprof/valgrind.
>
> Is this behavior intentional?
>
You failed to mention the OS. On FreeBSD, with one of my applications
I see
granularity: each sample hit covers 4 byte(s) for 0.07% of 2.04 seconds
% cumulative self self total
time seconds seconds calls ms/call ms/call name
0.1 2.03 0.00 400 0.00 0.00 __lu3m__dlu3 [45]
0.0 2.04 0.00 1 0.00 0.00 __lu3m__dinitlu3 [523]
lu3m is a module and dul3 and dinitlu3 are contained procedures.
In fact, these routines are invoked through module procedures.
In this, quick test neither routine actually accumulates much time.
--
Steve