qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [RFC v2] [PATCH 0/3] Monitor Support for 'simple' trace backend
@ 2010-06-10 19:08 Prerna Saxena
  2010-06-10 19:15 ` [Qemu-devel] [RFC v2] [PATCH 1/3] Export tdb_hash() Prerna Saxena
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Prerna Saxena @ 2010-06-10 19:08 UTC (permalink / raw)
  To: qemu-devel
  Cc: Anthony Liguori, Stefan Hajnoczi, kvm, Jan Kiszka,
	Luiz Capitulino, maneesh, ananth

This is v2 of monitor commands based on Stefan's trace framework :
( http://lists.gnu.org/archive/html/qemu-devel/2010-05/msg02407.html )

This adds the following monitor commands for the 'simple' backend:
- info trace 		: to view current contents of the trace buffer.
- info tracepoints 	: to view all available tracepoints and their 
			  state.
- tracepoint NAME on|off: to enable/disable the logging of data from 
			  tracepoint 'NAME'.


Changelog :
- Command 'info trace' is used to view current contents of buffer, in 
place of 'trace'.
- Cleanups

-- 
Prerna Saxena

Linux Technology Centre,
IBM Systems and Technology Lab,
Bangalore, India

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Qemu-devel] [RFC v2] [PATCH 1/3] Export tdb_hash()
  2010-06-10 19:08 [Qemu-devel] [RFC v2] [PATCH 0/3] Monitor Support for 'simple' trace backend Prerna Saxena
@ 2010-06-10 19:15 ` Prerna Saxena
  2010-06-11 17:54   ` [Qemu-devel] " Luiz Capitulino
  2010-06-10 19:20 ` [Qemu-devel] [RFC v2] [PATCH 2/3] Monitor command 'info trace' Prerna Saxena
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 8+ messages in thread
From: Prerna Saxena @ 2010-06-10 19:15 UTC (permalink / raw)
  To: qemu-devel
  Cc: Anthony Liguori, Stefan Hajnoczi, kvm, Jan Kiszka,
	Luiz Capitulino, maneesh, ananth

For now, I simply export tdb_hash() from qdict.h for use by tracing 
framework.
Luiz suggested renaming and exporting it from a location other than 
qdict.h . Would "qemu-common.h" be a better place?


Signed-off-by: Prerna Saxena <prerna@linux.vnet.ibm.com>
---
 qdict.c |    2 +-
 qdict.h |    2 ++
 2 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/qdict.c b/qdict.c
index 175bc17..5261872 100644
--- a/qdict.c
+++ b/qdict.c
@@ -56,7 +56,7 @@ QDict *qobject_to_qdict(const QObject *obj)
  * tdb_hash(): based on the hash agorithm from gdbm, via tdb
  * (from module-init-tools)
  */
