Single Step Profiler

The Single Step Profiler is a program that runs (and profiles) other programs. It can profile both Cygnus and non-Cygnus programs, although gprof won't support non-Cygnus programs (yet?). Most importantly, it can profile the startup and shutdown code that a regular -pg build can't.

ssp needs to be told where to profile (sorry, but I was being lazy). The file bracket.bat will tell you what the right numbers are for cygwin programs. Run ssp like this:

ssp 0x401000 0x403154 hello.exe -a -v -b -whatever

ssp will put your program in single step mode and note all locations that get executed, counting each value of %eip. You'll see the %eip values whizzing along on the screen (your program runs *very* slowly). When it's done, it produces a gmon.out that counts one "sample" for each %eip value it sees. This means that each CPU clock counts at 0.01 seconds. The fix-gp program re-adjusts these values and provides suitable headings.

gprof -b -p hello.exe | fix-gp > hello.gp



DJ Delorie