xref: /openbmc/qemu/qapi/trace.json (revision 0e376d45)
1# -*- mode: python -*-
2# vim: filetype=python
3#
4# Copyright (C) 2011-2016 Lluís Vilanova <vilanova@ac.upc.edu>
5#
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.
8
9##
10# = Tracing
11##
12
13##
14# @TraceEventState:
15#
16# State of a tracing event.
17#
18# @unavailable: The event is statically disabled.
19#
20# @disabled: The event is dynamically disabled.
21#
22# @enabled: The event is dynamically enabled.
23#
24# Since: 2.2
25##
26{ 'enum': 'TraceEventState',
27  'data': ['unavailable', 'disabled', 'enabled'] }
28
29##
30# @TraceEventInfo:
31#
32# Information of a tracing event.
33#
34# @name: Event name.
35#
36# @state: Tracing state.
37#
38# Since: 2.2
39##
40{ 'struct': 'TraceEventInfo',
41  'data': {'name': 'str', 'state': 'TraceEventState' } }
42
43##
44# @trace-event-get-state:
45#
46# Query the state of events.
47#
48# @name: Event name pattern (case-sensitive glob).
49#
50# Returns: a list of @TraceEventInfo for the matching events
51#
52# Since: 2.2
53#
54# Example:
55#
56#     -> { "execute": "trace-event-get-state",
57#          "arguments": { "name": "qemu_memalign" } }
58#     <- { "return": [ { "name": "qemu_memalign", "state": "disabled", "vcpu": false } ] }
59##
60{ 'command': 'trace-event-get-state',
61  'data': {'name': 'str' },
62  'returns': ['TraceEventInfo'] }
63
64##
65# @trace-event-set-state:
66#
67# Set the dynamic tracing state of events.
68#
69# @name: Event name pattern (case-sensitive glob).
70#
71# @enable: Whether to enable tracing.
72#
73# @ignore-unavailable: Do not match unavailable events with @name.
74#
75# Since: 2.2
76#
77# Example:
78#
79#     -> { "execute": "trace-event-set-state",
80#          "arguments": { "name": "qemu_memalign", "enable": true } }
81#     <- { "return": {} }
82##
83{ 'command': 'trace-event-set-state',
84  'data': {'name': 'str', 'enable': 'bool', '*ignore-unavailable': 'bool' } }
85