What is the best way to get the most useful output from oprofile?
使用以下工具:
- opreport
- opcontrol
- opannotate
我开始使用这个工具,并试图找到最好的组合,获得的例子
最简单的分析。
谢谢
gprof2dot是配置文件数据最令人惊叹的可视化工具。
1 2 3 4 5 6 7 8 9 10 11 | opcontrol --shutdown opcontrol --callgraph=7 opcontrol --image= opcontrol --start ... time passes ... opcontrol --dump opreport -c > profile_info.txt gprof2dot.py -f oprofile --strip profile_info.txt | dot -Tsvg > profile_graph.svg inkscape profile_graph.svg |
深入挖掘实际问题代码时,
如果您手动将事件计数器设置为较小的数字,请记住您无法设置调用图。 默认情况下,使用
编辑:示例截图:
减少分辨率以避免泄露机密数据,但您明白了。
看看KCachegrind - 它是一个配置文件数据可视化工具。
KCachegrind可视化Callgrind探查器工具生成的数据文件。 但是使用转换脚本,KCachegrind能够可视化其他分析器(如OProfile)的输出。
使用包管理器(yum,apt-get等)安装KCachegrind时,会得到一个名为op2calltree的工具,它将Oprofile的输出转换为KCachegrind的格式。