I just got to profile a "piece" of Code::Blocks.
I was looking for a way to be able to profile it all, but couldn't find anything (in other words, I was looking for a way to make the output file be named something different than gmon.out or get it created somewhere else and got nothing).
The current trick is to enable profiling only for one target.
I just tried enabling profiling for the SDK, rebuilding Code::Blocks, running it and got the gmon.out file. Ran
gprof codeblocks.dll > results.txt and it worked
So... as far as the profiling focus in just one target everything will be ok.