Mail Archives: djgpp/1998/05/18/03:30:29
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 -