Inner functions & -pg
Steve Kargl
sgk@troutmask.apl.washington.edu
Fri Oct 11 16:46:00 GMT 2019
On Fri, Oct 11, 2019 at 05:15:55PM +0100, Salvatore Filippone wrote:
> I have been looking at some profiling data about one of my applications,
> and I have noticed that there is a rather erratic behaviour whenever I have
> a subroutine that CONTAINs another subroutine; sometimes I get the profiler
> (gprof to be precise) printing out the outer subroutine name, sometimes it
> shows data about the inner subroutine but with a completely different name.
> My impression is that this behaviour is on gfortran's side, because I tried
> taking one of those CONTAINed subroutines and made it external, and it
> showed with its correct name.
> How is this supposed to work, if it is supposed to work at all?
> Does it warrant opening a bug report?
> Opinions welcome
Does the size of the contained subroutine affect
the results? AFAIU, gfortran will inline contained
subprograms if the routine is small. This might
affect the profiling.
--
Steve
More information about the Fortran
mailing list