From owner-freebsd-ports@FreeBSD.ORG Tue May 29 12:55:09 2007 Return-Path: X-Original-To: ports@freebsd.org Delivered-To: freebsd-ports@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 99D7116A494; Tue, 29 May 2007 12:55:09 +0000 (UTC) (envelope-from jdc@parodius.com) Received: from mx01.sc1.parodius.com (mx01.sc1.parodius.com [72.20.106.3]) by mx1.freebsd.org (Postfix) with ESMTP id 5DA7C13C4BC; Tue, 29 May 2007 12:55:09 +0000 (UTC) (envelope-from jdc@parodius.com) Received: by mx01.sc1.parodius.com (Postfix, from userid 1000) id 0CA1B1CC01C; Tue, 29 May 2007 05:40:05 -0700 (PDT) Date: Tue, 29 May 2007 05:40:05 -0700 From: Jeremy Chadwick To: Peter Jeremy Message-ID: <20070529124005.GA52331@eos.sc1.parodius.com> Mail-Followup-To: Peter Jeremy , Stephen Montgomery-Smith , ports@freebsd.org, hackers@freebsd.org References: <4659EF80.70100@math.missouri.edu> <20070527223048.GA37505@icarus.home.lan> <20070529103429.GD70055@turion.vk2pj.dyndns.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070529103429.GD70055@turion.vk2pj.dyndns.org> User-Agent: Mutt/1.5.15 (2007-04-06) Cc: ports@freebsd.org, Stephen Montgomery-Smith , hackers@freebsd.org Subject: Re: Looking for speed increases in "make index" and pkg_version for ports X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 May 2007 12:55:09 -0000 On Tue, May 29, 2007 at 08:34:29PM +1000, Peter Jeremy wrote: > On 2007-May-27 15:30:48 -0700, Jeremy Chadwick wrote: > >This sounds like a good solution. In fact, I'm lead to believe that > >heavy reliance on /bin/sh is part of why the ports collection is slow. > > Someone needs to enable accounting on a recent -current (with the > high-resolution accounting records) and look at where the time is > actually going. (My -current box needs upgrading before I could > do this). The best I was able to do: I have a 6.2-RELEASE box which contains profiled libraries, and managed to make a profiled /bin/sh. This didn't take much work (just some modification of src/bin/sh/Makefile), but one thing which did stump me was the .gmon file never getting written. Turns out trap.c calls _exit(2) not exit(3). Change that and voila. Admittedly I'm not that familiar with gprof, and I'm also left wondering if profiling /bin/sh is going to help us, since we don't have a direct way of determining which shell commands take the most time -- just which C functions are most heavily used. -- | Jeremy Chadwick jdc at parodius.com | | Parodius Networking http://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, USA | | Making life hard for others since 1977. PGP: 4BD6C0CB |