summaryrefslogtreecommitdiff
path: root/qmp-commands.hx
diff options
context:
space:
mode:
authorLluís Vilanova <vilanova@ac.upc.edu>2016-07-11 12:53:57 +0200
committerStefan Hajnoczi <stefanha@redhat.com>2016-07-18 18:23:12 +0100
commit77e2b17272963c09e309315903f3781dbdd85341 (patch)
tree3a6041c320317edf40167dd6b69b2912b496e763 /qmp-commands.hx
parentbd71211d556aac5451696785fbe29be7f70bed05 (diff)
downloadqemu-77e2b17272963c09e309315903f3781dbdd85341.zip
trace: Add QAPI/QMP interfaces to query and control per-vCPU tracing state
Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'qmp-commands.hx')
-rw-r--r--qmp-commands.hx35
1 files changed, 33 insertions, 2 deletions
diff --git a/qmp-commands.hx b/qmp-commands.hx
index c46c65ce2d..496d73c275 100644
--- a/qmp-commands.hx
+++ b/qmp-commands.hx
@@ -4715,7 +4715,7 @@ EQMP
{
.name = "trace-event-get-state",
- .args_type = "name:s",
+ .args_type = "name:s,vcpu:i?",
.mhandler.cmd_new = qmp_marshal_trace_event_get_state,
},
@@ -4725,6 +4725,20 @@ trace-event-get-state
Query the state of events.
+Arguments:
+
+- "name": Event name pattern (json-string).
+- "vcpu": The vCPU to query, any vCPU by default (json-int, optional).
+
+An event is returned if:
+- its name matches the "name" pattern, and
+- if "vcpu" is given, the event has the "vcpu" property.
+
+Therefore, if "vcpu" is given, the operation will only match per-vCPU events,
+returning their state on the specified vCPU. Special case: if "name" is an exact
+match, "vcpu" is given and the event does not have the "vcpu" property, an error
+is returned.
+
Example:
-> { "execute": "trace-event-get-state", "arguments": { "name": "qemu_memalign" } }
@@ -4733,7 +4747,7 @@ EQMP
{
.name = "trace-event-set-state",
- .args_type = "name:s,enable:b,ignore-unavailable:b?",
+ .args_type = "name:s,enable:b,ignore-unavailable:b?,vcpu:i?",
.mhandler.cmd_new = qmp_marshal_trace_event_set_state,
},
@@ -4743,6 +4757,23 @@ trace-event-set-state
Set the state of events.
+Arguments:
+
+- "name": Event name pattern (json-string).
+- "enable": Whether to enable or disable the event (json-bool).
+- "ignore-unavailable": Whether to ignore errors for events that cannot be
+ changed (json-bool, optional).
+- "vcpu": The vCPU to act upon, all vCPUs by default (json-int, optional).
+
+An event's state is modified if:
+- its name matches the "name" pattern, and
+- if "vcpu" is given, the event has the "vcpu" property.
+
+Therefore, if "vcpu" is given, the operation will only match per-vCPU events,
+setting their state on the specified vCPU. Special case: if "name" is an exact
+match, "vcpu" is given and the event does not have the "vcpu" property, an error
+is returned.
+
Example:
-> { "execute": "trace-event-set-state", "arguments": { "name": "qemu_memalign", "enable": "true" } }