Using Vtune for profiling malloc function

I'm using vtune amplifier 2018 for profiling '_int_malloc' in the 'malloc.c' . However, after getting the advanced hot-spots results, when I want to open the function and see the detailed hotspot info about '_int_malloc', vtune complains about not finding the malloc.c source file (see the image below).

结果选项卡的图像

I've taken the following approaches but, they weren't successful:

1) I downloaded the source code of glibc-2.23 and I specified the location of malloc.c in the result tab of vtune (see the picture above). After that I could see the hotspot info on the malloc.c but they didn't match (ie the profile data showed it spent 4s on a blank line!! which doesn't make sense)

2) I also tried to add the path of glibc-dbg to the LD_LIBRARY_PATH (Since it has debugging symbols, so I suspect vtune can use it to show the hotspot info on the code) and make vtune use glibc-dbg instead of glibc However, this approach wasn't successful as well.

My question: Did I miss anything in the above approaches? Is there another way to get hotspot info for glibc?

My OS: Ubuntu 16.04

version of libc: ldd (Ubuntu GLIBC 2.23-0ubuntu9) 2.23

链接地址: http://www.djcxy.com/p/7632.html

上一篇: 如何通过gstreamer将pcap转换为带有视频和音频的avi文件?

下一篇: 使用Vtune来分析malloc函数