Linux Eclipse CDT profiler

前端 未结 2 2024
猫巷女王i
猫巷女王i 2021-02-07 11:36

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 als

2条回答
  •  夕颜
    夕颜 (楼主)
    2021-02-07 12:06

    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.

提交回复
热议问题