Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 29 May 2007 05:40:05 -0700
From:      Jeremy Chadwick <koitsu@FreeBSD.org>
To:        Peter Jeremy <peterjeremy@optushome.com.au>
Cc:        ports@freebsd.org, Stephen Montgomery-Smith <stephen@math.missouri.edu>, hackers@freebsd.org
Subject:   Re: Looking for speed increases in "make index" and pkg_version for ports
Message-ID:  <20070529124005.GA52331@eos.sc1.parodius.com>
In-Reply-To: <20070529103429.GD70055@turion.vk2pj.dyndns.org>
References:  <4659EF80.70100@math.missouri.edu> <20070527223048.GA37505@icarus.home.lan> <20070529103429.GD70055@turion.vk2pj.dyndns.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, May 29, 2007 at 08:34:29PM +1000, Peter Jeremy wrote:
> On 2007-May-27 15:30:48 -0700, Jeremy Chadwick <koitsu@freebsd.org> 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 |




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070529124005.GA52331>