[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Tue, 15 May 2001 01:39:05 +0200
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
> 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
> > 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 email@example.com
Marcus Brinkmann GNU http://www.gnu.org firstname.lastname@example.org