From owner-freebsd-sparc64@FreeBSD.ORG Wed Feb 8 18:02:02 2006 Return-Path: X-Original-To: freebsd-sparc64@freebsd.org Delivered-To: freebsd-sparc64@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7188016A422 for ; Wed, 8 Feb 2006 18:02:02 +0000 (GMT) (envelope-from toa@pop.agri.ch) Received: from exsmtp02.agrinet.ch (exsmtp02.agrinet.ch [81.221.252.201]) by mx1.FreeBSD.org (Postfix) with ESMTP id A782143D49 for ; Wed, 8 Feb 2006 18:02:01 +0000 (GMT) (envelope-from toa@pop.agri.ch) Received: from smtp.messaging.ch ([10.50.250.214]) by exsmtp02.agrinet.ch with Microsoft SMTPSVC(6.0.3790.211); Wed, 8 Feb 2006 19:01:59 +0100 Received: from [192.168.225.5] ([80.219.88.141]) by smtp.messaging.ch with id v62P1T00132ylCo0000000 for freebsd-sparc64@freebsd.org; Wed, 08 Feb 2006 19:02:24 +0100 X-IMP: RBL SBL+XBL: 0.00, RBL SPAMCOP: 0.00, RBL MAPS_ORDB: 0.00, RBL SORBS: 0.10, URL RHS: 0.00, URL SURBL: 0.00 Message-ID: <43EA3216.2030606@pop.agri.ch> Date: Wed, 08 Feb 2006 19:01:58 +0100 From: Andreas Tobler User-Agent: Thunderbird 1.5 (Macintosh/20051201) MIME-Version: 1.0 To: Marius Strobl References: <20060205112432.A3868@newtrinity.zeist.de> <43E5D988.2070009@pop.agri.ch> <20060205122153.O68720@newtrinity.zeist.de> <43E5E70D.1090209@pop.agri.ch> <20060205132234.P68720@newtrinity.zeist.de> <43E60F45.4070004@pop.agri.ch> <20060205175656.S68720@newtrinity.zeist.de> <43E7B94E.3070805@pop.agri.ch> <20060207170055.B53619@newtrinity.zeist.de> <43E8FC6B.50705@pop.agri.ch> <20060208173546.D53619@newtrinity.zeist.de> In-Reply-To: <20060208173546.D53619@newtrinity.zeist.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 08 Feb 2006 18:01:59.0886 (UTC) FILETIME=[C1E036E0:01C62CD9] Cc: freebsd-sparc64@freebsd.org Subject: Re: profiling with cc X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Feb 2006 18:02:02 -0000 Marius Strobl wrote: > It should work fine for C functions but the ENTRY macro in > sparc64/include/asm.h has to be changed to call _mcount() so profiling > info is also gathered for asm functions (e.g. those in libc). Ok, need to find out how. > >> Would you mind giving me some feedback if the attached is useful/needs >> rework? >> > > It has some style issues and inconsitencies (see style(9) and other > inline asm in e.g. sparc64/include/cpufunc.h). Otherwise it looks > good but probably needs a PIC version of the MCOUNT asm so it also > works when compiling with -p. Thanks, for the comments. I try to address them, I need some doc and code reading then. I'm new to your style guide. I hope the code in cvs is worth as example ;) [enterprise:~] andreast% cc -p hello hello.c consider using `-pg' instead of `-p' with gprof(1) .... Well it spits some errors, so I guess you're correct regarding the pic variant. Thanks again, Andreas