From: "John M. Aldrich" 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: Reply-To: fighteer AT cs DOT com NNTP-Posting-Host: ppp108.cs.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk 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 >>> | ---------------------------------------------------------------------