[Top][All Lists]

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

Re: [PATCH] add a counter in grub_dprintf

From: Vesa Jääskeläinen
Subject: Re: [PATCH] add a counter in grub_dprintf
Date: Mon, 30 Jun 2008 20:33:45 +0300
User-agent: Thunderbird (Windows/20080421)

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.

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.

One way to proceed here is to use debugger for the original benchmarking purpose.

You would put timed breakpoints, when breakpoint is found, time would be recorded and then execution would be automatically continued. This can be almost fully external to the code being executed.

reply via email to

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