www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/04/27/20:14:25

From: j DOT aldrich6 AT genie DOT com
Message-Id: <199604272348.AA249948890@relay1.geis.com>
Date: Sat, 27 Apr 96 23:47:00 UTC 0000
To: djgpp AT delorie DOT com
Mime-Version: 1.0
Subject: Re: Gprof advice?

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019