Mail Archives: djgpp/1997/10/24/08:50:26
There is a profiler built into the compiler. Just compile and link
with the -pg switch and run the program. This creates a profile
history in a file called gmon.out.
Then run gprof with your program and gmon.out as parameters to create
a profile.
gprof -z -b prog.exe gmon.out > savefile
It is also possible to get a profile that lists every branch in
your code by using the -a switch which creates a file called bb.out.
Note however that you need the latest version of the libcc.a for
the -a switch to work. (Hint: if you don't get a bb.out file its the
wrong version).
- Raw text -