bash 是否有可能获得 gprof 结果的图形表示?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/2439060/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Is it possible to get a graphical representation of gprof results?
提问by Open the way
I am interested in getting the profiling of some number crunching program. I compiled it with -g and -pg options and linked it and got it gmon.out. After reading the info (plain text) it looks a bit ugly. I wonder if there are some open source tools for getting a graphical representation of the 10 functions where the program spends the most of the time as well as a flux diagram.
我有兴趣获得一些数字处理程序的分析。我用 -g 和 -pg 选项编译它并链接它并得到它 gmon.out。阅读信息(纯文本)后,它看起来有点难看。我想知道是否有一些开源工具可以获得程序花费最多时间的 10 个函数的图形表示以及通量图。
Thanks
谢谢
回答by msw
回答by Norman Ramsey
Not quite an answer to your question, but maybe a solution to your problem: I switched from gprof
to valgrind
's callgrind
tool, primarily because of the incredible graphical tool kcachegrind
, which you can use to visualize the results. It's interactive, so you can zoom in on interesting parts of the call graph.
不能完全回答您的问题,但可能是您问题的解决方案:我从gprof
tovalgrind
的callgrind
工具切换,主要是因为令人难以置信的图形工具kcachegrind
,您可以使用它来可视化结果。它是交互式的,因此您可以放大调用图的有趣部分。
Gprof2dot works with callgrind as well as gprof.
Gprof2dot 与 callgrind 以及 gprof 一起使用。