Is it possible to get a graphical representation of gprof results?

我们两清 提交于 2020-04-29 05:59:01

问题


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.

Thanks


回答1:


Gprof2Dot by jrfonseca is a tool that converts the output of many profilers, amongst which gprof, into a dot graph.




回答2:


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.

Gprof2dot works with callgrind as well as gprof.



来源:https://stackoverflow.com/questions/2439060/is-it-possible-to-get-a-graphical-representation-of-gprof-results

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!