Rahul
Rahul

Reputation: 1021

Does pprof CPU profiling work for large executable?

I have a customized version of envoy proxy that has a performance problem. I am trying to do CPU profiling using gperftools to identify the root cause. However, the output of 'pprof' has only hex addresses instead of function names. I have tried 'pprof' on same system with sample code and it prints the function names properly. I am using the command as follows:

pprof --functions --text ./envoy ./envoy.prof > out.txt

out.txt has lines like this -

Total: 142770 samples
2996   2.1%   2.1%     2996   2.1% 0x0000562680b2586f
2520   1.8%   3.9%     2520   1.8% 0x0000562680b25857

I ran 'pprof' under 'strace' and found multiple invocations of 'addr2line' and 'nm'. All invocations were successfully returning the symbol names. But the final output of 'pprof' did not have any of these names.

The size of my 'envoy' binary is 742MB and the size of my profile file (envoy.prof) is 106MB. Could this be causing the problem ? Is there any way to get this to work other than hacking the 'pprof' script ?

Upvotes: 0

Views: 60

Answers (0)

Related Questions