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: Robert Millan
Subject: Re: [PATCH] add a counter in grub_dprintf
Date: Tue, 1 Jul 2008 17:59:06 +0200
User-agent: Mutt/1.5.13 (2006-08-11)

On Mon, Jun 30, 2008 at 01:13:34PM -0400, Pavel Roskin wrote:
> On Sun, 2008-06-29 at 13:22 +0200, Robert Millan wrote:
> > On Thu, Jun 26, 2008 at 05:20:51PM +0200, Javier Martín wrote:
> 
> > > Whoops, sorry, I meant that grub_mkimage would create two core.img
> > > images, one per kernel.img version, and then grub_install would copy
> > > them as usual. Then grub_setup would embed/set up the normal core.img
> > > or the debug version based on a switch. What I propose is basically
> > > modifying grub_mkimage to allow choosing the kernel.img file used and
> > > then adding some lines to grub_install so that the two versions of
> > > core.img are generated (but only the selected is embedded).
> > 
> > Ah;  then it sounds fine, I guess.
> 
> Sorry for entering this discussion so late.  I can tell from my
> experience that most debug code is only useful to debug once specific
> problem.  Once the problem is fixed, the debug code is not needed.  If
> another problem is found, then some new debug code should be written to
> debug that problem.
> 
> Generic debug code may be useful to get information from users if only
> they can reproduce the problem.  But even then, if may be better to add
> a few lines to test certain assumptions rather than try to glean useful
> pieces of information from a long generic log.

Ironicaly, this was also true for my original purpose of measuring performance
during boot.  The standard dprintf calls ate so much time (because of the
serial terminal) that they didn't provide any useful output of the time spent
doing something else.

In the end, I had to add custom calls to print time in the specific places
where I wanted them.

> Adding a complicated mechanism for having debug and non-debug images
> looks like an overkill to me.  It could create more problems than it
> would fix.

But then, what do you suggest?  That we remove debug support altogether?

-- 
Robert Millan

<GPLv2> I know my rights; I want my phone call!
<DRM> What good is a phone call… if you are unable to speak?
(as seen on /.)




reply via email to

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