Received: from [140.186.70.92] (port=52656 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q7aYQ-00068Y-Qf for qemu-devel@nongnu.org; Wed, 06 Apr 2011 17:46:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q7aYP-0006fv-NF for qemu-devel@nongnu.org; Wed, 06 Apr 2011 17:46:22 -0400 Received: from mailout-de.gmx.net ([213.165.64.23]:33419) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1Q7aYP-0006fX-9t for qemu-devel@nongnu.org; Wed, 06 Apr 2011 17:46:21 -0400 From: =?utf-8?Q?Llu=C3=ADs?= Subject: Re: [Qemu-devel] Re: [PATCH 5/6] trace-state: [simple] add "-trace events" argument to control initial state References: <20110404214900.9761.49418.stgit@ginnungagap.bsc.es> <20110404214933.9761.62154.stgit@ginnungagap.bsc.es> <874o6bbh4j.fsf@ginnungagap.bsc.es> Date: Wed, 06 Apr 2011 23:45:14 +0200 In-Reply-To: (Stefan Hajnoczi's message of "Wed, 6 Apr 2011 21:30:58 +0100") Message-ID: <87oc4j3vh1.fsf@ginnungagap.bsc.es> MIME-Version: 1.0 Content-Type: text/plain List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: qemu-devel@nongnu.org Stefan Hajnoczi writes: >> Hmmm... why don't simply conditionally call st_init (put it into an >> #ifdef) and remove the "#else" in simpletrace.h. >> >> I've looked at it and it's not called from anywhere else. > The benefit to stubbing out these functions is that callers don't have > #ifdefs. And caller code is always built (i.e. syntax checked by the > parser) so it helps avoid bitrot. vl.c:main() is already a long and > ugly function so it would be nice to avoid #ifdefs there. Aaah... well, I simply moved everything into ifdefs in v2, as the stderr additions also made use of the same function names but deleted the '#include "simpletrace.h"' in vl.c (as it's already in trace.h when such backend is enabled). Do you want it back? >> This also reminds me that I didn't see any "-trace" option parsing in >> the OS-specific frontends (at least in linux-user). > User emulation does not have any way to control simpletrace today. Well I was referring more to the lack of a common option parsing loop on all frontends, as I expected all of them to use hxtool. Lluis -- "And it's much the same thing with knowledge, for whenever you learn something new, the whole world becomes that much richer." -- The Princess of Pure Reason, as told by Norton Juster in The Phantom Tollbooth