schmidt@zola.ics.uci.edu (Doug Schmidt) (10/12/89)
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