This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Profiling on SGI with GCC
- From: "Krimsley, David A" <david dot a dot krimsley at lmco dot com>
- To: "'gcc-help at gcc dot gnu dot org'" <gcc-help at gcc dot gnu dot org>
- Date: Fri, 18 Oct 2002 14:55:19 -0700
- Subject: Profiling on SGI with GCC
Hi all,
I am trying to do some profiling of C++ code on an SGI running IRIX 6.5.8
and I'm wondering if anyone out there has been successful in a similar
endeavor... (I am using GCC 3.2.)
>From what I can glean from the GCC documentation, there are two options to
compile the profiling information into the code: -p and -pg. The -p option
generates data for the "prof" tool, while -pg generates data for the "gprof"
tool.
Option 1: -p
When I compile with -p, I get a link error that libprof1.a cannot be found.
>From SGI, I learned that this is because the library is no longer packaged
with IRIX. The last build to include this library was IRIX 5.3. The IRIX 6.x
versions use a new set of ELF libs instead. Does anyone know what GCC is
looking for in this library? If GCC is looking for some routines that are
now located elsewhere, I'm thinking that I can recompile GCC so that it
looks in the right place. I just don't know what the "right place" is... By
the same token, does anyone know why GCC is looking for this info in a lib
that was replaced so long ago?...
Option 2: -pg
When I compile with -pg, I get a link error that gcrt1.o cannot be found.
The SGI guy says that the only documentation that they have says that this
should be provided with (and I quote from him), "the GNU Runtime
Environment." Can someone point me in the right direction? (I notice that
this file is present on my Linux machine, so I'm sure it's out there
somewhere!)
Has anyone out there used these profiling options successfully on an IRIX
6.x machine??
Thanks,
Dave Krimsley
---------------------------
David A. Krimsley
Software Engineer
Lockheed Martin Missiles & Space Operations
david.a.krimsley@lmco.com