Code::Blocks Forums
User forums => Help => Topic started by: zacaj on March 21, 2010, 08:12:43 pm
-
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.
-
You should also use -g (generate debug-symbols) and make sure, you do not strip the symbols or optimize the code.
-
Thanks, removing optimization fixed it
-
Profiling unoptimized code is almost pointless.
I've no problems profiling -O2 compiled code!