Mail Archives: djgpp/2001/12/14/11:50:13
X-Authentication-Warning: | delorie.com: mailnull set sender to djgpp-bounces using -f
|
From: | Hans-Bernhard Broeker <broeker AT physik DOT rwth-aachen DOT de>
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | Re: Profiling application
|
Date: | 14 Dec 2001 16:36:42 GMT
|
Organization: | Aachen University of Technology (RWTH)
|
Lines: | 27
|
Message-ID: | <9vd9qq$80h$1@nets3.rz.RWTH-Aachen.DE>
|
References: | <002001c184b8$ed27ec30$1400a8c0 AT alex>
|
NNTP-Posting-Host: | acp3bf.physik.rwth-aachen.de
|
X-Trace: | nets3.rz.RWTH-Aachen.DE 1008347802 8209 137.226.32.75 (14 Dec 2001 16:36:42 GMT)
|
X-Complaints-To: | abuse AT rwth-aachen DOT de
|
NNTP-Posting-Date: | 14 Dec 2001 16:36:42 GMT
|
Originator: | broeker@
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
Reply-To: | djgpp AT delorie DOT com
|
Alex Oleynikov <alex AT compuweigh DOT com> wrote:
> I am trying to profile my application (compiled with DJGPP v.2.03,
> gcc v.2.95.3, binutils v.2.10). I have compiled it with -pg and -a
> switches and ran. It produces a file bb.out (BTW, DJGPP FAQ talks
> about gmon.out, do I have to rename it afterwards?) with some
> statistics.
You got it partly wrong. '-a' is not really for profiling: it's for
line-by-line execution counting. Try again, without '-a', and you'll
be better off, I guess. If you really want execution counts per
source line, I recommend using "gcov" and gcc options "-fprofile-arcs
-ftest-coverage" instead.
IIRC, -pg and -a don't work together at all. That's the reason why you
didn't get the gmon.out file. Note that you have to *link* with -pg,
too, not just compile.
> Now, every time I try to run my profiler (gprof app.exe bb.out) it exits
> with a message: "d:/djgpp/bin/gprof.exe: Cannot allocate 1087817412 bytes"
That's because bb.out is the wrong type of input file, and gprof
doesn't really check whether the file you gave it is a valid
"gmon.out" format file.
--
Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de)
Even if all the snow were burnt, ashes would remain.
- Raw text -