qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Lluís <xscript@gmx.net>
To: qemu-devel@nongnu.org, chouteau@adacore.com
Cc: stefanha@gmail.com
Subject: [Qemu-devel] [PATCH v7 02/13] trace: [configure] rename CONFIG_*_TRACE into	CONFIG_TRACE_*
Date: Thu, 25 Aug 2011 21:17:44 +0200	[thread overview]
Message-ID: <20110825191744.1413.46163.stgit@ginnungagap.bsc.es> (raw)
In-Reply-To: <20110825191731.1413.26838.stgit@ginnungagap.bsc.es>

Provides a more hierarchical view of the variable domain.

Also adds the CONFIG_TRACE_* variables for all backends.

Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu>
---
 Makefile.target   |    6 +++---
 configure         |   13 +++++++++++--
 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, 27 insertions(+), 18 deletions(-)

diff --git a/Makefile.target b/Makefile.target
index 025d389..d16afa9 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
@@ -411,7 +411,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
 
@@ -422,7 +422,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..c49c080 100755
--- a/configure
+++ b/configure
@@ -3065,15 +3065,24 @@ bsd)
 esac
 
 echo "TRACE_BACKEND=$trace_backend" >> $config_host_mak
+if test "$trace_backend" = "nop"; then
+  echo "CONFIG_TRACE_NOP=y" >> $config_host_mak
+fi
 if test "$trace_backend" = "simple"; then
-  echo "CONFIG_SIMPLE_TRACE=y" >> $config_host_mak
+  echo "CONFIG_TRACE_SIMPLE=y" >> $config_host_mak
 fi
 # Set the appropriate trace file.
 if test "$trace_backend" = "simple"; then
   trace_file="\"$trace_file-\" FMT_pid"
 fi
+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" -a "$trace_backend_stap" = "yes" ; then
-  echo "CONFIG_SYSTEMTAP_TRACE=y" >> $config_host_mak
+  echo "CONFIG_TRACE_SYSTEMTAP=y" >> $config_host_mak
 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 ada51d0..9c6e99c 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 1eb6b9a..4b79103 100644
--- a/qemu-config.c
+++ b/qemu-config.c
@@ -302,7 +302,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",
@@ -516,7 +516,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 d86815d..8a31b4f 100644
--- a/qemu-options.hx
+++ b/qemu-options.hx
@@ -2432,7 +2432,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 <stdbool.h>
 #include <stdio.h>
 
-#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) {

  parent reply	other threads:[~2011-08-25 19:17 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-25 19:17 [Qemu-devel] [PATCH v7 00/13] trace-state: make the behaviour of "disable" consistent across all backends Lluís
2011-08-25 19:17 ` [Qemu-devel] [PATCH v7 01/13] [simple] Include qemu-timer-common.o in trace-obj-y Lluís
2011-08-25 19:17 ` Lluís [this message]
2011-08-25 19:17 ` [Qemu-devel] [PATCH v7 03/13] trace: [make] replace 'ifeq' with values in CONFIG_TRACE_* Lluís
2011-08-31 12:15   ` Stefan Hajnoczi
2011-08-25 19:17 ` [Qemu-devel] [PATCH v7 04/13] trace: move backend-specific code into the trace/ directory Lluís
2011-08-25 19:18 ` [Qemu-devel] [PATCH v7 05/13] trace: avoid conditional code compilation during option parsing Lluís
2011-08-31  9:53   ` Stefan Hajnoczi
2011-08-31 11:43   ` Stefan Hajnoczi
2011-08-25 19:18 ` [Qemu-devel] [PATCH v7 06/13] trace: generalize the "property" concept in the trace-events file Lluís
2011-08-25 19:18 ` [Qemu-devel] [PATCH v7 07/13] trace-state: separate trace event control and query routines from the simple backend Lluís
2011-08-25 19:18 ` [Qemu-devel] [PATCH v7 08/13] trace-state: always compile support for controlling and querying trace event states Lluís
2011-08-31 10:10   ` Stefan Hajnoczi
2011-08-25 19:18 ` [Qemu-devel] [PATCH v7 09/13] trace-state: add "-trace events" argument to control initial state Lluís
2011-08-25 19:18 ` [Qemu-devel] [PATCH v7 10/13] trace-state: always use the "nop" backend on events with the "disable" keyword Lluís
2011-08-25 19:18 ` [Qemu-devel] [PATCH v7 11/13] trace-state: [simple] disable all trace points by default Lluís
2011-08-31 10:21   ` Stefan Hajnoczi
2011-08-25 19:18 ` [Qemu-devel] [PATCH v7 12/13] trace-state: [stderr] add support for dynamically enabling/disabling events Lluís
2011-08-25 19:18 ` [Qemu-devel] [PATCH v7 13/13] trace: enable all events Lluís
2011-08-31  9:54 ` [Qemu-devel] [PATCH v7 00/13] trace-state: make the behaviour of "disable" consistent across all backends Stefan Hajnoczi
2011-08-31 12:17 ` Stefan Hajnoczi
2011-08-31 16:52   ` Lluís

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110825191744.1413.46163.stgit@ginnungagap.bsc.es \
    --to=xscript@gmx.net \
    --cc=chouteau@adacore.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).