gprof reports no time accumulated

If your program terminates in a non-clean manner then the profile data won’t get written correctly – how is your program exiting? Regardless, I’d strongly recommend using Shark instead of gprof – it’s very easy to use and superior in pretty much every way to gprof – and doesn’t require you to recompile your program.

Alternatives to gprof [closed]

gprof (read the paper) exists for historical reasons. If you think it will help you find performance problems, it was never advertised as such. Here’s what the paper says: The proļ¬le can be used to compare and assess the costs of various implementations. It does not say it can be used to identify the various … Read more