gpt4 book ai didi

linux - 性能分析器中的调用堆栈

转载 作者:IT王子 更新时间:2023-10-29 00:15:13 25 4
gpt4 key购买 nike

我正在以下列方式运行“perf”:

perf record -a --call-graph -p some_pid

perf report --call-graph --stdio

然后,我看到了这个:

 1.60%     my_binary  my_binary                [.] my_func
|
--- my_func
|
|--71.10%-- (nil)
| (nil)
|
--28.90%-- 0x17f310000000a

我看不到哪些函数调用了 my_func()。我看到的是“nil”和“0x17f310000000a”。难道我做错了什么?这可能不是调试信息问题,因为某些符号显示而其他符号未显示。

更多信息:

  • 我正在运行 CentOS 6.2(内核 2.6.32-220.4.1)。
  • perf rpm - perf-2.6.32-279.5.2.el6.x86_64。

最佳答案

确保使用 -fno-omit-frame-pointer gcc 选项编译代码。

关于linux - 性能分析器中的调用堆栈,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12160449/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com