QMP command trace-event to toggle state of a trace-event.
Illustration :
-> { "execute": "trace-event", "arguments": { "name": "qemu_malloc",
"option": true} }
<- { "return": {} }
Posting this as an RFC for now. I'll post the final version as a part of
the cumulative QMP patchset for tracing ( including patches for query-*
commands posted earlier :
http://lists.gnu.org/archive/html/qemu-devel/2010-10/msg01232.html )
Signed-off-by: Prerna Saxena<address@hidden>
---
hmp-commands.hx | 2 +-
monitor.c | 43 +++++++++++++++++++++++++++++++++++++------
qmp-commands.hx | 32 ++++++++++++++++++++++++++++++++
3 files changed, 70 insertions(+), 7 deletions(-)
diff --git a/qmp-commands.hx b/qmp-commands.hx
index bc79b55..7613d73 100644
--- a/qmp-commands.hx
+++ b/qmp-commands.hx
@@ -761,6 +761,38 @@ Example:
Note: This command must be issued before issuing any other command.
+EQMP
+
+ {
+ .name = "trace-event",
+ .args_type = "name:s,option:b",
+ .params = "name on|off",
+ .help = "changes state of a specific trace event",
+ .user_print = monitor_user_noop,
+ .mhandler.cmd_new = do_change_trace_event_state_qmp,
+ },
+
+SQMP
+trace-event
+-----------
+
+Change state of a trace-event.
+
+Arguments:
+
+- "name": name of trace-event (json-string)
+- "option": new state for the trace-event (json-bool)