From patchwork Tue May 3 19:31:06 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?Q?Llu=C3=ADs?= X-Patchwork-Id: 93885 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 6A2B61007D1 for ; Wed, 4 May 2011 05:30:51 +1000 (EST) Received: from localhost ([::1]:53493 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QHLJ2-0003pt-P8 for incoming@patchwork.ozlabs.org; Tue, 03 May 2011 15:30:48 -0400 Received: from eggs.gnu.org ([140.186.70.92]:34184) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QHLIu-0003pf-OA for qemu-devel@nongnu.org; Tue, 03 May 2011 15:30:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QHLIt-000324-BS for qemu-devel@nongnu.org; Tue, 03 May 2011 15:30:40 -0400 Received: from mailout-de.gmx.net ([213.165.64.22]:34403) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1QHLIs-00031B-QI for qemu-devel@nongnu.org; Tue, 03 May 2011 15:30:39 -0400 Received: (qmail invoked by alias); 03 May 2011 19:30:36 -0000 Received: from unknown (EHLO localhost) [84.88.53.92] by mail.gmx.net (mp030) with SMTP; 03 May 2011 21:30:36 +0200 X-Authenticated: #12333383 X-Provags-ID: V01U2FsdGVkX1/zSidda9bzxiXKG0O5fbp7aVBX1iuvnpxWjjhzHA lpOG0D56MwdZu0 From: =?utf-8?Q?Llu=C3=ADs?= To: qemu-devel@nongnu.org References: <20110502131131.24596.1053.stgit@ginnungagap.bsc.es> <20110502131250.24596.40176.stgit@ginnungagap.bsc.es> User-Agent: StGit/0.15 Mail-Followup-To: qemu-devel@nongnu.org, stefanha@gmail.com, chouteau@adacore.com Date: Tue, 03 May 2011 21:31:06 +0200 In-Reply-To: <20110502131250.24596.40176.stgit@ginnungagap.bsc.es> (=?utf-8?Q?=22Llu=C3=ADs=22's?= message of "Mon, 02 May 2011 15:12:50 +0200") Message-ID: <87ei4fmvid.fsf_-_@ginnungagap.bsc.es> MIME-Version: 1.0 X-Y-GMX-Trusted: 0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 213.165.64.22 Cc: stefanha@gmail.com, chouteau@adacore.com Subject: Re: [Qemu-devel] [PATCH v3 09/10] trace-state: [stderr] add support for dynamically enabling/disabling events X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Uses the generic interface provided in "trace/control.h" in order to provide a programmatic interface as well as command line and monitor controls. Signed-off-by: Fabien Chouteau Signed-off-by: LluĂ­s Vilanova --- configure | 3 +++ docs/tracing.txt | 5 ----- scripts/tracetool | 33 ++++++++++++++++++++++++++++----- trace/control.c | 4 ++-- trace/stderr.h | 11 +++++++++++ 5 files changed, 44 insertions(+), 12 deletions(-) create mode 100644 trace/stderr.h diff --git a/configure b/configure index fef7d35..b4f050d 100755 --- a/configure +++ b/configure @@ -2950,6 +2950,9 @@ if test "$trace_backend" = "nop"; then elif test "$trace_backend" = "simple"; then echo "CONFIG_SIMPLE_TRACE=y" >> $config_host_mak fi +if test "$trace_backend" = "stderr"; then + echo "CONFIG_STDERR_TRACE=y" >> $config_host_mak +fi # Set the appropriate trace file. if test "$trace_backend" = "simple"; then trace_file="\"$trace_file-%u\"" diff --git a/docs/tracing.txt b/docs/tracing.txt index c443171..9c17497 100644 --- a/docs/tracing.txt +++ b/docs/tracing.txt @@ -163,11 +163,6 @@ effectively turns trace events into debug printfs. This is the simplest backend and can be used together with existing code that uses DPRINTF(). -Note that with this backend trace events cannot be programmatically -enabled/disabled. Thus, in order to trim down the amount of output and the -performance impact of tracing, you might want to add the "disable" property in -the "trace-events" file for those events you are not interested in. - === Simpletrace === The "simple" backend supports common use cases and comes as part of the QEMU diff --git a/scripts/tracetool b/scripts/tracetool index c740080..743d246 100755 --- a/scripts/tracetool +++ b/scripts/tracetool @@ -241,7 +241,12 @@ linetoh_begin_stderr() { cat < +#include "trace/stderr.h" + +extern TraceEvent trace_list[]; EOF + + stderr_event_num=0 } linetoh_stderr() @@ -260,29 +265,47 @@ linetoh_stderr() cat <