-static unsigned int tdb_hash(const char *name)
+unsigned int tdb_hash(const char *name)
 {
     unsigned value;	/* Used to compute the hash value.  */
     unsigned   i;	/* Used to cycle through random values. */
diff --git a/qdict.h b/qdict.h
index 5e5902c..d221c18 100644
--- a/qdict.h
+++ b/qdict.h
@@ -59,4 +59,6 @@ int64_t qdict_get_try_int(const QDict *qdict, const char *key,
                           int64_t err_value);
 const char *qdict_get_try_str(const QDict *qdict, const char *key);
 
+/* Export tdb_hash() for use by trace framework */
+unsigned int tdb_hash(const char *name);
 #endif /* QDICT_H */
-- 
1.6.2.5



-- 
Prerna Saxena

Linux Technology Centre,
IBM Systems and Technology Lab,
Bangalore, India

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [Qemu-devel] [RFC v2] [PATCH 2/3] Monitor command 'info trace'
  2010-06-10 19:08 [Qemu-devel] [RFC v2] [PATCH 0/3] Monitor Support for 'simple' trace backend Prerna Saxena
  2010-06-10 19:15 ` [Qemu-devel] [RFC v2] [PATCH 1/3] Export tdb_hash() Prerna Saxena
@ 2010-06-10 19:20 ` Prerna Saxena
  2010-06-10 19:24 ` [Qemu-devel] [RFC v2] [PATCH 3/3] Toggle tracepoint state Prerna Saxena
  2010-06-11 11:42 ` [Qemu-devel] [RFC v2] [PATCH 0/3] Monitor Support for 'simple' trace backend Markus Armbruster
  3 siblings, 0 replies; 8+ messages in thread
From: Prerna Saxena @ 2010-06-10 19:20 UTC (permalink / raw)
  To: qemu-devel
  Cc: Anthony Liguori, Stefan Hajnoczi, kvm, Jan Kiszka,
	Luiz Capitulino, maneesh, ananth

This introduces the monitor command 'info trace' to display current 
contents of trace buffer.

Signed-off-by: Prerna Saxena <prerna@linux.vnet.ibm.com>
---
 configure       |    3 +++
 monitor.c       |   12 ++++++++++++
 qemu-monitor.hx |    4 ++++
 simpletrace.c   |   12 ++++++++++++
 tracetool       |    2 ++
 5 files changed, 33 insertions(+), 0 deletions(-)

diff --git a/configure b/configure
index 675d0fc..56af8dd 100755
--- a/configure
+++ b/configure
@@ -2302,6 +2302,9 @@ bsd)
 esac
 
 echo "TRACE_BACKEND=$trace_backend" >> $config_host_mak
+if test "$trace_backend" = "simple"; then
+  echo "CONFIG_SIMPLE_TRACE=y" >> $config_host_mak
+fi
 if test "$trace_backend" = "ust"; then
   LIBS="-lust $LIBS"
 fi
diff --git a/monitor.c b/monitor.c
index ad50f12..8b60830 100644
--- a/monitor.c
+++ b/monitor.c
@@ -55,6 +55,9 @@
 #include "json-streamer.h"
 #include "json-parser.h"
 #include "osdep.h"
+#ifdef CONFIG_SIMPLE_TRACE
+#include "trace.h"
+#endif
 
 //#define DEBUG
 //#define DEBUG_COMPLETION
@@ -2780,6 +2783,15 @@ static const mon_cmd_t info_cmds[] = {
         .help       = "show roms",
         .mhandler.info = do_info_roms,
     },
+#if defined(CONFIG_SIMPLE_TRACE)
+    {
+        .name       = "trace",
+        .args_type  = "",
+        .params     = "",
+        .help       = "show current contents of trace buffer",
+        .mhandler.info = do_info_trace,
+    },
+#endif
     {
         .name       = NULL,
     },
diff --git a/qemu-monitor.hx b/qemu-monitor.hx
index b6e3467..766c30f 100644
--- a/qemu-monitor.hx
+++ b/qemu-monitor.hx
@@ -114,6 +114,10 @@ show migration status
 show balloon information
 @item info qtree
 show device tree
+#ifdef CONFIG_SIMPLE_TRACE
+@item info trace
+show contents of trace buffer
+#endif
 @end table
 ETEXI
 
