From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1KA3wG-0001hJ-Kv for mharc-grub-devel@gnu.org; Sat, 21 Jun 2008 10:19:36 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KA3wE-0001eg-Sm for grub-devel@gnu.org; Sat, 21 Jun 2008 10:19:34 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KA3wE-0001eD-B4 for grub-devel@gnu.org; Sat, 21 Jun 2008 10:19:34 -0400 Received: from [199.232.76.173] (port=45379 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KA3wE-0001e2-5r for grub-devel@gnu.org; Sat, 21 Jun 2008 10:19:34 -0400 Received: from aybabtu.com ([69.60.117.155]:56231) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KA3wD-0003KN-PK for grub-devel@gnu.org; Sat, 21 Jun 2008 10:19:33 -0400 Received: from [192.168.10.10] (helo=thorin) by aybabtu.com with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1KA3tX-0003Ia-4u for grub-devel@gnu.org; Sat, 21 Jun 2008 16:16:47 +0200 Received: from rmh by thorin with local (Exim 4.63) (envelope-from ) id 1KA3vn-0006SU-DE for grub-devel@gnu.org; Sat, 21 Jun 2008 16:19:07 +0200 Date: Sat, 21 Jun 2008 16:19:07 +0200 From: Robert Millan To: The development of GRUB 2 Message-ID: <20080621141907.GC24465@thorin> References: <20080619133147.GA5018@thorin> <485AA89A.5030404@isaac.cedarswampstudios.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <485AA89A.5030404@isaac.cedarswampstudios.org> Organization: free as in freedom X-Message-Flag: Worried about Outlook viruses? Switch to Thunderbird! www.mozilla.com/thunderbird X-Debbugs-No-Ack: true User-Agent: Mutt/1.5.13 (2006-08-11) X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized. 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: Sat, 21 Jun 2008 14:19:35 -0000 On Thu, Jun 19, 2008 at 02:42:34PM -0400, Isaac Dupree wrote: > Robert Millan wrote: > >How about adding a counter to grub_dprintf to make it easy to instrument > >GRUB and find which are the bottlenecks in boot time? > > > >Sidenote: perhaps it'd be a good idea to conditionalize all grub_dprintf > >calls with #ifdef DEBUG to obtain a smaller core.img. It's not hard to > >ask a user to rebuild if dprintf is needed, > > Are the dprintf's useful for users' debugging, not just debugging GRUB > bugs? If it is, I'm not sure... If I accidentally broke something on my > disk so that the core image couldn't find the modules/configuration, > then it might be a little hard to rebuild grub and reinstall on that > machine. Obviously I'll be able to, somehow, if my computer isn't > completely hosed, but I'd rather be able to search for debugging > information I recorded ASAP so I need fewer iterations of nuisance for > myself. Perhaps a minor issue. dprintf can be useful for debugging, but not for fixing the problem (except maybe in very rare situations). So if your system can't boot, it's not going to change much. Most users won't know about grub_dprintf untill they're told to use it to send a debug trace; so in a typical situation they would still have to boot their system somehow, in order to send us a bug report. 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. -- Robert Millan I know my rights; I want my phone call! What good is a phone call… if you are unable to speak? (as seen on /.)