From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LBGTm-0004AN-KT for qemu-devel@nongnu.org; Fri, 12 Dec 2008 17:27:26 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LBGTm-0004A7-28 for qemu-devel@nongnu.org; Fri, 12 Dec 2008 17:27:26 -0500 Received: from [199.232.76.173] (port=50142 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LBGTl-0004A4-W7 for qemu-devel@nongnu.org; Fri, 12 Dec 2008 17:27:26 -0500 Received: from mx2.redhat.com ([66.187.237.31]:44869) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LBGTl-0006C7-LA for qemu-devel@nongnu.org; Fri, 12 Dec 2008 17:27:25 -0500 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id mBCMROZv014958 for ; Fri, 12 Dec 2008 17:27:24 -0500 Message-ID: <4942E55B.6080507@redhat.com> Date: Sat, 13 Dec 2008 00:27:39 +0200 From: Dor Laor MIME-Version: 1.0 Subject: Re: [Qemu-devel] [RFC PATCH 0/2] Eliminate references to logfile/loglevel global vars References: <1229117060-8467-1-git-send-email-ehabkost@redhat.com> In-Reply-To: <1229117060-8467-1-git-send-email-ehabkost@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Reply-To: dlaor@redhat.com, qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Eduardo Habkost Eduardo Habkost wrote: > Hi, > > This is actually a long 63-patch series, but for a first request for comments, > I am splitting it in two parts: > > 1) A set of macros are introduced for almost all usage patterns of the > logfile/loglevel global variables. > 2) 62 patches that convert almost all references to the logfile/loglevel > global variables to use those macros (the PATCH 1/2 e-mail actually > has pointers to the patches, either as small individual patches, > or as a big single patch file). > > These macros are _not_ a proposal for a definitive new logging API. They > are just a step for it: a way to group all usage patterns of the > logfile/loglevel variables on a single place. After all usage of those > variables is eliminated, we can more easily refactor the code to have > a proper logging API. > > This series needs my previous debugging-#ifdef cleanup series to be applied > before it. > > It shouldn't change any qemu behavior, but just move all references > to the logging global variables to a single place, keeping exactly the > same behaviour. > > It is a blessed addition. What about providing configure option to enable all the debug #ifdef? Once we have it, we can set the debug level using the monitor for all debug targets. For kvm is shouldn't introduce a measurable overhead since it mostly uses the device model. It will be also ease debugging qemu when there is no clue about the root cause it hard to predict at compile time. We can have something like ./configure --full-debug and #ifdef (FULL_DEBUG || DEBUG_IO_PORTS) for example.