3 # Copyright (C) 2011-2016 LluĂs Vilanova <vilanova@ac.upc.edu>
5 # This work is licensed under the terms of the GNU GPL, version 2 or later.
6 # See the COPYING file in the top-level directory.
15 # State of a tracing event.
17 # @unavailable: The event is statically disabled.
19 # @disabled: The event is dynamically disabled.
21 # @enabled: The event is dynamically enabled.
25 { 'enum': 'TraceEventState',
26 'data': ['unavailable', 'disabled', 'enabled'] }
31 # Information of a tracing event.
34 # @state: Tracing state.
35 # @vcpu: Whether this is a per-vCPU event (since 2.7).
37 # An event is per-vCPU if it has the "vcpu" property in the "trace-events"
42 { 'struct': 'TraceEventInfo',
43 'data': {'name': 'str', 'state': 'TraceEventState', 'vcpu': 'bool'} }
46 # @trace-event-get-state:
48 # Query the state of events.
50 # @name: Event name pattern (case-sensitive glob).
51 # @vcpu: The vCPU to query (any by default; since 2.7).
53 # Returns: a list of @TraceEventInfo for the matching events
55 # An event is returned if:
57 # - its name matches the @name pattern, and
58 # - if @vcpu is given, the event has the "vcpu" property.
60 # Therefore, if @vcpu is given, the operation will only match per-vCPU events,
61 # returning their state on the specified vCPU. Special case: if @name is an
62 # exact match, @vcpu is given and the event does not have the "vcpu" property,
63 # an error is returned.
69 # -> { "execute": "trace-event-get-state",
70 # "arguments": { "name": "qemu_memalign" } }
71 # <- { "return": [ { "name": "qemu_memalign", "state": "disabled" } ] }
74 { 'command': 'trace-event-get-state',
75 'data': {'name': 'str', '*vcpu': 'int'},
76 'returns': ['TraceEventInfo'] }
79 # @trace-event-set-state:
81 # Set the dynamic tracing state of events.
83 # @name: Event name pattern (case-sensitive glob).
84 # @enable: Whether to enable tracing.
85 # @ignore-unavailable: Do not match unavailable events with @name.
86 # @vcpu: The vCPU to act upon (all by default; since 2.7).
88 # An event's state is modified if:
89 # - its name matches the @name pattern, and
90 # - if @vcpu is given, the event has the "vcpu" property.
92 # Therefore, if @vcpu is given, the operation will only match per-vCPU events,
93 # setting their state on the specified vCPU. Special case: if @name is an exact
94 # match, @vcpu is given and the event does not have the "vcpu" property, an
101 # -> { "execute": "trace-event-set-state",
102 # "arguments": { "name": "qemu_memalign", "enable": true } }
103 # <- { "return": {} }
106 { 'command': 'trace-event-set-state',
107 'data': {'name': 'str', 'enable': 'bool', '*ignore-unavailable': 'bool',