使用 google-pprof 分析但无法转换为 kcachegrind 格式

问题描述 投票:0回答:0

我有一个

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)

我做错了什么?

c++ profiling kcachegrind
© www.soinside.com 2019 - 2024. All rights reserved.