diff --git a/simpletrace.c b/simpletrace.c
index 2fec4d3..00df45a 100644
--- a/simpletrace.c
+++ b/simpletrace.c
@@ -62,3 +62,15 @@ void trace4(TraceEvent event, unsigned long x1, unsigned long x2, unsigned long
 void trace5(TraceEvent event, unsigned long x1, unsigned long x2, unsigned long x3, unsigned long x4, unsigned long x5) {
     trace(event, x1, x2, x3, x4, x5);
 }
+
+void do_info_trace(Monitor *mon)
+{
+    unsigned int i, max_idx;
+
+    max_idx = trace_idx ? trace_idx : TRACE_BUF_LEN;
+
+    for (i=0; i<max_idx ;i++)
+        monitor_printf(mon, "Event %ld : %ld %ld %ld %ld %ld\n",
+                          trace_buf[i].event, trace_buf[i].x1, trace_buf[i].x2,
+                            trace_buf[i].x3, trace_buf[i].x4, trace_buf[i].x5);
+}
diff --git a/tracetool b/tracetool
index 9ea9c08..2c73bab 100755
--- a/tracetool
+++ b/tracetool
@@ -130,6 +130,7 @@ void trace2(TraceEvent event, unsigned long x1, unsigned long x2);
 void trace3(TraceEvent event, unsigned long x1, unsigned long x2, unsigned long x3);
 void trace4(TraceEvent event, unsigned long x1, unsigned long x2, unsigned long x3, unsigned long x4);
 void trace5(TraceEvent event, unsigned long x1, unsigned long x2, unsigned long x3, unsigned long x4, unsigned long x5);
+void do_info_trace(Monitor *mon);
 EOF
 
     simple_event_num=0
@@ -289,6 +290,7 @@ tracetoh()
 #define TRACE_H
 
 #include "qemu-common.h"
+#include "monitor.h"
 EOF
     convert h
     echo "#endif /* TRACE_H */"
-- 
1.6.2.5



-- 
Prerna Saxena

Linux Technology Centre,
IBM Systems and Technology Lab,
Bangalore, India

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [Qemu-devel] [RFC v2] [PATCH 3/3] Toggle tracepoint state
  2010-06-10 19:08 [Qemu-devel] [RFC v2] [PATCH 0/3] Monitor Support for 'simple' trace backend Prerna Saxena
  2010-06-10 19:15 ` [Qemu-devel] [RFC v2] [PATCH 1/3] Export tdb_hash() Prerna Saxena
  2010-06-10 19:20 ` [Qemu-devel] [RFC v2] [PATCH 2/3] Monitor command 'info trace' Prerna Saxena
@ 2010-06-10 19:24 ` Prerna Saxena
  2010-06-11 11:42 ` [Qemu-devel] [RFC v2] [PATCH 0/3] Monitor Support for 'simple' trace backend Markus Armbruster
  3 siblings, 0 replies; 8+ messages in thread
From: Prerna Saxena @ 2010-06-10 19:24 UTC (permalink / raw)
  To: qemu-devel
  Cc: Anthony Liguori, Stefan Hajnoczi, kvm, Jan Kiszka,
	Luiz Capitulino, maneesh, ananth

This patch adds support for dynamically enabling/disabling of tracepoints.
Monitor commands added :
1) info tracepoints 		: to view all available tracepoints and 
				  their state.
2) tracepoint NAME on|off 	: to enable/disable data logging from a 
				  given tracepoint.
				  Eg, tracepoint paio_submit off 
				  	disables logging of data when 
					paio_submit is hit.

For now it is a simple comparison, I'm exploring optimizations that can 
be employed to make this faster.

Signed-off-by: Prerna Saxena <prerna@linux.vnet.ibm.com>
---
 monitor.c       |   16 +++++++++++++++-
 qemu-monitor.hx |   18 ++++++++++++++++++
 simpletrace.c   |   53 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 tracetool       |   30 ++++++++++++++++++++++++++----
 vl.c            |    6 ++++++
 5 files changed, 118 insertions(+), 5 deletions(-)

diff --git a/monitor.c b/monitor.c
index 8b60830..e4c7bef 100644
--- a/monitor.c
+++ b/monitor.c
@@ -547,7 +547,14 @@ static void do_commit(Monitor *mon, const QDict *qdict)
         bdrv_commit(dinfo->bdrv);
     }
 }
