docs: add master qapi texi files
[qemu/kevin.git] / qapi / trace.json
blob3ad7df7fdb35d42cbf45445fb70292498442ddb8
1 # -*- mode: python -*-
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.
8 ##
9 # = Tracing commands
13 # @TraceEventState:
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.
23 # Since: 2.2
25 { 'enum': 'TraceEventState',
26   'data': ['unavailable', 'disabled', 'enabled'] }
29 # @TraceEventInfo:
31 # Information of a tracing event.
33 # @name: Event name.
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"
38 # files.
40 # Since: 2.2
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: #optional 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:
56 # - its name matches the @name pattern, and
57 # - if @vcpu is given, the event has the "vcpu" property.
59 # Therefore, if @vcpu is given, the operation will only match per-vCPU events,
60 # returning their state on the specified vCPU. Special case: if @name is an
61 # exact match, @vcpu is given and the event does not have the "vcpu" property,
62 # an error is returned.
64 # Since: 2.2
66 { 'command': 'trace-event-get-state',
67   'data': {'name': 'str', '*vcpu': 'int'},
68   'returns': ['TraceEventInfo'] }
71 # @trace-event-set-state:
73 # Set the dynamic tracing state of events.
75 # @name: Event name pattern (case-sensitive glob).
76 # @enable: Whether to enable tracing.
77 # @ignore-unavailable: #optional Do not match unavailable events with @name.
78 # @vcpu: #optional The vCPU to act upon (all by default; since 2.7).
80 # An event's state is modified if:
81 # - its name matches the @name pattern, and
82 # - if @vcpu is given, the event has the "vcpu" property.
84 # Therefore, if @vcpu is given, the operation will only match per-vCPU events,
85 # setting their state on the specified vCPU. Special case: if @name is an exact
86 # match, @vcpu is given and the event does not have the "vcpu" property, an
87 # error is returned.
89 # Since: 2.2
91 { 'command': 'trace-event-set-state',
92   'data': {'name': 'str', 'enable': 'bool', '*ignore-unavailable': 'bool',
93            '*vcpu': 'int'} }