]>
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 AB |
40 | # Features: |
41 | # @deprecated: Member @vcpu is deprecated, and always ignored. | |
1dde0f48 | 42 | # |
5072f7b3 | 43 | # Since: 2.2 |
1dde0f48 | 44 | ## |
895a2a80 | 45 | { 'struct': 'TraceEventInfo', |
5485e52a AB |
46 | 'data': {'name': 'str', 'state': 'TraceEventState', |
47 | 'vcpu': { 'type': 'bool', 'features': ['deprecated'] } } } | |
1dde0f48 LV |
48 | |
49 | ## | |
50 | # @trace-event-get-state: | |
51 | # | |
52 | # Query the state of events. | |
53 | # | |
54 | # @name: Event name pattern (case-sensitive glob). | |
a937b6aa | 55 | # |
5485e52a | 56 | # @vcpu: The vCPU to query (since 2.7). |
1dde0f48 | 57 | # |
5485e52a AB |
58 | # Features: |
59 | # @deprecated: Member @vcpu is deprecated, and always ignored. | |
100cc4fe | 60 | # |
5485e52a | 61 | # Returns: a list of @TraceEventInfo for the matching events |
26ec4e53 | 62 | # |
5485e52a AB |
63 | # An event is returned if its name matches the @name pattern |
64 | # (There are no longer any per-vCPU events). | |
77e2b172 | 65 | # |
5072f7b3 | 66 | # Since: 2.2 |
a93b9ba7 MAL |
67 | # |
68 | # Example: | |
69 | # | |
70 | # -> { "execute": "trace-event-get-state", | |
71 | # "arguments": { "name": "qemu_memalign" } } | |
6352c81b | 72 | # <- { "return": [ { "name": "qemu_memalign", "state": "disabled", "vcpu": false } ] } |
1dde0f48 LV |
73 | ## |
74 | { 'command': 'trace-event-get-state', | |
5485e52a AB |
75 | 'data': {'name': 'str', |
76 | '*vcpu': {'type': 'int', 'features': ['deprecated'] } }, | |
1dde0f48 LV |
77 | 'returns': ['TraceEventInfo'] } |
78 | ||
79 | ## | |
80 | # @trace-event-set-state: | |
81 | # | |
82 | # Set the dynamic tracing state of events. | |
83 | # | |
84 | # @name: Event name pattern (case-sensitive glob). | |
a937b6aa | 85 | # |
1dde0f48 | 86 | # @enable: Whether to enable tracing. |
a937b6aa | 87 | # |
1d8bda12 | 88 | # @ignore-unavailable: Do not match unavailable events with @name. |
a937b6aa | 89 | # |
1d8bda12 | 90 | # @vcpu: The vCPU to act upon (all by default; since 2.7). |
77e2b172 | 91 | # |
5485e52a AB |
92 | # Features: |
93 | # @deprecated: Member @vcpu is deprecated, and always ignored. | |
77e2b172 | 94 | # |
5485e52a AB |
95 | # An event is enabled if its name matches the @name pattern |
96 | # (There are no longer any per-vCPU events). | |
1dde0f48 | 97 | # |
5072f7b3 | 98 | # Since: 2.2 |
8a9b273e MAL |
99 | # |
100 | # Example: | |
101 | # | |
102 | # -> { "execute": "trace-event-set-state", | |
3e038d7d | 103 | # "arguments": { "name": "qemu_memalign", "enable": true } } |
8a9b273e | 104 | # <- { "return": {} } |
1dde0f48 LV |
105 | ## |
106 | { 'command': 'trace-event-set-state', | |
77e2b172 | 107 | 'data': {'name': 'str', 'enable': 'bool', '*ignore-unavailable': 'bool', |
5485e52a | 108 | '*vcpu': {'type': 'int', 'features': ['deprecated'] } } } |