]>
Commit | Line | Data |
---|---|---|
1dde0f48 | 1 | # -*- mode: python -*- |
7e7237cd | 2 | # vim: filetype=python |
1dde0f48 | 3 | # |
77e2b172 | 4 | # Copyright (C) 2011-2016 Lluís Vilanova <vilanova@ac.upc.edu> |
1dde0f48 LV |
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 | ||
d3a48372 | 9 | ## |
f5cf31c5 | 10 | # = Tracing |
d3a48372 | 11 | ## |
1dde0f48 LV |
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 | # | |
5072f7b3 | 24 | # Since: 2.2 |
1dde0f48 LV |
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. | |
a937b6aa | 35 | # |
1dde0f48 | 36 | # @state: Tracing state. |
a937b6aa | 37 | # |
77e2b172 LV |
38 | # @vcpu: Whether this is a per-vCPU event (since 2.7). |
39 | # | |
5485e52a | 40 | # Features: |
9e272073 | 41 | # |
5485e52a | 42 | # @deprecated: Member @vcpu is deprecated, and always ignored. |
1dde0f48 | 43 | # |
5072f7b3 | 44 | # Since: 2.2 |
1dde0f48 | 45 | ## |
895a2a80 | 46 | { 'struct': 'TraceEventInfo', |
5485e52a AB |
47 | 'data': {'name': 'str', 'state': 'TraceEventState', |
48 | 'vcpu': { 'type': 'bool', 'features': ['deprecated'] } } } | |
1dde0f48 LV |
49 | |
50 | ## | |
51 | # @trace-event-get-state: | |
52 | # | |
53 | # Query the state of events. | |
54 | # | |
55 | # @name: Event name pattern (case-sensitive glob). | |
a937b6aa | 56 | # |
5485e52a | 57 | # @vcpu: The vCPU to query (since 2.7). |
1dde0f48 | 58 | # |
5485e52a | 59 | # Features: |
9e272073 | 60 | # |
5485e52a | 61 | # @deprecated: Member @vcpu is deprecated, and always ignored. |
100cc4fe | 62 | # |
5485e52a | 63 | # Returns: a list of @TraceEventInfo for the matching events |
26ec4e53 | 64 | # |
5072f7b3 | 65 | # Since: 2.2 |
a93b9ba7 MAL |
66 | # |
67 | # Example: | |
68 | # | |
69 | # -> { "execute": "trace-event-get-state", | |
70 | # "arguments": { "name": "qemu_memalign" } } | |
6352c81b | 71 | # <- { "return": [ { "name": "qemu_memalign", "state": "disabled", "vcpu": false } ] } |
1dde0f48 LV |
72 | ## |
73 | { 'command': 'trace-event-get-state', | |
5485e52a AB |
74 | 'data': {'name': 'str', |
75 | '*vcpu': {'type': 'int', 'features': ['deprecated'] } }, | |
1dde0f48 LV |
76 | 'returns': ['TraceEventInfo'] } |
77 | ||
78 | ## | |
79 | # @trace-event-set-state: | |
80 | # | |
81 | # Set the dynamic tracing state of events. | |
82 | # | |
83 | # @name: Event name pattern (case-sensitive glob). | |
a937b6aa | 84 | # |
1dde0f48 | 85 | # @enable: Whether to enable tracing. |
a937b6aa | 86 | # |
1d8bda12 | 87 | # @ignore-unavailable: Do not match unavailable events with @name. |
a937b6aa | 88 | # |
1d8bda12 | 89 | # @vcpu: The vCPU to act upon (all by default; since 2.7). |
77e2b172 | 90 | # |
5485e52a | 91 | # Features: |
77e2b172 | 92 | # |
e27a9d62 | 93 | # @deprecated: Member @vcpu is deprecated, and always ignored. |
1dde0f48 | 94 | # |
5072f7b3 | 95 | # Since: 2.2 |
8a9b273e MAL |
96 | # |
97 | # Example: | |
98 | # | |
99 | # -> { "execute": "trace-event-set-state", | |
3e038d7d | 100 | # "arguments": { "name": "qemu_memalign", "enable": true } } |
8a9b273e | 101 | # <- { "return": {} } |
1dde0f48 LV |
102 | ## |
103 | { 'command': 'trace-event-set-state', | |
77e2b172 | 104 | 'data': {'name': 'str', 'enable': 'bool', '*ignore-unavailable': 'bool', |
5485e52a | 105 | '*vcpu': {'type': 'int', 'features': ['deprecated'] } } } |