profiling woes, prof has changed???

David Hinds dhinds at elaine18.Stanford.EDU
Sun May 26 09:05:17 AEST 1991


In article <1991May25.220250.11321 at cs.yale.edu> dan at omega.chem.yale.edu (Dan Severance) writes:
>
>   Hi,
>     I've been using pixie to profile my files for a long time now.
>I recently tried it, and when time came to use prof -pixie file,
>I get:  (twnew is the mainline, wpot is the only subroutine)
>   prof -pixie bestc 
>
>wpot_ is an alternate entry within twnew_ (bestc.f) 
>
     I haven't done this with Fortran, but I presume this means that the
subroutine has been inlined and no longer exists as a separate entity.
Because other optimizations may obscure the boundary between the original
code in the main program and the subroutine, it may not be possible to
separate out the time spent in an inlined routine.  In any case, I guess
pixie can't look at the executable and figure out that wpot was once a
separate routine.  I've gotten used to seeing funny things in profiles
of fully optimized code, like single lines of source that generate 600
bytes of code as a result of inlining.  How to avoid this?  Put another
call to this subroutine somewhere else in your program, where it won't
ever be executed (but not so the compiler can figure that out).  Or even
put a recursive call in (also so it will never execute).  These should
force the compiler to not inline the routine.  You'll get a slightly non-
optimal profile, but it should be OK if all you are interested in is the
time spent in the routine itself.

 -David Hinds
  dhinds at cb-iris.stanford.edu



More information about the Comp.sys.sgi mailing list