delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/06/11/05:06:49

From: "John M. Aldrich" <fighteer AT cs DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: GPROF: Useless output???
Date: Sat, 07 Jun 1997 11:25:48 +0000
Organization: Two pounds of chaos and a pinch of salt
Lines: 28
Message-ID: <3399453C.729@cs.com>
References: <Mt38SBAhwVmzEwWP AT jenkinsdavid DOT demon DOT co DOT uk>
Reply-To: fighteer AT cs DOT com
NNTP-Posting-Host: ppp108.cs.com
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

David Jenkins wrote:
> 
> Also how do I get it to stop looking for the .out file??
> I ran gprof 3dzbuf06.exe and it complained about a missing gmon.out
> file. So I renamed the 3dzbuf06.o file to gmon.out and put it in the
> .exe folder.

You might try reading the instructions next time.  Profiling your
programs requires that you both compile AND link with the '-pg' switch,
and then run the program for a while so that a sufficiently large sample
is produced.

Once you have done this, then you can run gprof on the executable and
get the correct results.  Remember:  if you don't compile with '-pg',
your functions will not be compiled for profiling.  If you don't link
with '-pg', your program will not produce the 'gmon.out' file that is
needed by gprof.

This is all documented in chapter 13 of the FAQ, entitled "Profiling
DJGPP Programs".  It doesn't get any easier.

-- 
---------------------------------------------------------------------
| John M. Aldrich, aka Fighteer I      |   mailto:fighteer AT cs DOT com   |
| God's final message to His Creation: | http://www.cs.com/fighteer |
| "We apologize for the inconvenience."| <<< This tagline under >>> |
|                      - Douglas Adams | <<<    construction    >>> |
---------------------------------------------------------------------

- Raw text -


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