-
+#ifdef CONFIG_SIMPLE_TRACE
+static void do_change_tracepoint_state(Monitor *mon, const QDict *qdict)
+{
+    const char *tp_name = qdict_get_str(qdict, "name");
+    bool new_state = qdict_get_bool(qdict, "option");
+    change_tracepoint_state(tp_name, new_state);
+}
+#endif
 static void user_monitor_complete(void *opaque, QObject *ret_data)
 {
     MonitorCompletionData *data = (MonitorCompletionData *)opaque; 
@@ -2791,6 +2798,13 @@ static const mon_cmd_t info_cmds[] = {
         .help       = "show current contents of trace buffer",
         .mhandler.info = do_info_trace,
     },
+    {
+        .name       = "tracepoints",
+        .args_type  = "",
+        .params     = "",
+        .help       = "show available tracepoints & their state",
+        .mhandler.info = do_info_all_tracepoints,
+    },
 #endif
     {
         .name       = NULL,
diff --git a/qemu-monitor.hx b/qemu-monitor.hx
index 766c30f..8540b8f 100644
--- a/qemu-monitor.hx
+++ b/qemu-monitor.hx
@@ -117,6 +117,8 @@ show device tree
 #ifdef CONFIG_SIMPLE_TRACE
 @item info trace
 show contents of trace buffer
+@item info tracepoints
+show available tracepoints and their state
 #endif
 @end table
 ETEXI
@@ -225,6 +227,22 @@ STEXI
 @item logfile @var{filename}
 @findex logfile
 Output logs to @var{filename}.
+#ifdef CONFIG_SIMPLE_TRACE
+ETEXI
+
+    {
+        .name       = "tracepoint",
+        .args_type  = "name:s,option:b",
+        .params     = "name on|off",
+        .help       = "changes status of a specific tracepoint",
+        .mhandler.cmd = do_change_tracepoint_state,
+    },
+
+STEXI
+@item tracepoint
+@findex tracepoint
+changes status of a tracepoint
+#endif
 ETEXI
 
     {
diff --git a/simpletrace.c b/simpletrace.c
index 00df45a..b601d24 100644
--- a/simpletrace.c
+++ b/simpletrace.c
@@ -3,6 +3,12 @@
 #include "trace.h"
 
 typedef struct {
+    char *tp_name;
+    bool state;
+    unsigned int hash;
+} Tracepoint;
+
+typedef struct {
     unsigned long event;
     unsigned long x1;
     unsigned long x2;
@@ -18,10 +24,24 @@ enum {
 static TraceRecord trace_buf[TRACE_BUF_LEN];
 static unsigned int trace_idx;
 static FILE *trace_fp;
+static Tracepoint trace_list[NR_TRACEPOINTS];
+
+void init_tracepoint(const char *tname, TraceEvent tevent) {
+    if (!tname || tevent > NR_TRACEPOINTS)
+        return;
+
+    trace_list[tevent].tp_name = (char*)qemu_malloc(strlen(tname)+1);
+    strncpy(trace_list[tevent].tp_name, tname, strlen(tname));
+    trace_list[tevent].hash = tdb_hash(tname);
+    trace_list[tevent].state = 1; /* Enable all by default */
+    return;
+}
 
 static void trace(TraceEvent event, unsigned long x1,
                   unsigned long x2, unsigned long x3,
                   unsigned long x4, unsigned long x5) {
+    if (!trace_list[event].state)
+        return;
     TraceRecord *rec = &trace_buf[trace_idx];
     rec->event = event;
     rec->x1 = x1;
@@ -74,3 +94,36 @@ void do_info_trace(Monitor *mon)
                           trace_buf[i].event, trace_buf[i].x1, trace_buf[i].x2,
                             trace_buf[i].x3, trace_buf[i].x4, trace_buf[i].x5);
 }
+
+void do_info_all_tracepoints(Monitor *mon)
+{
+    unsigned int i;
+    for (i=0; i<NR_TRACEPOINTS; i++)
+        monitor_printf(mon, "%s [Event ID %u] : state %u\n",
+                                trace_list[i].tp_name, i, trace_list[i].state);
+}
+
+static int find_tracepoint_by_name(const char *tname)
+{
+    unsigned int i, name_hash;
+
+    if (!tname)
+        return -1;
+
+    name_hash = tdb_hash(tname);
+
+    for (i=0; i<NR_TRACEPOINTS; i++)
+        if (trace_list[i].hash == name_hash &&
+                         !strncmp(trace_list[i].tp_name, tname, strlen(tname)))
+            return i;
+    return -1; /* indicates end of list reached without a match */
+}
+
+void change_tracepoint_state(const char *tname, bool tstate)
+{
+    int i;
+
+    i = find_tracepoint_by_name(tname);
+    if (i >= 0)
+        trace_list[i].state = tstate;
+}
diff --git a/tracetool b/tracetool
index 2c73bab..00af205 100755
--- a/tracetool
+++ b/tracetool
@@ -123,14 +123,20 @@ linetoc_end_nop()
 linetoh_begin_simple()
 {
     cat <<EOF
+#include <stdbool.h>
+
 typedef unsigned int TraceEvent;
 
+void init_tracepoint_table(void);
+void init_tracepoint(const char *tname, TraceEvent tevent);
 void trace1(TraceEvent event, unsigned long x1);
 void trace2(TraceEvent event, unsigned long x1, unsigned long x2);
 void trace3(TraceEvent event, unsigned long x1, unsigned long x2, unsigned long x3);
 void trace4(TraceEvent event, unsigned long x1, unsigned long x2, unsigned long x3, unsigned long x4);
 void trace5(TraceEvent event, unsigned long x1, unsigned long x2, unsigned long x3, unsigned long x4, unsigned long x5);
 void do_info_trace(Monitor *mon);
+void do_info_all_tracepoints(Monitor *mon);
+void change_tracepoint_state(const char *tname, bool tstate);
 EOF
 
     simple_event_num=0
@@ -163,22 +169,38 @@ EOF
 
 linetoh_end_simple()
 {
-    return
+    cat <<EOF
+#define NR_TRACEPOINTS $simple_event_num
+EOF
 }
 
 linetoc_begin_simple()
 {
-    return
+    cat <<EOF
+#include "trace.h"
+
+void init_tracepoint_table(void) {
+EOF
+    simple_event_num=0
+
 }
 
 linetoc_simple()
 {
-    return
+    local name
+    name=$(get_name "$1")
+    cat <<EOF
+init_tracepoint("$name", $simple_event_num);
+EOF
+    simple_event_num=$((simple_event_num + 1))
 }
 
 linetoc_end_simple()
 {
-    return
+    cat <<EOF
+return;
+}
+EOF
 }
 
 linetoh_begin_ust()
diff --git a/vl.c b/vl.c
index 328395e..dd07904 100644
--- a/vl.c
+++ b/vl.c
@@ -163,6 +163,9 @@ int main(int argc, char **argv)
 #include "cpus.h"
 #include "arch_init.h"
 
+#ifdef CONFIG_SIMPLE_TRACE
+#include "trace.h"
+#endif
 //#define DEBUG_NET
 //#define DEBUG_SLIRP
 
@@ -3604,6 +3607,9 @@ int main(int argc, char **argv, char **envp)
     if (net_init_clients() < 0) {
         exit(1);
     }
+#ifdef CONFIG_SIMPLE_TRACE
+    init_tracepoint_table();
+#endif
 
     /* init the bluetooth world */
     if (foreach_device_config(DEV_BT, bt_parse))
-- 
1.6.2.5



-- 
Prerna Saxena

Linux Technology Centre,
IBM Systems and Technology Lab,
Bangalore, India

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [Qemu-devel] [RFC v2] [PATCH 0/3] Monitor Support for 'simple' trace backend
  2010-06-10 19:08 [Qemu-devel] [RFC v2] [PATCH 0/3] Monitor Support for 'simple' trace backend Prerna Saxena
                   ` (2 preceding siblings ...)
  2010-06-10 19:24 ` [Qemu-devel] [RFC v2] [PATCH 3/3] Toggle tracepoint state Prerna Saxena
@ 2010-06-11 11:42 ` Markus Armbruster
  2010-06-11 12:08   ` Jan Kiszka
  3 siblings, 1 reply; 8+ messages in thread
From: Markus Armbruster @ 2010-06-11 11:42 UTC (permalink / raw)
  To: Prerna Saxena
  Cc: Anthony Liguori, Stefan Hajnoczi, kvm, Jan Kiszka, qemu-devel,
	Luiz Capitulino, maneesh, ananth

Prerna Saxena <prerna@linux.vnet.ibm.com> writes:

> This is v2 of monitor commands based on Stefan's trace framework :
> ( http://lists.gnu.org/archive/html/qemu-devel/2010-05/msg02407.html )
>
> This adds the following monitor commands for the 'simple' backend:
> - info trace 		: to view current contents of the trace buffer.
> - info tracepoints 	: to view all available tracepoints and their 
> 			  state.
> - tracepoint NAME on|off: to enable/disable the logging of data from 
> 			  tracepoint 'NAME'.
>
>
> Changelog :
> - Command 'info trace' is used to view current contents of buffer, in 
> place of 'trace'.
> - Cleanups

Do we want this in QMP?

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Qemu-devel] [RFC v2] [PATCH 0/3] Monitor Support for 'simple' trace backend
  2010-06-11 11:42 ` [Qemu-devel] [RFC v2] [PATCH 0/3] Monitor Support for 'simple' trace backend Markus Armbruster
@ 2010-06-11 12:08   ` Jan Kiszka
  2010-06-11 17:56     ` Luiz Capitulino
  0 siblings, 1 reply; 8+ messages in thread
From: Jan Kiszka @ 2010-06-11 12:08 UTC (permalink / raw)
  To: Markus Armbruster
  Cc: Anthony Liguori, Stefan Hajnoczi, kvm@vger.kernel.org,
	qemu-devel@nongnu.org, Luiz Capitulino,
	maneesh@linux.vnet.ibm.com, ananth@linux.vnet.ibm.com,
	Prerna Saxena

Markus Armbruster wrote:
> Prerna Saxena <prerna@linux.vnet.ibm.com> writes:
> 
>> This is v2 of monitor commands based on Stefan's trace framework :
>> ( http://lists.gnu.org/archive/html/qemu-devel/2010-05/msg02407.html )
>>
>> This adds the following monitor commands for the 'simple' backend:
>> - info trace 		: to view current contents of the trace buffer.
>> - info tracepoints 	: to view all available tracepoints and their 
>> 			  state.
>> - tracepoint NAME on|off: to enable/disable the logging of data from 
>> 			  tracepoint 'NAME'.
>>
>>
>> Changelog :
>> - Command 'info trace' is used to view current contents of buffer, in 
>> place of 'trace'.
>> - Cleanups
> 
> Do we want this in QMP?

For sure IMO. Maybe not in a hurry to avoid breakages until the whole
tracing infrastructure has settled, but long-term to ease scripting etc.

Still, let's not add this as an old-style monitor command, rather
convert it to the new style, maybe blocking QMP for now. I'll post the
required infrastructure for that blocking along my next device_show
series (hopefully the next days).

Jan

-- 
Siemens AG, Corporate Technology, CT T DE IT 1
Corporate Competence Center Embedded Linux

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Qemu-devel] Re: [RFC v2] [PATCH 1/3] Export tdb_hash()
  2010-06-10 19:15 ` [Qemu-devel] [RFC v2] [PATCH 1/3] Export tdb_hash() Prerna Saxena
@ 2010-06-11 17:54   ` Luiz Capitulino
  0 siblings, 0 replies; 8+ messages in thread
From: Luiz Capitulino @ 2010-06-11 17:54 UTC (permalink / raw)
  To: Prerna Saxena
  Cc: Anthony Liguori, Hajnoczi, kvm, Jan Kiszka, Stefan, qemu-devel,
	maneesh, ananth

On Fri, 11 Jun 2010 00:45:58 +0530
Prerna Saxena <prerna@linux.vnet.ibm.com> wrote:

> For now, I simply export tdb_hash() from qdict.h for use by tracing 
> framework.
> Luiz suggested renaming and exporting it from a location other than 
> qdict.h . Would "qemu-common.h" be a better place?

 qemu-common.h seems to be about header files, I thought we had a qemu-misc.c
file already. I'd create it if we don't.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Qemu-devel] [RFC v2] [PATCH 0/3] Monitor Support for 'simple' trace backend
  2010-06-11 12:08   ` Jan Kiszka
@ 2010-06-11 17:56     ` Luiz Capitulino
  0 siblings, 0 replies; 8+ messages in thread
From: Luiz Capitulino @ 2010-06-11 17:56 UTC (permalink / raw)
  To: Jan Kiszka
  Cc: Anthony Liguori, Hajnoczi, kvm@vger.kernel.org, Stefan,
	qemu-devel@nongnu.org, Markus Armbruster,
	maneesh@linux.vnet.ibm.com, ananth@linux.vnet.ibm.com,
	Prerna Saxena

On Fri, 11 Jun 2010 14:08:56 +0200
Jan Kiszka <jan.kiszka@siemens.com> wrote:

> Markus Armbruster wrote:
> > Prerna Saxena <prerna@linux.vnet.ibm.com> writes:
> > 
> >> This is v2 of monitor commands based on Stefan's trace framework :
> >> ( http://lists.gnu.org/archive/html/qemu-devel/2010-05/msg02407.html )
> >>
> >> This adds the following monitor commands for the 'simple' backend:
> >> - info trace 		: to view current contents of the trace buffer.
> >> - info tracepoints 	: to view all available tracepoints and their 
> >> 			  state.
> >> - tracepoint NAME on|off: to enable/disable the logging of data from 
> >> 			  tracepoint 'NAME'.
> >>
> >>
> >> Changelog :
> >> - Command 'info trace' is used to view current contents of buffer, in 
> >> place of 'trace'.
> >> - Cleanups
> > 
> > Do we want this in QMP?
> 
> For sure IMO. Maybe not in a hurry to avoid breakages until the whole
> tracing infrastructure has settled, but long-term to ease scripting etc.

 Yeah, that's why I didn't suggest it in my review.

> Still, let's not add this as an old-style monitor command, rather
> convert it to the new style, maybe blocking QMP for now. I'll post the
> required infrastructure for that blocking along my next device_show
> series (hopefully the next days).

 Agreed.

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2010-06-11 17:56 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-10 19:08 [Qemu-devel] [RFC v2] [PATCH 0/3] Monitor Support for 'simple' trace backend Prerna Saxena
2010-06-10 19:15 ` [Qemu-devel] [RFC v2] [PATCH 1/3] Export tdb_hash() Prerna Saxena
2010-06-11 17:54   ` [Qemu-devel] " Luiz Capitulino
2010-06-10 19:20 ` [Qemu-devel] [RFC v2] [PATCH 2/3] Monitor command 'info trace' Prerna Saxena
2010-06-10 19:24 ` [Qemu-devel] [RFC v2] [PATCH 3/3] Toggle tracepoint state Prerna Saxena
2010-06-11 11:42 ` [Qemu-devel] [RFC v2] [PATCH 0/3] Monitor Support for 'simple' trace backend Markus Armbruster
2010-06-11 12:08   ` Jan Kiszka
2010-06-11 17:56     ` Luiz Capitulino

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).