How to interpret addresses in Google perf tools CPU profiler

My C ++ program consumes a lot of CPU, and moreover, it works. I used the Google Performance Tools to profile CPU usage, and this is what I got:

(pprof) top Total: 1343 samples 1330 99.0% 99.0% 1330 99.0% 0x0000000801dcb11c 7 0.5% 99.6% 7 0.5% 0x0000000801dcb11e 4 0.3% 99.9% 4 0.3% program::threadWorker 1 0.1% 99.9% 1 0.1% 0x0000000801dcb110 1 0.1% 100.0% 1 0.1% 0x00007fffffffffc0 

However, only 1 out of 5 processes shown here is the actual name of the function; the rest are addresses. How can I find out what these addresses are for? (Of course, I'm most interested in the first address above)

Edit: This is how I launched the profiler:

 env CPUPROFILE=prof.out ./a.out [kill program] pprof ./a.out prof.out 

In addition, I found the main reason when checking the code. But it would be nice if the profiler accurately determined the function of the culprit, and not the address.

+6
source share
1 answer

Is it possible that you did not specify the executable when loading the results in google-pprof?

I run it as:

 $ google-pprof executable /tmp/executable.hprof --text | less 

and can see function names perfectly. Or that these methods are in some shared library not in your way when you run google-pprof?

+2
source

Source: https://habr.com/ru/post/899241/


All Articles