Mail Archives: djgpp/1996/04/27/20:14:25
Reply to message 5019943 from AGSERM AT NETWIZ on 04/25/96 11:25AM
> Could anybody point me to a primer for using gprof? I'm sure it's a great
>profiler, but I must be doing something wrong because I'm getting
>Unexpected EOF at sample x of y
>X is about 250 thousand, and y is about 1.2 mil. I'm compiling with -pg -g
>and linking with -g.
I'm not 100% sure, but I think you need to link with -pg too. At least, that's
what I do and gcc hasn't complained about unnecessary flags yet. Also,
make sure the program runs all the way through and exits normally, and
make sure that you are running 'gprof <prog>', not 'gprof <prog.exe>'.
Profiling should output a file called 'gmon.out' in your run directory--make
sure that you haven't moved or deleted it.
The DJGPP info docs include a section for gprof.
John
- Raw text -