Article View: gnu.g++.bug
Article #497Profiling with g++ 1.36.0-
From: Doug Schmidt
Date: Thu, 12 Oct 1989 05:02
Date: Thu, 12 Oct 1989 05:02
39 lines
2054 bytes
2054 bytes
Many people have expressed interest in getting g++ to support the -p
and -pg profiling options. Until the 1.36 release the profiling
situation looked grim... However, it appears now that there is at
least some support for profiling with g++ on machines that use GNU gas
and GNU ld. To get it working simply apply this patch:
*** cplus-decl.c.~1~ Wed Oct 11 07:37:53 1989
--- cplus-decl.c Wed Oct 11 21:30:42 1989
***************
*** 2444,2451 ****
current_binding_level = NULL_BINDING_LEVEL;
free_binding_level = NULL_BINDING_LEVEL;
! if (profile_flag)
! fatal ("profiling not yet supported in GNU C++");
if (profile_block_flag)
fatal ("`-a' profiling not yet supported in GNU C++");
if (write_symbols == GDB_DEBUG)
--- 2444,2451 ----
current_binding_level = NULL_BINDING_LEVEL;
free_binding_level = NULL_BINDING_LEVEL;
! /* if (profile_flag)
! fatal ("profiling not yet supported in GNU C++"); */
if (profile_block_flag)
fatal ("`-a' profiling not yet supported in GNU C++");
if (write_symbols == GDB_DEBUG)
Remember that g++ mangles names; it may take a little while to get
familiar with the output from prof or gprof!
I'm sure if I've forgotten anything someone will remind me ;-)
Doug
--
Master Swordsman speak of humility; | schmidt@ics.uci.edu (ARPA)
Philosophers speak of truth; | office: (714) 856-4034
Saints and wisemen speak of the Tao of no doubt;
The moon, sun, and sea speaks for itself. -- Hiroshi Hamada
Technical Details
Message-ID:
<1989Oct12.050212.26781@paris.ics.uci.edu>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!bionet!apple!usc!orion.oac.uci.edu!uci-ics!newsShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!bionet!apple!usc!orion.oac.uci.edu!uci-ics!news From: schmidt@zola.ics.uci.edu (Doug Schmidt) Newsgroups: gnu.g++.bug Subject: Profiling with g++ 1.36.0- Message-ID: <1989Oct12.050212.26781@paris.ics.uci.edu> Date: 12 Oct 89 05:02:12 GMT Sender: news@paris.ics.uci.edu (Network News) Reply-To: schmidt@zola.ics.uci.edu (Doug Schmidt) Distribution: gnu Organization: University of California, Irvine - Dept of ICS Lines: 39