From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4376 invoked by alias); 18 Oct 2002 21:55:26 -0000 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org Received: (qmail 4265 invoked from network); 18 Oct 2002 21:55:25 -0000 Received: from unknown (HELO mailgw2a.lmco.com) (192.91.147.7) by sources.redhat.com with SMTP; 18 Oct 2002 21:55:25 -0000 Received: from emss01g01.ems.lmco.com ([129.197.181.54]) by mailgw2a.lmco.com (8.11.6/8.11.6) with ESMTP id g9ILtOp20450 for ; Fri, 18 Oct 2002 17:55:24 -0400 (EDT) Received: from CONVERSION-DAEMON.lmco.com by lmco.com (PMDF V6.1-1 #40643) id <0H470010168AMA@lmco.com> for gcc-help@gcc.gnu.org; Fri, 18 Oct 2002 14:55:23 -0700 (PDT) Received: from EMSS01I00.us.lmco.com ([129.197.181.70]) by lmco.com (PMDF V6.1-1 #40643) with ESMTP id <0H4700HPG689GL@lmco.com> for gcc-help@gcc.gnu.org; Fri, 18 Oct 2002 14:55:21 -0700 (PDT) Received: by EMSS01I00.us.lmco.com with Internet Mail Service (5.5.2653.19) id <4XYB15JQ>; Fri, 18 Oct 2002 14:55:21 -0700 Content-return: allowed Date: Fri, 18 Oct 2002 14:55:00 -0000 From: "Krimsley, David A" Subject: Profiling on SGI with GCC To: "'gcc-help@gcc.gnu.org'" Message-id: MIME-version: 1.0 Content-type: text/plain Content-transfer-encoding: 7BIT X-SW-Source: 2002-10/txt/msg00220.txt.bz2 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