Sgenmi / gperftools

Automatically exported from code.google.com/p/gperftools
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Function names are not printed when running pprof for CPU profiler #520

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.Compile the code with option -g, o, tcmalloc libraries and -lprofile
2.Run the executable with CPUPROFILE flag set and get profiled file ls.profile
3.Run pprof --callgrind /bin/ls > ls.callgrind 

What is the expected output? What do you see instead?
ls.callgrind file doesn't contain the function names. Contains only the address 
of the stack.

What version of the product are you using? On what operating system?
Latest gperftools-2.0
Linux version 2.6.18-164.el5PAE (mockbuild@x86-002.build.bos.redhat.com) (gcc 
version 4.1.2 20080704 (Red Hat 4.1.2-46))

Please provide any additional information below.
Compiling the code with compile flag -g and o. Want to know any other additinal 
flags needed to get the function names in the stack trace. Getting only the 
address?

Original issue reported on code.google.com by immaneni...@gmail.com on 19 Apr 2013 at 12:10

GoogleCodeExporter commented 9 years ago
Forgot to attach the ls.callgrind file. Attached it for your reference.
thanks

Original comment by immaneni...@gmail.com on 19 Apr 2013 at 12:14

Attachments:

GoogleCodeExporter commented 9 years ago
Can someone please help me? Let me know what compiler flags I need for the 
function names to be stored in ls.prof file so that it can be converted to 
ls.callgrind and the kachegrind will display it.

Original comment by immaneni...@gmail.com on 19 Apr 2013 at 8:23

GoogleCodeExporter commented 9 years ago
Please help me.
I have compiled the code using option -c -g -p -save-temps.
Linked the code with -g -p option as well.

Ran the code and obtained the cpu profiler output. On running the pprof on the 
profiler output I am can see the addresses and not the function names. Please 
let me know what to do. Please help me!!!

Original comment by immaneni...@gmail.com on 22 Apr 2013 at 11:25

GoogleCodeExporter commented 9 years ago
how can one see the function names and the line numbers in the profiled output 
when running pprof with ls.prof?
command used is pprof --callgrind /bin/ls ls.prof

Thanks

Original comment by immaneni...@gmail.com on 22 Apr 2013 at 11:26

GoogleCodeExporter commented 9 years ago
Please close this thread. Got it as had to read pprof to analyze the output 
properly. Thanks!!!

Original comment by immaneni...@gmail.com on 23 Apr 2013 at 6:56

GoogleCodeExporter commented 9 years ago
Would be super awesome if you could contribute your findings as a patch for 
pprof.1.

Original comment by alkondratenko on 6 Jul 2013 at 9:11