News:

As usual while waiting for the next release - don't forget to check the nightly builds in the forum.

Main Menu

Profiling in Code::Blocks

Started by zacaj, March 21, 2010, 08:12:43 PM

Previous topic - Next topic

zacaj

Im trying to profile my program.  Origionally, I would develop without an IDE, and could just at -pg to the compile line to profile it, and then run gprof.  In code::blocks, theres a -pg option in build options, so I enabled it and compiled my program, than ran gprof main.exe, but it says there are no symbols.  I also though there might be a plugin, but the plugin doesnt have a wiki page, and I cant find any links to download it.

Jenna

You should also use -g (generate debug-symbols) and make sure, you do not strip the symbols or optimize the code.

zacaj

Thanks, removing optimization fixed it

oBFusCATed

Profiling unoptimized code is almost pointless.
I've no problems profiling -O2 compiled code!
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]