我有一个
main.cpp
文件,我编译为main
.
我想在上面跑
google-pprof
。
我用
sudo apt install google-perftools
安装了程序
然后我将可执行文件运行为
CPUPROFILE=ls.prof LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libprofiler.so.0 ./main
.
我得到了输出文件
ls.prof
。现在我想在kcachegrind
.中查看它
我正在跑步:
google-pprof --callgrind /bin/ls ls.prof > ls.callgrind
但是我收到错误:
Using local file /bin/ls.
Using local file ls.prof.
/usr/bin/addr2line: DWARF error: section .debug_info is larger than its filesize! (0x93ef57 vs 0x530ea0)
我做错了什么?