grub-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] add a counter in grub_dprintf


From: Isaac Dupree
Subject: Re: [PATCH] add a counter in grub_dprintf
Date: Sun, 22 Jun 2008 07:30:07 -0400
User-agent: Thunderbird 2.0.0.14 (X11/20080505)

Javier Martín wrote:
El sáb, 21-06-2008 a las 16:19 +0200, Robert Millan escribió:
But space in post-mbr area is precious, and if we can save a bit, it means
less users who will run into trouble in first place.


Disclaimer: the following is just the product of brainstorming from a
mind tortured by hours of studying projective geometry. Use with care ^^

Why not modify the build system to create _two_ instances of kernel.img,
one with and another without debugging? grub_mkimage would create the
normal, smaller core.img (without dprintf) for installing and embedding;
and store a core_dbg.img in the /boot/grub folder, so that if
instrumentation is required the only thing the users needs to do is
chain that debug version of GRUB:

    grub> multiboot /boot/grub/core_dbg.img
    grub> boot

or even to install it if necessary (if it fits! But multiboot, if it works, could help *some* of the time too). I think that prebuilt debug image is important, otherwise when users rebuild a debug version it's much more likely to be built differently somehow from the corresponding non-debug version (especially if it originally came through a packaging system such as Debian).


Robert Millan wrote:
OTOH, it could add maintainance burden for us when we have to explain
everyone that they have to rebuild and reinstall GRUB to get the debug
output _and_ it opens the door for heisenbugs.

But space in post-mbr area is precious, and if we can save a bit, it means
less users who will run into trouble in first place.

the possibility for heisenbugs does seem very real given the diversity of hardware out there. Would it mitigate this to only disable the dprintfs (by default) in space-critical images such as x86 pc? (or would it make things worse...)

-Isaac




reply via email to

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