Received: from eggs.gnu.org ([140.186.70.92]:60036) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QHcsc-0000HH-Cu for qemu-devel@nongnu.org; Wed, 04 May 2011 10:16:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QHcsW-0006vp-CQ for qemu-devel@nongnu.org; Wed, 04 May 2011 10:16:42 -0400 Received: from mailout-de.gmx.net ([213.165.64.22]:57071) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1QHcsV-0006vk-UR for qemu-devel@nongnu.org; Wed, 04 May 2011 10:16:36 -0400 From: =?utf-8?Q?Llu=C3=ADs?= References: <20110503204042.438.2257.stgit@ginnungagap.bsc.es> <20110503204144.438.98949.stgit@ginnungagap.bsc.es> Date: Wed, 04 May 2011 16:17:03 +0200 In-Reply-To: <20110503204144.438.98949.stgit@ginnungagap.bsc.es> (=?utf-8?Q?=22Llu=C3=ADs=22's?= message of "Tue, 03 May 2011 22:41:45 +0200") Message-ID: <87liymim8w.fsf_-_@ginnungagap.bsc.es> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PATCH v4 09/10] trace-state: [stderr] add support for dynamically enabling/disabling events List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: stefanha@gmail.com, chouteau@adacore.com Re-send patch with added minor fix. 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=C3=ADs 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..1da2df4 100755 --- a/configure +++ b/configure @@ -2950,6 +2950,9 @@ if test "$trace_backend" =3D "nop"; then elif test "$trace_backend" =3D "simple"; then echo "CONFIG_SIMPLE_TRACE=3Dy" >> $config_host_mak fi +if test "$trace_backend" =3D "stderr"; then + echo "CONFIG_TRACE_STDERR=3Dy" >> $config_host_mak +fi # Set the appropriate trace file. if test "$trace_backend" =3D "simple"; then trace_file=3D"\"$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 t= hat uses DPRINTF(). =20 -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" propert= y in -the "trace-events" file for those events you are not interested in. - =3D=3D=3D Simpletrace =3D=3D=3D =20 The "simple" backend supports common use cases and comes as part of the QE= MU 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=3D0 } =20 linetoh_stderr() @@ -260,29 +265,47 @@ linetoh_stderr() cat <