Profiling: subroutine cost from different parents


I’ve been trying for a while now, but don’t seem to find a way. Let’s say I have a subroutine A that is called by subroutine B and C. At the moment using pgprof I’m able to show the total cost for A but not divided in the two categories cost while called from B and cost while called from C. I’ve tried compiling with almost all flags, and I’ve read to PGI_tools guide, and the is no direct reference to this feature, so I’m thinking that maybe it’s not possible.

Thanks for you help


Hi Jean-Noel,

While PGPROF doesn’t support call graph profiling, gprof (Linux) and CodeAnylst (Windows) do.

For gprof, compile your code using the PGI compilers and the “-pg” flag to instrument the binary with gprof-style profiling. After you run your binary, a “gmon.out” file will be created and can be used with the gprof utility.

CodeAnalyst can be found at

Hope this helps,

+1 for wanting this feature directly in pgprof. It can be really important for big codes.


Hi Pete,

I sent a note to our lead tools engineer about this request. He said that we do have “callpath” profiling on list of future enhancements but so far there has been only a few requests for it. He’ll see if he can give it a higher priority but it still may be a ways away.

  • Mat

I would like to second PeteBradley’s request.
As a user of a big code, I could sure use this feature!