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 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


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