Linux Eclipse CDT剖析器 [英] Linux Eclipse CDT profiler
问题描述
我也是C ++和多线程编程的新手,可以任何人也会提供一些关于如何运行多线程应用程序分析的建议,例如,要查找性能瓶颈等。
谢谢。
我不知道这是否是最佳选择,但绝对明显的是:gprof。您只需要右键设置编译开关(在项目属性中启用该项目的gprof(-pg) - > c / c ++ build - >设置 - >调试)。
当您使用此选项编译程序时,您需要运行它(直到正常退出)。这会生成配置文件(gmon.out)。
您可以在eclipse中安装额外的插件,以便可视化gmon.out的内容(请访问帮助 - >安装 - > Linux工具 - > GProf集成)。只要打开生成的gmon.out文件,就像您安装该插件一样,您可以使用任何其他文件。
I am using Eclipse CDT under Linux, can anyone recommend a good profiler under that environment please.
I am also new to C++ and multi-thread programming, can anyone also offer some advice on how to run profiling for multi-threaded application please, e.g., what to look for performance bottleneck, etc.
Thanks.
I don't know if it's best choice, but it's definitely obvious one: gprof. You just need to set compilation switches right (enable gprof (-pg) for that project in project properties -> c/c++ build -> Settings -> Debugging). When you have compiled program with this options, you need to run it (until in normally exits). This generates profile file (gmon.out). There is additional plug-in you can install in eclipse, that visualizes the contents of gmon.out (go to Help -> Install -> Linux tools -> GProf integration). Just open generated gmon.out file as you would any other file, once you have that plugin installed.
这篇关于Linux Eclipse CDT剖析器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!