Merge tag 'bsd-user-misc-2024q2-pull-request' of gitlab.com:bsdimp/qemu into staging
[qemu/kevin.git] / qapi / trace.json
blob9ebb6d9eaf52724d48a1cf3d8f6935752f95643e
1 # -*- mode: python -*-
2 # vim: filetype=python
4 # Copyright (C) 2011-2016 LluĂ­s Vilanova <vilanova@ac.upc.edu>
6 # This work is licensed under the terms of the GNU GPL, version 2 or later.
7 # See the COPYING file in the top-level directory.
9 ##
10 # = Tracing
14 # @TraceEventState:
16 # State of a tracing event.
18 # @unavailable: The event is statically disabled.
20 # @disabled: The event is dynamically disabled.
22 # @enabled: The event is dynamically enabled.
24 # Since: 2.2
26 { 'enum': 'TraceEventState',
27   'data': ['unavailable', 'disabled', 'enabled'] }
30 # @TraceEventInfo:
32 # Information of a tracing event.
34 # @name: Event name.
36 # @state: Tracing state.
38 # Since: 2.2
40 { 'struct': 'TraceEventInfo',
41   'data': {'name': 'str', 'state': 'TraceEventState' } }
44 # @trace-event-get-state:
46 # Query the state of events.
48 # @name: Event name pattern (case-sensitive glob).
50 # Returns: a list of @TraceEventInfo for the matching events
52 # Since: 2.2
54 # Example:
56 #     -> { "execute": "trace-event-get-state",
57 #          "arguments": { "name": "qemu_memalign" } }
58 #     <- { "return": [ { "name": "qemu_memalign", "state": "disabled", "vcpu": false } ] }
60 { 'command': 'trace-event-get-state',
61   'data': {'name': 'str' },
62   'returns': ['TraceEventInfo'] }
65 # @trace-event-set-state:
67 # Set the dynamic tracing state of events.
69 # @name: Event name pattern (case-sensitive glob).
71 # @enable: Whether to enable tracing.
73 # @ignore-unavailable: Do not match unavailable events with @name.
75 # Since: 2.2
77 # Example:
79 #     -> { "execute": "trace-event-set-state",
80 #          "arguments": { "name": "qemu_memalign", "enable": true } }
81 #     <- { "return": {} }
83 { 'command': 'trace-event-set-state',
84   'data': {'name': 'str', 'enable': 'bool', '*ignore-unavailable': 'bool' } }