trace: [qmp] Add commands to query and control event tracing state
PATCH 1/1 trace: [qmp] Add commands to query and control event tracing state
Signed-off-by Lluís Vilanova <[email protected]>
--- qapi-schema.json | 3 ++ qapi/trace.json | 65 ++++++++++++++++++++++++++++++++++++++++++++ qmp-commands.hx | 35 ++++++++++++++++++++++++ trace/Makefile.objs | 1 + trace/qmp.c | 75 +++++++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 179 insertions(+) create mode 100644 qapi/trace.json create mode 100644 trace/qmp.c
qapi-schema.json +3 -0
@@ -11,6 +11,9 @@ # QAPI event definitions { 'include': 'qapi/event.json' } +# Tracing commands +{ 'include': 'qapi/trace.json' } + ## # LostTickPolicy: #
qapi/trace.json new file +65 -0
65 lines not on this page · raw message
qmp-commands.hx +35 -0
@@ -3753,5 +3753,40 @@ Example: -> { "execute": "rtc-reset-reinjection" } <- { "return": {} } +EQMP + + { + .name = "trace-event-get-state", + .args_type = "name:s", + .mhandler.cmd_new = qmp_marshal_input_trace_event_get_state, + }, + +SQMP +trace-event-get-state +--------------------- + +Query the state of events. + +Example: + +-> { "execute": "trace-event-get-state", "arguments": { "name": "qemu_memalign" } } +<- { "return": [ { "name": "qemu_memalign", "state": "disabled" } ] } +EQMP + + { + .name = "trace-event-set-state", + .args_type = "name:s,enable:b,ignore-unavailable:b?", + .mhandler.cmd_new = qmp_marshal_input_trace_event_set_state, + }, +SQMP +trace-event-set-state +--------------------- + +Set the state of events. + +Example: + +-> { "execute": "trace-event-set-state", "arguments": { "name": "qemu_memalign", "enable": "true" } } +<- { "return": {} } EQMP
trace/Makefile.objs +1 -0
@@ -145,3 +145,4 @@ util-obj-$(CONFIG_TRACE_FTRACE) += ftrace.o util-obj-$(CONFIG_TRACE_UST) += generated-ust.o util-obj-y += control.o util-obj-y += generated-tracers.o +util-obj-y += qmp.o
trace/qmp.c new file +75 -0
75 lines not on this page · raw message