Profilling with CL and g++
-
- CodeLite Guru
- Posts: 352
- Joined: Sun Nov 29, 2009 7:36 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Profilling with CL and g++
Hi,
Its long time now I use CL and I'm quiet happy with it. Great product!
Now I have problem in profiling my code (I want to check functions that a time consuming and optimize code). After search I found that gprof and callgrind are valid options. Now I tried callgrind and I wanted to check out gprof. Looking at g++ manual I need to add -pg flag and so I did select in CL project and in compiling and linking CL logs that the flag is indeed included. but running CL does not output profile file. Is there any setting that I miss? any advice?
CL SVN (4.0.5646)
wxWidgets 2.9 (codelite is compiled against 2.8)
Ubuntu 12.04
gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5)
Thanks In advance
Its long time now I use CL and I'm quiet happy with it. Great product!
Now I have problem in profiling my code (I want to check functions that a time consuming and optimize code). After search I found that gprof and callgrind are valid options. Now I tried callgrind and I wanted to check out gprof. Looking at g++ manual I need to add -pg flag and so I did select in CL project and in compiling and linking CL logs that the flag is indeed included. but running CL does not output profile file. Is there any setting that I miss? any advice?
CL SVN (4.0.5646)
wxWidgets 2.9 (codelite is compiled against 2.8)
Ubuntu 12.04
gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5)
Thanks In advance
CodeLite 15.x
CodeLite is awesome, I just Love it!
-
- CodeLite Guru
- Posts: 351
- Joined: Mon Oct 20, 2008 7:26 pm
- Genuine User: Yes
- IDE Question: C++
- Location: France
- Contact:
-
- CodeLite Guru
- Posts: 352
- Joined: Sun Nov 29, 2009 7:36 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Profilling with CL and g++
Hi Jeremie,jfouche wrote:Hi,
You may want to try the new callgraph plugin...
I hope you do fine
I have the plugin but I thought it needs the same file which my CL built app does not generate. Do I miss something here?
CodeLite 15.x
CodeLite is awesome, I just Love it!
- Jarod42
- CodeLite Expert
- Posts: 240
- Joined: Wed Sep 30, 2009 5:54 pm
- Genuine User: Yes
- IDE Question: C++
- Location: France
- Contact:
Re: Profilling with CL and g++
Have you checked into Working directory set by the project, and near the executable.
Are you sure you have -pg in compiler options AND linker options ?
(Note also the compiler option -g (to have debug info) is useful
and make sure that linker option -s (strip symbol) is not present)
It works fine here.
Are you sure you have -pg in compiler options AND linker options ?
(Note also the compiler option -g (to have debug info) is useful
and make sure that linker option -s (strip symbol) is not present)
It works fine here.
-
- CodeLite Guru
- Posts: 352
- Joined: Sun Nov 29, 2009 7:36 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Profilling with CL and g++
Let me check what is CWD. So far other options you mentioned looks fine!Jarod42 wrote:Have you checked into Working directory set by the project, and near the executable.
Are you sure you have -pg in compiler options AND linker options ?
(Note also the compiler option -g (to have debug info) is useful
and make sure that linker option -s (strip symbol) is not present)
It works fine here.
Thanks!
CodeLite 15.x
CodeLite is awesome, I just Love it!
-
- CodeLite Guru
- Posts: 352
- Joined: Sun Nov 29, 2009 7:36 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Profilling with CL and g++
That is the problem. I can see it but then It cannot open it says
clicking ok givesThe CallGraph plugin has suggested node threshold 1 to speed-up the call graph creation. You can alter it on the call graph panel.
Don't know what is wrong but trying to figure out!Failed to open file CallGraph.png. Please check the project settings, rebuild the project and try again.
CodeLite 15.x
CodeLite is awesome, I just Love it!
-
- CodeLite Guru
- Posts: 351
- Joined: Mon Oct 20, 2008 7:26 pm
- Genuine User: Yes
- IDE Question: C++
- Location: France
- Contact:
Re: Profilling with CL and g++
Jérémie
-
- CodeLite Guru
- Posts: 352
- Joined: Sun Nov 29, 2009 7:36 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Profilling with CL and g++
Sorry for late reply but yet here is what commend dot -v gives from terminal
Code: Select all
dot -v
dot - graphviz version 2.26.3 (20100126.1600)
Activated plugin library: libgvplugin_pango.so.6
Using textlayout: textlayout:cairo
Activated plugin library: libgvplugin_dot_layout.so.6
Using layout: dot:dot_layout
Activated plugin library: libgvplugin_core.so.6
Using render: dot:core
Using device: dot:dot:core
The plugin configuration file:
/usr/lib/graphviz/config6
was successfully loaded.
render : cairo dot fig gd map ps svg tk vml vrml xdot
layout : circo dot fdp neato nop nop1 nop2 osage patchwork sfdp twopi
textlayout : textlayout
device : canon cmap cmapx cmapx_np dot eps fig gd gd2 gif gv imap imap_np ismap jpe jpeg jpg pdf plain plain-ext png ps ps2 svg svgz tk vml vmlz vrml wbmp x11 xdot xlib
loadimage : (lib) eps gd gd2 gif jpe jpeg jpg png ps svg
CodeLite 15.x
CodeLite is awesome, I just Love it!