From: Vik Heyndrickx Newsgroups: comp.os.msdos.djgpp Subject: Re: Profiling, how? Date: Mon, 18 May 1998 09:12:58 +0200 Organization: University of Ghent, Belgium Lines: 25 Message-ID: <355FDF7A.609B@rug.ac.be> References: <0667c3714041258PROXY AT sion DOT net> NNTP-Posting-Host: eduserv1.rug.ac.be 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 Inkel AT sion DOT com wrote: > > Hi everybody > Could somebody explain me how can I do to profile a program? (yeah, I > know, with the -pg command line switch). My exactly question is: > > * I write a program, > * Compile it with the -pg option, > * I run the program, > * Then, how, when, why? After running your program, run: gprof foo.exe with ``foo.exe'' the name of your program ofcourse, and the profile will be written to your screen; you can redirect it into a file by appending ``> foo.profile''. The profile data should be self-explanatory. Profiling is covered in the FAQ (what isn't). Regards. -- \ Vik /-_-_-_-_-_-_/ \___/ Heyndrickx / \ /-_-_-_-_-_-_/ Knight in the Order of the Unsigned Types laming branch of the thread closed. Sorry about the OTP, but I couldn't help myself. -- \ Vik /-_-_-_-_-_-_/ \___/ Heyndrickx / \ /-_-_-_-_-_-_/ Knight in the Order of the Unsigned Types