From patchwork Thu Sep 1 08:06:14 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Stefan Hajnoczi X-Patchwork-Id: 112830 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 CBA75B6F7C for ; Thu, 1 Sep 2011 18:07:02 +1000 (EST) Received: from localhost ([::1]:60551 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qz2Id-0002iS-NO for incoming@patchwork.ozlabs.org; Thu, 01 Sep 2011 04:06:59 -0400 Received: from eggs.gnu.org ([140.186.70.92]:34680) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qz2IJ-0002Ma-4y for qemu-devel@nongnu.org; Thu, 01 Sep 2011 04:06:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qz2IC-0007Yj-MJ for qemu-devel@nongnu.org; Thu, 01 Sep 2011 04:06:39 -0400 Received: from mtagate1.uk.ibm.com ([194.196.100.161]:56721) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qz2IC-0007Xp-9y for qemu-devel@nongnu.org; Thu, 01 Sep 2011 04:06:32 -0400 Received: from d06nrmr1507.portsmouth.uk.ibm.com (d06nrmr1507.portsmouth.uk.ibm.com [9.149.38.233]) by mtagate1.uk.ibm.com (8.13.1/8.13.1) with ESMTP id p8186UUn005238 for ; Thu, 1 Sep 2011 08:06:30 GMT Received: from d06av09.portsmouth.uk.ibm.com (d06av09.portsmouth.uk.ibm.com [9.149.37.250]) by d06nrmr1507.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id p8186UFq2642002 for ; Thu, 1 Sep 2011 09:06:30 +0100 Received: from d06av09.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av09.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id p8186SfZ020006 for ; Thu, 1 Sep 2011 02:06:29 -0600 Received: from stefanha-thinkpad.manchester-maybrook.uk.ibm.com (dyn-9-174-219-30.manchester-maybrook.uk.ibm.com [9.174.219.30]) by d06av09.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id p8186RXO019938; Thu, 1 Sep 2011 02:06:28 -0600 From: Stefan Hajnoczi To: Date: Thu, 1 Sep 2011 09:06:14 +0100 Message-Id: <1314864386-14202-4-git-send-email-stefanha@linux.vnet.ibm.com> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: <1314864386-14202-1-git-send-email-stefanha@linux.vnet.ibm.com> References: <1314864386-14202-1-git-send-email-stefanha@linux.vnet.ibm.com> MIME-Version: 1.0 X-MIME-Autoconverted: from 8bit to quoted-printable by mtagate1.uk.ibm.com id p8186UUn005238 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Received-From: 194.196.100.161 Cc: Anthony Liguori , =?UTF-8?q?Llu=C3=ADs?= , Stefan Hajnoczi , =?UTF-8?q?Llu=C3=ADs=20Vilanova?= Subject: [Qemu-devel] [PATCH 03/15] trace: [configure] rename CONFIG_*_TRACE into CONFIG_TRACE_* 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 From: Lluís Provides a more hierarchical view of the variable domain. Also adds the CONFIG_TRACE_* variables for all backends. [Stefan added missing 'test' in stap if statement] Signed-off-by: Lluís Vilanova Signed-off-by: Stefan Hajnoczi --- Makefile.target | 6 +++--- configure | 20 +++++++++++++++----- hmp-commands.hx | 4 ++-- monitor.c | 8 ++++---- qemu-config.c | 4 ++-- qemu-options.hx | 2 +- simpletrace.h | 4 ++-- tests/test_path.c | 2 +- vl.c | 2 +- 9 files changed, 31 insertions(+), 21 deletions(-) diff --git a/Makefile.target b/Makefile.target index 62ddfc9..25c16d7 100644 --- a/Makefile.target +++ b/Makefile.target @@ -44,7 +44,7 @@ endif config-target.h: config-target.h-timestamp config-target.h-timestamp: config-target.mak -ifdef CONFIG_SYSTEMTAP_TRACE +ifdef CONFIG_TRACE_SYSTEMTAP stap: $(QEMU_PROG).stp ifdef CONFIG_USER_ONLY @@ -414,7 +414,7 @@ clean: rm -f *.o *.a *~ $(PROGS) nwfpe/*.o fpu/*.o rm -f *.d */*.d tcg/*.o ide/*.o 9pfs/*.o rm -f hmp-commands.h qmp-commands.h gdbstub-xml.c -ifdef CONFIG_SYSTEMTAP_TRACE +ifdef CONFIG_TRACE_SYSTEMTAP rm -f *.stp endif @@ -425,7 +425,7 @@ ifneq ($(STRIP),) $(STRIP) $(patsubst %,"$(DESTDIR)$(bindir)/%",$(PROGS)) endif endif -ifdef CONFIG_SYSTEMTAP_TRACE +ifdef CONFIG_TRACE_SYSTEMTAP $(INSTALL_DIR) "$(DESTDIR)$(datadir)/../systemtap/tapset" $(INSTALL_DATA) $(QEMU_PROG).stp "$(DESTDIR)$(datadir)/../systemtap/tapset" endif diff --git a/configure b/configure index 1340c33..ebf14ee 100755 --- a/configure +++ b/configure @@ -3065,15 +3065,25 @@ bsd) esac echo "TRACE_BACKEND=$trace_backend" >> $config_host_mak -if test "$trace_backend" = "simple"; then - echo "CONFIG_SIMPLE_TRACE=y" >> $config_host_mak +if test "$trace_backend" = "nop"; then + echo "CONFIG_TRACE_NOP=y" >> $config_host_mak fi -# Set the appropriate trace file. if test "$trace_backend" = "simple"; then + echo "CONFIG_TRACE_SIMPLE=y" >> $config_host_mak + # Set the appropriate trace file. trace_file="\"$trace_file-\" FMT_pid" fi -if test "$trace_backend" = "dtrace" -a "$trace_backend_stap" = "yes" ; then - echo "CONFIG_SYSTEMTAP_TRACE=y" >> $config_host_mak +if test "$trace_backend" = "stderr"; then + echo "CONFIG_TRACE_STDERR=y" >> $config_host_mak +fi +if test "$trace_backend" = "ust"; then + echo "CONFIG_TRACE_UST=y" >> $config_host_mak +fi +if test "$trace_backend" = "dtrace"; then + echo "CONFIG_TRACE_DTRACE=y" >> $config_host_mak + if test "$trace_backend_stap" = "yes" ; then + echo "CONFIG_TRACE_SYSTEMTAP=y" >> $config_host_mak + fi fi echo "CONFIG_TRACE_FILE=$trace_file" >> $config_host_mak diff --git a/hmp-commands.hx b/hmp-commands.hx index 0ccfb28..ad4174f 100644 --- a/hmp-commands.hx +++ b/hmp-commands.hx @@ -180,7 +180,7 @@ STEXI Output logs to @var{filename}. ETEXI -#ifdef CONFIG_SIMPLE_TRACE +#ifdef CONFIG_TRACE_SIMPLE { .name = "trace-event", .args_type = "name:s,option:b", @@ -1354,7 +1354,7 @@ show roms @end table ETEXI -#ifdef CONFIG_SIMPLE_TRACE +#ifdef CONFIG_TRACE_SIMPLE STEXI @item info trace show contents of trace buffer diff --git a/monitor.c b/monitor.c index 04f465a..935aa33 100644 --- a/monitor.c +++ b/monitor.c @@ -57,7 +57,7 @@ #include "json-parser.h" #include "osdep.h" #include "cpu.h" -#ifdef CONFIG_SIMPLE_TRACE +#ifdef CONFIG_TRACE_SIMPLE #include "trace.h" #endif #include "ui/qemu-spice.h" @@ -592,7 +592,7 @@ static void do_help_cmd(Monitor *mon, const QDict *qdict) help_cmd(mon, qdict_get_try_str(qdict, "name")); } -#ifdef CONFIG_SIMPLE_TRACE +#ifdef CONFIG_TRACE_SIMPLE static void do_change_trace_event_state(Monitor *mon, const QDict *qdict) { const char *tp_name = qdict_get_str(qdict, "name"); @@ -996,7 +996,7 @@ static void do_info_cpu_stats(Monitor *mon) } #endif -#if defined(CONFIG_SIMPLE_TRACE) +#if defined(CONFIG_TRACE_SIMPLE) static void do_info_trace(Monitor *mon) { st_print_trace((FILE *)mon, &monitor_fprintf); @@ -3135,7 +3135,7 @@ static const mon_cmd_t info_cmds[] = { .help = "show roms", .mhandler.info = do_info_roms, }, -#if defined(CONFIG_SIMPLE_TRACE) +#if defined(CONFIG_TRACE_SIMPLE) { .name = "trace", .args_type = "", diff --git a/qemu-config.c b/qemu-config.c index 139e077..b64edc9 100644 --- a/qemu-config.c +++ b/qemu-config.c @@ -303,7 +303,7 @@ static QemuOptsList qemu_mon_opts = { }, }; -#ifdef CONFIG_SIMPLE_TRACE +#ifdef CONFIG_TRACE_SIMPLE static QemuOptsList qemu_trace_opts = { .name = "trace", .implied_opt_name = "trace", @@ -517,7 +517,7 @@ static QemuOptsList *vm_config_groups[32] = { &qemu_global_opts, &qemu_mon_opts, &qemu_cpudef_opts, -#ifdef CONFIG_SIMPLE_TRACE +#ifdef CONFIG_TRACE_SIMPLE &qemu_trace_opts, #endif &qemu_option_rom_opts, diff --git a/qemu-options.hx b/qemu-options.hx index 35d95d1..dcb00b7 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -2436,7 +2436,7 @@ Normally QEMU loads a configuration file from @var{sysconfdir}/qemu.conf and @var{sysconfdir}/target-@var{ARCH}.conf on startup. The @code{-nodefconfig} option will prevent QEMU from loading these configuration files at startup. ETEXI -#ifdef CONFIG_SIMPLE_TRACE +#ifdef CONFIG_TRACE_SIMPLE DEF("trace", HAS_ARG, QEMU_OPTION_trace, "-trace\n" " Specify a trace file to log traces to\n", diff --git a/simpletrace.h b/simpletrace.h index 8d893bd..507dd87 100644 --- a/simpletrace.h +++ b/simpletrace.h @@ -15,7 +15,7 @@ #include #include -#ifdef CONFIG_SIMPLE_TRACE +#ifdef CONFIG_TRACE_SIMPLE typedef uint64_t TraceEventID; typedef struct { @@ -43,6 +43,6 @@ static inline bool st_init(const char *file) { return true; } -#endif /* !CONFIG_SIMPLE_TRACE */ +#endif /* !CONFIG_TRACE_SIMPLE */ #endif /* SIMPLETRACE_H */ diff --git a/tests/test_path.c b/tests/test_path.c index 234ed97..7265a94 100644 --- a/tests/test_path.c +++ b/tests/test_path.c @@ -4,7 +4,7 @@ #include "../cutils.c" #include "../path.c" #include "../trace.c" -#ifdef CONFIG_SIMPLE_TRACE +#ifdef CONFIG_TRACE_SIMPLE #include "../simpletrace.c" #endif diff --git a/vl.c b/vl.c index 9cd67a3..8c7aaaa 100644 --- a/vl.c +++ b/vl.c @@ -2928,7 +2928,7 @@ int main(int argc, char **argv, char **envp) } xen_mode = XEN_ATTACH; break; -#ifdef CONFIG_SIMPLE_TRACE +#ifdef CONFIG_TRACE_SIMPLE case QEMU_OPTION_trace: opts = qemu_opts_parse(qemu_find_opts("trace"), optarg, 0); if (opts) {