From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16534 invoked by alias); 3 Oct 2002 18:35:07 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 16519 invoked from network); 3 Oct 2002 18:35:06 -0000 Received: from unknown (HELO mx2.redhat.com) (12.150.115.133) by sources.redhat.com with SMTP; 3 Oct 2002 18:35:06 -0000 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.11.6/8.11.6) with ESMTP id g93IYss18800; Thu, 3 Oct 2002 14:34:54 -0400 Received: from potter.sfbay.redhat.com (potter.sfbay.redhat.com [172.16.27.15]) by int-mx2.corp.redhat.com (8.11.6/8.11.6) with ESMTP id g93IZ5l18851; Thu, 3 Oct 2002 14:35:05 -0400 Received: from tonopah.toronto.redhat.com (tonopah.toronto.redhat.com [172.16.14.91]) by potter.sfbay.redhat.com (8.11.6/8.11.6) with ESMTP id g93IZ1w05854; Thu, 3 Oct 2002 11:35:01 -0700 Received: (from wilson@localhost) by tonopah.toronto.redhat.com (8.11.6/8.11.6) id g93IYx514282; Thu, 3 Oct 2002 14:34:59 -0400 X-Authentication-Warning: tonopah.toronto.redhat.com: wilson set sender to wilson@redhat.com using -f To: "Kaveh R. Ghazi" Cc: gcc-bugs@gcc.gnu.org, gcc@gcc.gnu.org, tprince@computer.org, David.Billinghurst@riotinto.com, echristo@redhat.com Subject: Re: Profiling on mips-irix6? (Testcase gcc.dg/nest.c failure) References: <200210021422.KAA10736@caip.rutgers.edu> <20021003043650.DE5952CC1E@inet1.ywave.com> <200210030530.BAA26682@caip.rutgers.edu> From: Jim Wilson Date: Thu, 03 Oct 2002 12:15:00 -0000 In-Reply-To: <200210030530.BAA26682@caip.rutgers.edu> Message-ID: User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2002-10/txt/msg00173.txt.bz2 Historically, SGI mips based systems have never supported gprof based profiling. This is because they have pixie/pixstats which is a more flexible tool, and thus they apparently felt that they didn't need gprof. Later pixie was replaced by tools with fancy names, e.g. speedshop, but I think it is still basically pixie underneath the covers. The gcrt1.o stuff is in there on the principle that eventually someone would port gprof to mips-sgi-irix systems, and hence we would need it anyways even though the OS doesn't support gprof. libprof1.a is for prof not gprof. I think prof and its libraries are supposed to be there. It is only gprof/gcrt1.o that is missing from the OS. gprof requires both compiler and library support in order to work. I think it makes sense to supply the compiler part even if the library part is missing, because that makes it easier for library people to supply their missing part, and gives them some incentive to do so. If someone has reported that gprof profiling doesn't work on an irix system, then the correct answer is to tell them that the OS doesn't support gprof. I suppose we could change the irix ports to give an error message or ignore the option instead of complaining about missing files. I don't really care anymore how this specific issue is handled. Testcases that use -pg aren't portable, since not every OS supports gprof. gprof was a BSD invention, and lots of AT&T derived OSes never supported it. Plus on anything that isn't unix, you can't expect -pg to work. This can work only if gcc silently ignores -pg on all systems where gprof doesn't work, but it is rude for gcc to silently ignore an option when it doesn't work. Getting an error from the irix compiler for -pg is somewhat better than just ignoring it, though one could argue it either way. Jim