Skip to contentSkip to conversation

how to see glibc symbol when using perf to profile programs

DISCUSSION caobenzhi 1 participant 2 messages Sep 26, 2013

lore
Share & tools
lore

caobenzhi

author
#0 lore raw

Hi, everyone~ recently I use perf to see the bottleneck of my program. But I encounter a problem: I cann't use which function in glibc was called. The command I use were like follows:
perf record -g ./wc ~/data/wc/10MB.txt -n 1
perf report -g
And the results I get were like follows:

48.13%  wc  libc-2.15.so                 [.] 0x000000000008c5a9
12.29%  wc  [kernel.kallsyms]         [k] clear_page_c

Also when I enter the libc-2.15.so, the results were as follows:
48.13% wc libc-2.15.so [.] 0x000000000008c5a9
+ 0x7f5adf1a05bd
+ 0x7f5adf1a05a9
+ 0x7f5adf245e5e

     0x7f5adf26231e                                                        
     0x1                                                                   
     0x7f5adf2622e6                                                        
     0x1         

I cann't see which functions in glibc was called.
Do anyone who know how to fix that problem?
Thanks a lot~
Emily

author
#1 lore raw

caobenzhi <caobenzhi0915 <at> gmail.com> writes:

Now I solve this problem by using the following two commands:
sudo apt-get install libc6-dbg
sudo apt-get source libc6-dev
But I got another problem, how to know which code trigger page fault in Perf?
Thanks and regards~
Emily