From: "John M. Aldrich" Newsgroups: comp.os.msdos.djgpp Subject: Re: Does anybody knows how to use gprof ? Date: Thu, 13 Nov 1997 07:04:43 +0000 Organization: Two pounds of chaos and a pinch of salt Lines: 31 Message-ID: <346AA68B.6FB5@cs.com> References: Reply-To: fighteer AT cs DOT com NNTP-Posting-Host: ppp204.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 Houska Ludek - IN wrote: > > Do you know how to use gprof, or do you know where to get the > documentation. ( Maybe I have the doc, but I don't know which one it is. ) The DJGPP Frequently Asked Questions list, an invaluable resource for all DJGPP users, describes how to profile in chapter 13. In chapter 5.5 it also mentions that the docs for gprof were omitted from the binary distribution, but can be found in the source distribution. I suggest you download and read the FAQ (v2/faq210b.zip from SimTel or online at http://www.delorie.com/djgpp/v2faq/), but I will briefly describe how to profile anyway: Step 1) Compile _AND_ link your program with the '-pg' switch. Step 2) Run your program for enough time to get a representative sample of its calling tree. Step 3) Run 'gprof .exe', where is the name of your program. I recommend redirecting the voluminous output to a file. Step 4) Read the resulting file. It is internally documented, so you shouldn't have any problems figuring it out. Good luck! -- --------------------------------------------------------------------- | John M. Aldrich | "Always listen to experts. They'll | | aka Fighteer I | tell you what can't be done, and why.| | mailto:fighteer AT cs DOT com | Then do it." | | http://www.cs.com/fighteer | - Lazarus Long | ---------------------------------------------------------------------