我用下面的方式运行"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”。我做错了什么吗?这可能不是一个调试信息问题,因为有些符号会显示,而另一些则不会显示。
更多信息:
内核rpm我正在运行rpm 6.2 ( 2.6.32-220.4.1).
发布于 2012-11-15 20:59:43
确保使用-fno-omit-frame-pointer gcc选项编译代码。
发布于 2012-12-14 00:59:54
您就快到了,您缺少-G选项(您可能需要比系统上安装的perf更新的perf):
$ perf report --call-graph --stdio -G来自perf help report
-G, --inverted
alias for inverted caller based call graph.https://stackoverflow.com/questions/12160449
复制相似问题