From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1KDNG5-0007Rw-1s for mharc-grub-devel@gnu.org; Mon, 30 Jun 2008 13:33:45 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KDNG3-0007Rr-2o for grub-devel@gnu.org; Mon, 30 Jun 2008 13:33:43 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KDNG0-0007Rf-M1 for grub-devel@gnu.org; Mon, 30 Jun 2008 13:33:41 -0400 Received: from [199.232.76.173] (port=48567 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KDNG0-0007Rc-IP for grub-devel@gnu.org; Mon, 30 Jun 2008 13:33:40 -0400 Received: from mta-out.inet.fi ([195.156.147.13]:40840 helo=jenni2.rokki.sonera.fi) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KDNG0-0004FC-2L for grub-devel@gnu.org; Mon, 30 Jun 2008 13:33:40 -0400 Received: from [127.0.0.1] (88.193.32.97) by jenni2.rokki.sonera.fi (8.5.014) id 483E832F016EBF65 for grub-devel@gnu.org; Mon, 30 Jun 2008 20:33:34 +0300 Message-ID: <486918F9.2050409@nic.fi> Date: Mon, 30 Jun 2008 20:33:45 +0300 From: =?ISO-8859-1?Q?Vesa_J=E4=E4skel=E4inen?= User-Agent: Thunderbird 2.0.0.14 (Windows/20080421) MIME-Version: 1.0 To: The development of GRUB 2 References: <20080619133147.GA5018@thorin> <485AA89A.5030404@isaac.cedarswampstudios.org> <20080621141907.GC24465@thorin> <1214058907.10018.39.camel@localhost> <20080626140836.GB7511@thorin> <1214493651.24653.10.camel@localhost> <20080629112241.GA2347@thorin> <1214846014.17554.6.camel@dv> In-Reply-To: <1214846014.17554.6.camel@dv> X-Enigmail-Version: 0.95.6 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: Quoted-Printable X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3) Subject: Re: [PATCH] add a counter in grub_dprintf X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jun 2008 17:33:43 -0000 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=EDn wrote: >=20 >>> 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. >=20 > 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. >=20 > 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. >=20 > 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=20 purpose. You would put timed breakpoints, when breakpoint is found, time would be=20 recorded and then execution would be automatically continued. This can=20 be almost fully external to the code being executed.