[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: profiling

From: Marcus Brinkmann
Subject: Re: profiling
Date: Tue, 15 May 2001 01:39:05 +0200
User-agent: Mutt/1.3.15i

On Mon, May 14, 2001 at 06:20:50PM -0400, Roland McGrath wrote:
> Well, I'm not quite sure how to react to this.  I'm not exactly surprised
> that there is a problem.  Frankly, I'm somewhat surprised that profiling
> actually does work at all, and I'm having a hard time taking this bug
> report as anything but good news. :-)

:) I was also pleasantly surprised.  I'd prepared myself for a longer night.
> > However, we don't use crt1.o for static linking, we need to use the special
> > crt0.o (sysdeps/mach/hurd/i386/static_start.S and the Makefile).
> Indeed, that was an oversight we made whenever it was we got profiling 
> working.
> It should be completely trivial to fix, and I've enclosed a libc patch below.
> Please try this out and if it works I will check it in.

Yep, builds gcrt0.o as it should.  Haven't tried a make install, but that's
a no-brainer.
> > That said, once we have gcrt0.o we also need to fix up the specs file.
> > It does not work correctly with -pg.  I think we should just do what Linux
> > does:  Use -pg for profiling just the program, and -profile if also libc
> > should be profiled.  If I understood it correctly.
> I agree.  The Linux meaning of -pg/-profile is contrary to the common
> meaning of -pg on other systems, but for the Hurd I see no reason to differ
> from the Linux definitions.  Most people want to profile their own programs
> and not the C library.  

I sent a specs file in a seperate message.  It's a bit involved but works
fine in all combinations I tested.

Some random comments:

* (note to self) Have to fix the specs file for the cross compiler (make-cross).

* I wondered why the _pc_samples interface is used in profil(), rather than
  the quite straight forward mach_sample_task() (I could only find
  documentation for the latter, in kernel_interfaces.ps).

* What parts of the Hurd are good candidates for profiling?  Thomas' fork
  test.  File system operations.  Servers.


`Rhubarb is no Egyptian god.' Debian http://www.debian.org brinkmd@debian.org
Marcus Brinkmann              GNU    http://www.gnu.org    marcus@gnu.org

reply via email to

[Prev in Thread] Current Thread [Next in Thread]