Fix: Don't leave events enabled if they were saved in a disabled state
[lttng-tools.git] / src / common / config / session.xsd
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3 Copyright (c) 2014 - Jérémie Galarneau <jeremie.galarneau@efficios.com>
4
5 Permission is hereby granted, free of charge, to any person obtaining a copy
6 of this software and associated documentation files (the "Software"), to deal
7 in the Software without restriction, including without limitation the rights
8 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 copies of the Software, and to permit persons to whom the Software is
10 furnished to do so, subject to the following conditions:
11
12 The above copyright notice and this permission notice shall be included in
13 all copies or substantial portions of the Software.
14
15 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 THE SOFTWARE.
22 -->
23 <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
24 elementFormDefault="qualified" version="2.5">
25
26 <xs:simpleType name="name_type">
27 <xs:restriction base="xs:string">
28 <xs:maxLength value="255"/>
29 </xs:restriction>
30 </xs:simpleType>
31
32 <xs:simpleType name="uint64_type">
33 <xs:restriction base="xs:integer">
34 <xs:minInclusive value="0"/>
35 <xs:maxInclusive value="18446744073709551615"/>
36 </xs:restriction>
37 </xs:simpleType>
38
39 <xs:simpleType name="uint32_type">
40 <xs:restriction base="xs:integer">
41 <xs:minInclusive value="0"/>
42 <xs:maxInclusive value="4294967295"/>
43 </xs:restriction>
44 </xs:simpleType>
45
46 <xs:simpleType name="channel_overwrite_mode_type">
47 <xs:restriction base="xs:string">
48 <xs:enumeration value="DISCARD"/>
49 <xs:enumeration value="OVERWRITE"/>
50 </xs:restriction>
51 </xs:simpleType>
52
53 <!-- Maps to the lttng_event_output enum -->
54 <xs:simpleType name="event_output_type">
55 <xs:restriction base="xs:string">
56 <xs:enumeration value="SPLICE"/>
57 <xs:enumeration value="MMAP"/>
58 </xs:restriction>
59 </xs:simpleType>
60
61 <!-- Maps to the lttng_loglevel_type enum -->
62 <xs:simpleType name="loglevel_type">
63 <xs:restriction base="xs:string">
64 <xs:enumeration value="ALL"/>
65 <xs:enumeration value="RANGE"/>
66 <xs:enumeration value="SINGLE"/>
67 </xs:restriction>
68 </xs:simpleType>
69
70 <!-- Maps to the lttng_event_type enum -->
71 <xs:simpleType name="event_type_type">
72 <xs:restriction base="xs:string">
73 <xs:enumeration value="ALL"/>
74 <xs:enumeration value="TRACEPOINT"/>
75 <xs:enumeration value="PROBE"/>
76 <xs:enumeration value="FUNCTION"/>
77 <xs:enumeration value="FUNCTION_ENTRY"/>
78 <xs:enumeration value="NOOP"/>
79 <xs:enumeration value="SYSCALL"/>
80 <xs:enumeration value="KPROBE"/>
81 <xs:enumeration value="KRETPROBE"/>
82 </xs:restriction>
83 </xs:simpleType>
84
85 <xs:complexType name="event_probe_attributes_type">
86 <xs:all>
87 <xs:element name="symbol_name" type="name_type" minOccurs="0"/>
88 <xs:element name="address" type="uint64_type" minOccurs="0"/>
89 <xs:element name="offset" type="uint64_type" minOccurs="0"/>
90 </xs:all>
91 </xs:complexType>
92
93 <xs:complexType name="event_ftrace_attributes_type">
94 <xs:all>
95 <xs:element name="symbol_name" type="name_type"/>
96 </xs:all>
97 </xs:complexType>
98
99 <xs:complexType name="event_attributes_type">
100 <xs:choice>
101 <xs:element name="probe_attributes" type="event_probe_attributes_type"/>
102 <xs:element name="function_attributes" type="event_ftrace_attributes_type"/>
103 </xs:choice>
104 </xs:complexType>
105
106 <xs:complexType name="event_exclusion_list_type">
107 <xs:sequence>
108 <xs:element name="exclusion" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
109 </xs:sequence>
110 </xs:complexType>
111
112 <xs:complexType name="event_type">
113 <xs:all>
114 <xs:element name="name" type="name_type" minOccurs="0"/>
115 <xs:element name="enabled" type="xs:boolean" default="true" minOccurs="0"/>
116 <xs:element name="type" type="event_type_type" default="TRACEPOINT" minOccurs="0"/>
117 <xs:element name="loglevel_type" type="loglevel_type" default="ALL" minOccurs="0"/>
118 <xs:element name="loglevel" type="xs:int" default="-1" minOccurs="0"/>
119 <xs:element name="filter" type="xs:string" minOccurs="0"/>
120 <xs:element name="exclusions" type="event_exclusion_list_type" minOccurs="0"/>
121 <xs:element name="attributes" type="event_attributes_type" minOccurs="0"/>
122 </xs:all>
123 </xs:complexType>
124
125 <xs:complexType name="event_list_type">
126 <xs:sequence>
127 <xs:element name="event" type="event_type" minOccurs="0" maxOccurs="unbounded"/>
128 </xs:sequence>
129 </xs:complexType>
130
131 <xs:complexType name="event_perf_context_type">
132 <xs:all>
133 <xs:element name="type" type="uint32_type"/>
134 <xs:element name="config" type="uint64_type"/>
135 <xs:element name="name" type="name_type"/>
136 </xs:all>
137 </xs:complexType>
138
139 <!-- Maps to the lttng_event_context_type enum -->
140 <xs:simpleType name="event_context_type_type">
141 <xs:restriction base="xs:string">
142 <xs:enumeration value="PID"/>
143 <xs:enumeration value="PROCNAME"/>
144 <xs:enumeration value="PRIO"/>
145 <xs:enumeration value="NICE"/>
146 <xs:enumeration value="VPID"/>
147 <xs:enumeration value="TID"/>
148 <xs:enumeration value="VTID"/>
149 <xs:enumeration value="PPID"/>
150 <xs:enumeration value="VPPID"/>
151 <xs:enumeration value="PTHREAD_ID"/>
152 <xs:enumeration value="HOSTNAME"/>
153 <xs:enumeration value="IP"/>
154 </xs:restriction>
155 </xs:simpleType>
156
157 <xs:complexType name="event_context_type">
158 <xs:choice>
159 <xs:element name="type" type="event_context_type_type"/>
160 <xs:element name="perf" type="event_perf_context_type"/>
161 </xs:choice>
162 </xs:complexType>
163
164 <xs:complexType name="event_context_list_type">
165 <xs:sequence>
166 <xs:element name="context" type="event_context_type" minOccurs="0" maxOccurs="unbounded"/>
167 </xs:sequence>
168 </xs:complexType>
169
170 <!-- Maps to struct lttng_channel -->
171 <xs:complexType name="channel_type">
172 <xs:all>
173 <xs:element name="name" type="name_type"/>
174 <xs:element name="enabled" type="xs:boolean" default="true" minOccurs="0"/>
175 <xs:element name="overwrite_mode" type="channel_overwrite_mode_type" default="DISCARD" minOccurs="0"/>
176 <xs:element name="subbuffer_size" type="uint64_type" minOccurs="0"/> <!-- bytes -->
177 <xs:element name="subbuffer_count" type="uint64_type" default="4" minOccurs="0"/>
178 <xs:element name="switch_timer_interval" type="uint32_type" default="0" minOccurs="0"/> <!-- usec -->
179 <xs:element name="read_timer_interval" type="uint32_type"/> <!-- usec -->
180 <xs:element name="output_type" type="event_output_type"/>
181 <xs:element name="tracefile_size" type="uint64_type" default="0" minOccurs="0"/> <!-- bytes -->
182 <xs:element name="tracefile_count" type="uint64_type" default="0" minOccurs="0"/>
183 <xs:element name="live_timer_interval" type="uint32_type" default="0" minOccurs="0"/> <!-- usec -->
184 <xs:element name="events" type="event_list_type" minOccurs="0"/>
185 <xs:element name="contexts" type="event_context_list_type" minOccurs="0"/>
186 </xs:all>
187 </xs:complexType>
188
189 <!-- Maps to the lttng_domain_type enum -->
190 <xs:simpleType name="domain_type_type">
191 <xs:restriction base="xs:string">
192 <xs:enumeration value="KERNEL"/>
193 <xs:enumeration value="UST"/>
194 <xs:enumeration value="JUL"/>
195 </xs:restriction>
196 </xs:simpleType>
197
198 <!-- Maps to the lttng_buffer_type enum -->
199 <xs:simpleType name="domain_buffer_type">
200 <xs:restriction base="xs:string">
201 <xs:enumeration value="PER_PID"/>
202 <xs:enumeration value="PER_UID"/>
203 <xs:enumeration value="GLOBAL"/>
204 </xs:restriction>
205 </xs:simpleType>
206
207 <xs:complexType name="channel_list_type">
208 <xs:sequence>
209 <xs:element name="channel" type="channel_type" minOccurs="0" maxOccurs="unbounded"/>
210 </xs:sequence>
211 </xs:complexType>
212
213 <!-- Maps to struct lttng_domain and contains channels -->
214 <xs:complexType name="domain_type">
215 <xs:all>
216 <xs:element name="type" type="domain_type_type"/>
217 <xs:element name="buffer_type" type="domain_buffer_type"/>
218 <xs:element name="channels" type="channel_list_type" minOccurs="0"/>
219 </xs:all>
220 </xs:complexType>
221
222 <xs:complexType name="session_attributes_type">
223 <xs:choice>
224 <xs:element name="snapshot_mode" type="xs:boolean"/>
225 <xs:element name="live_timer_interval" type="uint32_type"/> <!-- usec -->
226 </xs:choice>
227 </xs:complexType>
228
229 <xs:complexType name="domain_list_type">
230 <xs:sequence>
231 <xs:element name="domain" type="domain_type" minOccurs="0" maxOccurs="unbounded"/>
232 </xs:sequence>
233 </xs:complexType>
234
235 <xs:complexType name="net_output_type">
236 <xs:all>
237 <xs:element name="control_uri" type="xs:string"/>
238 <xs:element name="data_uri" type="xs:string"/>
239 </xs:all>
240 </xs:complexType>
241
242 <xs:complexType name="destination_type">
243 <xs:choice>
244 <xs:element name="path" type="xs:string"/>
245 <xs:element name="net_output" type="net_output_type"/>
246 </xs:choice>
247 </xs:complexType>
248
249 <xs:complexType name="consumer_output_type">
250 <xs:all>
251 <xs:element name="enabled" type="xs:boolean" default="true"/>
252 <xs:element name="destination" type="destination_type"/>
253 </xs:all>
254 </xs:complexType>
255
256 <xs:complexType name="snapshot_output_type">
257 <xs:all>
258 <xs:element name="name" type="name_type"/>
259 <xs:element name="max_size" type="uint64_type"/>
260 <xs:element name="consumer_output" type="consumer_output_type"/>
261 </xs:all>
262 </xs:complexType>
263
264 <xs:complexType name="snapshot_output_list_type">
265 <xs:sequence>
266 <xs:element name="output" type="snapshot_output_type" minOccurs="0" maxOccurs="unbounded"/>
267 </xs:sequence>
268 </xs:complexType>
269
270 <xs:complexType name="session_output_type">
271 <xs:choice>
272 <xs:element name="snapshot_outputs" type="snapshot_output_list_type"/>
273 <xs:element name="consumer_output" type="consumer_output_type"/>
274 </xs:choice>
275 </xs:complexType>
276
277 <xs:complexType name="session_type">
278 <xs:all>
279 <xs:element name="name" type="name_type"/>
280 <xs:element name="domains" type="domain_list_type" minOccurs="0"/>
281 <xs:element name="started" type="xs:boolean" default="0" minOccurs="0"/>
282 <xs:element name="attributes" type="session_attributes_type" minOccurs="0"/>
283 <xs:element name="output" type="session_output_type" minOccurs="0"/>
284 </xs:all>
285 </xs:complexType>
286
287 <xs:element name="sessions">
288 <xs:complexType>
289 <xs:sequence>
290 <xs:element name="session" type="session_type" maxOccurs="unbounded"/>
291 </xs:sequence>
292 </xs:complexType>
293 </xs:element>
294
295 </xs:schema>
This page took 0.063682 seconds and 4 git commands to generate.