delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/05/18/03:30:29

From: Vik Heyndrickx <Vik DOT Heyndrickx AT rug DOT ac DOT be>
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
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

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

- Raw text -


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