From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:48657) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UQcRM-000722-VH for qemu-devel@nongnu.org; Fri, 12 Apr 2013 07:46:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UQcRH-0007Ya-Rv for qemu-devel@nongnu.org; Fri, 12 Apr 2013 07:46:48 -0400 Date: Fri, 12 Apr 2013 13:46:40 +0200 From: Stefan Hajnoczi Message-ID: <20130412114640.GI9747@stefanha-thinkpad.redhat.com> References: <1365711706-23960-1-git-send-email-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1365711706-23960-1-git-send-email-peter.maydell@linaro.org> Subject: Re: [Qemu-devel] [Qemu-trivial] [PATCH] cpu-exec: Allow "-d exec" in non-debug builds (drop CONFIG_DEBUG_EXEC) List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: qemu-trivial@nongnu.org, Anthony Liguori , qemu-devel@nongnu.org, patches@linaro.org On Thu, Apr 11, 2013 at 09:21:46PM +0100, Peter Maydell wrote: > The CONFIG_DEBUG_EXEC define compiles out a single qemu_log_mask() > call, which is a pretty trivial cost even for something in the main > cpu_exec() loop. Having this be conditionally defined means that > '-d exec' on a non-debug build will silently do nothing. Drop the > define and the configure machinery that sets it, in favour of just > always allowing this log option to be enabled at runtime. As a > concession to the mainloopiness, we use qemu_loglevel_mask()+qemu_log() > rather than qemu_log_mask() to avoid the function call overhead. > > Note that DEBUG_DISAS is always defined, so removing the > '|| defined(CONFIG_DEBUG_EXEC)' from those conditionals makes > no behavioural change for that logging. > > Signed-off-by: Peter Maydell > --- > I've been burnt at least once by asking a user to do a '-d exec' > log only to find it didn't actually log anything... > > configure | 3 --- > cpu-exec.c | 15 ++++++--------- > 2 files changed, 6 insertions(+), 12 deletions(-) Thanks, applied to the trivial patches tree: https://github.com/stefanha/qemu/commits/trivial-patches Stefan