Article View: gnu.gcc.help
Article #52847Profiling with gcc v2.0
From: Don R. Maszle
Date: Fri, 15 May 1992 00:25
Date: Fri, 15 May 1992 00:25
44 lines
2360 bytes
2360 bytes
We recently upgraded to gcc v2.0 from a very old version. I had used
prof(1) and the old version of gcc to profile a program I'm working
on, and now I have profile it again, but I'm having some problems.
All of the source have been compiled with the -p option and this is
also passed to the linker. The thusly compiled program runs just
fine, but when I run prof on it, it doesn't seem to be executing my
program. The output is given at the end.
What is obvious from this is that main() is never called, however
GetFilenames() which is a function in main() seems to be called once.
As far as I can tell, I'm not doing this differently from when I
profiled it last time. It would be most gracious if someone would
send me an illuminating e-mail message.
Don Maszle (maze@bea.lbl.gov)
----------------------------------------
maze@bea: cancer>prof -z -a -n canc
%time cumsecs #call ms/call name
0.0 0.00 143 0.00 __unpack_extended
100.0 0.02 1 20.00 __class_quadruple
0.0 0.02 1 0.00 _GetFilenames
0.0 0.02 1 0.00 __class_double
0.0 0.02 1 0.00 __mul_65536short
0.0 0.02 1 0.00 _ilogb
0.0 0.02 1 0.00 _isnormal
0.0 0.02 1 0.00 _times_power.o
0.0 0.02 1 0.00 cancer.o
0.0 0.02 -lg
0.0 0.02 .div
0.0 0.02 .mul
0.0 0.02 .rem
.
. [lines omitted]
.
0.0 0.02 ___main
. [lines omitted]
0.0 0.02 _main
----------------------------------------
Technical Details
Message-ID:
<23404@dog.ee.lbl.gov>Path:
arc1-ca.pugleaf.net!sparky!uunet!cs.utexas.edu!qt.cs.utexas.edu!yale.edu!think.com!ames!agate!dog.ee.lbl.gov!bea.lbl.gov!mazeShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 11318c,a604ee13f1578985,start X-Google-Attributes: gid11318c,public X-Google-ArrivalTime: 1992-05-14 12:29:36 PST Path: arc1-ca.pugleaf.net!sparky!uunet!cs.utexas.edu!qt.cs.utexas.edu!yale.edu!think.com!ames!agate!dog.ee.lbl.gov!bea.lbl.gov!maze From: maze@bea.lbl.gov (Don R. Maszle) Newsgroups: gnu.gcc.help Subject: Profiling with gcc v2.0 Followup-To: gnu.gcc.help Date: 15 May 1992 00:25:47 GMT Organization: Lawrence Berkeley Laboratory, Berkeley Lines: 45 Sender: maze@bea.lbl.gov Distribution: gnu Message-ID: <23404@dog.ee.lbl.gov> NNTP-Posting-Host: 128.3.12.45 Keywords: prof(1), profile, -p