User forums > Using Code::Blocks
profiling hell
forestmaster:
Hello to this great community
I've been using cb for quite a long time, but never tried to get into profiling. Today I've (desperately) spent my whole afternoon trying to get it working. I'm on windows, cd 8.02. I have my code compiled with -pg, gmon.out generated and read with gprof, but (as I've learnt it's common problem) no time is accumulated, just the number of function calls! I've tried to replace the supplied gprof with another one but things don't change. I'd like to know what exactly are the steps You go through in order to get some simple profiling! help! please! :D
daniele
forestmaster:
I will twist my question:
did anyone actually got profiling to work? thanks in advance for any answer : )
oBFusCATed:
I think, I've successfully profiled an app, on windows and linux.
Please state your OS and gcc versions.
Does generating output from the command line works (read the gproff help for more info).
Please keep in mind that your project path is better to be English only with no spaces.
forestmaster:
I'm on windows xp sp3. the gcc is the mingw32 that comes with codeblocks 8.02. I've used gprof (the version that comes with cb and a newer one) from the command line with output in the prompt and in a text file. is there any way beside the command line? The number of function calls is fine, just it doesn't give any timing information.
oBFusCATed:
This seems like a problem with your gprof...
Please do a search for "gprof no time accumulated", there are lots of hints....
You can try newer mingw or TDM release of gcc (gprof should be bundled with gcc or binutils, no sure about that)
Update: See here for explanation of the shortcomings of gprof: http://www.ibm.com/developerworks/library/l-gnuprof.html#listing6
Navigation
[0] Message Index
[#] Next page
Go to full version