Mi fix: basic formatting
[lttng-tools.git] / src / common / mi_lttng.xsd
CommitLineData
c5e38b74
JR
1<?xml version="1.0" encoding="UTF-8"?>
2<!--
3Copyright (c) 2014 - Oliver Cotte <olivier.cotte@polymtl.ca>
4 - Jonathan Rajotte <jonathan.r.julien@gmail.com>
5
6Permission is hereby granted, free of charge, to any person obtaining a copy
7of this software and associated documentation files (the "Software"), to deal
8in the Software without restriction, including without limitation the rights
9to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10copies of the Software, and to permit persons to whom the Software is
11furnished to do so, subject to the following conditions:
12
13The above copyright notice and this permission notice shall be included in
14all copies or substantial portions of the Software.
15
16THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22THE SOFTWARE.
23-->
24<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
25 elementFormDefault="qualified" version="2.5">
26
27 <!-- Maps to the uint32_t type -->
28 <xs:simpleType name="uint32_type">
29 <xs:restriction base="xs:integer">
30 <xs:minInclusive value="0" />
31 <xs:maxInclusive value="4294967295" />
32 </xs:restriction>
33 </xs:simpleType>
34
35 <!-- Maps to the uint64_t type -->
36 <xs:simpleType name="uint64_type">
37 <xs:restriction base="xs:integer">
38 <xs:minInclusive value="0" />
39 <xs:maxInclusive value="18446744073709551615" />
40 </xs:restriction>
41 </xs:simpleType>
42
43 <!-- Maps to the char name[LTTNG_SYMBOL_NAME_LEN] -->
44 <xs:simpleType name="name_type">
45 <xs:restriction base="xs:string">
46 <xs:maxLength value="255" />
47 </xs:restriction>
48 </xs:simpleType>
49
50 <!-- Maps to the lttng_event_type enum -->
51 <xs:simpleType name="event_type_type">
52 <xs:restriction base="xs:string">
53 <xs:enumeration value="ALL" />
54 <xs:enumeration value="TRACEPOINT" />
55 <xs:enumeration value="PROBE" />
56 <xs:enumeration value="FUNCTION" />
57 <xs:enumeration value="FUNCTION_ENTRY" />
58 <xs:enumeration value="NOOP" />
59 <xs:enumeration value="SYSCALL" />
60 <xs:enumeration value="KPROBE" />
61 <xs:enumeration value="KRETPROBE" />
62 </xs:restriction>
63 </xs:simpleType>
64
65 <!-- Maps to the lttng_event_field_type enum -->
66 <xs:simpleType name="event_field_type_type">
67 <xs:restriction base="xs:string">
68 <xs:enumeration value="OTHER" />
69 <xs:enumeration value="INTEGER" />
70 <xs:enumeration value="ENUM" />
71 <xs:enumeration value="FLOAT" />
72 <xs:enumeration value="STRING" />
73 </xs:restriction>
74 </xs:simpleType>
75
76 <!-- Maps to the lttng_loglevel_type enum -->
77 <xs:simpleType name="loglevel_type">
78 <xs:restriction base="xs:string">
79 <xs:enumeration value="ALL" />
80 <xs:enumeration value="RANGE" />
81 <xs:enumeration value="SINGLE" />
82 <xs:enumeration value="UNKNOWN" />
83 </xs:restriction>
84 </xs:simpleType>
85
89b72577
JRJ
86 <!-- Maps to the lttng_loglevel_type enum -->
87 <xs:simpleType name="context_type_type">
88 <xs:restriction base="xs:string">
89 <xs:enumeration value="PERF_COUNTER" />
90 <xs:enumeration value="PERF_CPU_COUNTER" />
91 <xs:enumeration value="PERF_THREAD_COUNTER" />
92 <xs:enumeration value="PID" />
93 <xs:enumeration value="PROCNAME" />
94 <xs:enumeration value="PRIO" />
95 <xs:enumeration value="NICE" />
96 <xs:enumeration value="VPID" />
97 <xs:enumeration value="TID" />
98 <xs:enumeration value="VTID" />
99 <xs:enumeration value="PPID" />
100 <xs:enumeration value="VPPID" />
101 <xs:enumeration value="PTHREAD_ID" />
102 <xs:enumeration value="HOSTNAME" />
103 <xs:enumeration value="IP" />
104 </xs:restriction>
105 </xs:simpleType>
106
c5e38b74
JR
107 <!-- Maps to loglevel_string char * -->
108 <xs:simpleType name="loglevel_string_type">
109 <xs:restriction base="xs:string">
110 <xs:enumeration value="" />
111 <xs:enumeration value="TRACE_EMERG" />
112 <xs:enumeration value="TRACE_ALERT" />
113 <xs:enumeration value="TRACE_CRIT" />
114 <xs:enumeration value="TRACE_ERR" />
115 <xs:enumeration value="TRACE_WARNING" />
116 <xs:enumeration value="TRACE_NOTICE" />
117 <xs:enumeration value="TRACE_INFO" />
118 <xs:enumeration value="TRACE_DEBUG_SYSTEM" />
119 <xs:enumeration value="TRACE_DEBUG_PROGRAM" />
120 <xs:enumeration value="TRACE_DEBUG_PROCESS" />
121 <xs:enumeration value="TRACE_DEBUG_MODULE" />
122 <xs:enumeration value="TRACE_DEBUG_UNIT" />
123 <xs:enumeration value="TRACE_DEBUG_FUNCTION" />
124 <xs:enumeration value="TRACE_DEBUG_LINE" />
125 <xs:enumeration value="TRACE_DEBUG" />
126 <xs:enumeration value="UNKNOWN" />
127 </xs:restriction>
128 </xs:simpleType>
129
7e66b1b0
JRJ
130 <!-- Maps to the lttng_calibrate_type enum -->
131 <xs:simpleType name="calibrate_type_type">
132 <xs:restriction base="xs:string">
133 <xs:enumeration value="FUNCTION" />
134 </xs:restriction>
135 </xs:simpleType>
136
c5e38b74
JR
137 <!-- Maps to the lttng_event_probe_attr struct -->
138 <xs:complexType name="event_probe_attributes_type">
139 <xs:all>
140 <xs:element name="address" type="uint64_type" />
141 <xs:element name="offset" type="uint64_type" />
142 <xs:element name="symbol_name" type="name_type" />
143 </xs:all>
144 </xs:complexType>
145
146 <!-- Maps to the lttng_event_function_attr struct -->
147 <xs:complexType name="event_ftrace_attributes_type">
148 <xs:all>
149 <xs:element name="symbol_name" type="name_type" />
150 </xs:all>
151 </xs:complexType>
152
153 <!-- Maps to per event type configuration -->
154 <xs:complexType name="event_attributes_type">
155 <xs:choice>
156 <xs:element name="probe_attributes" type="event_probe_attributes_type" />
157 <xs:element name="function_attributes" type="event_ftrace_attributes_type" />
158 </xs:choice>
159 </xs:complexType>
160
f4a088f7 161 <!-- Maps to exclusion type -->
89476427
JRJ
162 <xs:complexType name="event_exclusion_list_type">
163 <xs:sequence>
164 <xs:element name="exclusion" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
165 </xs:sequence>
166 </xs:complexType>
167
c5e38b74
JR
168 <!-- Maps to lttng_event struct -->
169 <xs:complexType name="event_type">
170 <xs:all>
171 <xs:element name="type" type="event_type_type" default="TRACEPOINT" minOccurs="0" />
172 <xs:element name="name" type="name_type" minOccurs="0" />
173 <xs:element name="loglevel_type" type="loglevel_type" default="ALL" minOccurs="0" />
174 <xs:element name="loglevel" type="loglevel_string_type" default="" minOccurs="0" />
175 <xs:element name="enabled" type="xs:boolean" default="false" minOccurs="0" />
176 <xs:element name="filter" type="xs:boolean" minOccurs="0" />
177 <xs:element name="exclusion" type="xs:boolean" minOccurs="0" />
89476427 178 <xs:element name="exclusions" type="event_exclusion_list_type" minOccurs="0"/>
c5e38b74
JR
179 <xs:element name="attributes" type="event_attributes_type" minOccurs="0" />
180 <xs:element name="event_fields" type="event_fields_type" minOccurs="0" />
89476427 181 <xs:element name="success" type="xs:boolean" minOccurs="0" />
c5e38b74
JR
182 </xs:all>
183 </xs:complexType>
184
185 <!-- Maps to mi_lttng_version struct -->
186 <xs:complexType name="version_type">
187 <xs:all>
188 <xs:element name="name" type="name_type" />
189 <xs:element name="string" type="name_type" />
190 <xs:element name="major" type="uint32_type" />
191 <xs:element name="url" type="xs:string" />
192 <xs:element name="minor" type="uint32_type" />
314d5222 193 <xs:element name="commit" type="xs:string" />
c5e38b74
JR
194 <xs:element name="license" type="xs:string" />
195 <xs:element name="patchLevel" type="uint32_type" />
196 <xs:element name="description" type="xs:string" />
197 </xs:all>
198 </xs:complexType>
199
f4a088f7 200 <!-- Maps to an array of event -->
c5e38b74
JR
201 <xs:complexType name="event_list_type">
202 <xs:sequence>
203 <xs:element name="event" type="event_type" minOccurs="0" maxOccurs="unbounded" />
204 </xs:sequence>
205 </xs:complexType>
206
207 <!-- Maps to the lttng_domain_type enum -->
208 <xs:simpleType name="domain_type_type">
209 <xs:restriction base="xs:string">
210 <xs:enumeration value="KERNEL"/>
211 <xs:enumeration value="UST"/>
212 <xs:enumeration value="JUL"/>
213 </xs:restriction>
214 </xs:simpleType>
215
216 <!-- Maps to the lttng_buffer_type enum -->
217 <xs:simpleType name="domain_buffer_type">
218 <xs:restriction base="xs:string">
219 <xs:enumeration value="PER_PID"/>
220 <xs:enumeration value="PER_UID"/>
221 <xs:enumeration value="GLOBAL"/>
222 </xs:restriction>
223 </xs:simpleType>
224
f4a088f7 225 <!-- Maps to the type mode of a channel -->
c5e38b74
JR
226 <xs:simpleType name="channel_overwrite_mode_type">
227 <xs:restriction base="xs:string">
228 <xs:enumeration value="DISCARD" />
229 <xs:enumeration value="OVERWRITE" />
230 </xs:restriction>
231 </xs:simpleType>
232
233 <!-- Maps to the lttng_event_output enum -->
234 <xs:simpleType name="event_output_type">
235 <xs:restriction base="xs:string">
236 <xs:enumeration value="SPLICE" />
237 <xs:enumeration value="MMAP" />
238 </xs:restriction>
239 </xs:simpleType>
240
f4a088f7 241 <!-- map to a pid -->
c5e38b74
JR
242 <xs:complexType name="pid_type">
243 <xs:all>
f4a088f7
JRJ
244 <xs:element name="id" type="xs:int" />
245 <xs:element name="name" type="name_type" />
c5e38b74
JR
246 <xs:element name="events" type="event_list_type" minOccurs="0" />
247 </xs:all>
248 </xs:complexType>
249
f4a088f7 250 <!-- maps to an array of pid -->
c5e38b74
JR
251 <xs:complexType name="pids_type">
252 <xs:sequence>
253 <xs:element name="pid" type="pid_type" minOccurs="0" maxOccurs="unbounded" />
254 </xs:sequence>
255 </xs:complexType>
256
257 <!-- Maps to struct lttng_domain and contains channels -->
258 <xs:complexType name="domain_type">
259 <xs:all>
f4a088f7 260 <xs:element name="type" type="domain_type_type" />
7e66b1b0 261 <xs:element name="buffer_type" type="domain_buffer_type" />
c5e38b74
JR
262 <xs:element name="pids" type="pids_type" minOccurs="0" />
263 <xs:element name="channels" type="channels_type" minOccurs="0" />
264 <xs:element name="events" type="event_list_type" minOccurs="0" />
265 </xs:all>
266 </xs:complexType>
267
268 <!-- Maps to struct lttng_channel -->
269 <xs:complexType name="channel_type">
270 <xs:all>
f4a088f7
JRJ
271 <xs:element name="name" type="name_type" />
272 <xs:element name="enabled" type="xs:boolean" default="true" minOccurs="0" />
273 <xs:element name="attributes" type="channel_attributes_type" minOccurs="0" />
274 <xs:element name="events" type="event_list_type" minOccurs="0" />
c5e38b74
JR
275 </xs:all>
276 </xs:complexType>
277
278 <!-- Maps to struct lttng_channel_attr -->
279 <xs:complexType name="channel_attributes_type">
280 <xs:all>
f4a088f7
JRJ
281 <xs:element name="overwrite_mode" type="channel_overwrite_mode_type" default="DISCARD" minOccurs="0" />
282 <xs:element name="subbuffer_size" type="uint64_type" minOccurs="0" /> <!-- bytes -->
283 <xs:element name="subbuffer_count" type="uint64_type" default="4" minOccurs="0" />
284 <xs:element name="switch_timer_interval" type="uint32_type" default="0" minOccurs="0" /> <!-- usec -->
285 <xs:element name="read_timer_interval" type="uint32_type" /> <!-- usec -->
286 <xs:element name="output_type" type="event_output_type" />
287 <xs:element name="tracefile_size" type="uint64_type" default="0" minOccurs="0" /> <!-- bytes -->
288 <xs:element name="tracefile_count" type="uint64_type" default="0" minOccurs="0" />
289 <xs:element name="live_timer_interval" type="uint32_type" default="0" minOccurs="0" /> <!-- usec -->
c5e38b74
JR
290 </xs:all>
291 </xs:complexType>
292
50534d6f
JRJ
293 <!-- Maps to struct lttng_snapshot_output -->
294 <xs:complexType name="snapshot_type">
295 <xs:all>
296 <xs:element name="id" type="uint32_type" minOccurs="0" />
297 <xs:element name="max_size" type="uint64_type" minOccurs="0" />
298 <xs:element name="name" type="name_type" minOccurs="0" />
299 <xs:element name="session_name" type="name_type" minOccurs="0" />
f4a088f7
JRJ
300 <xs:element name="ctrl_url" type="name_type" minOccurs="0" />
301 <xs:element name="data_url" type="name_type" minOccurs="0" />
50534d6f
JRJ
302 </xs:all>
303 </xs:complexType>
304
305 <xs:complexType name="snapshots_type">
306 <xs:sequence>
307 <xs:element name="snapshot" type="snapshot_type" minOccurs="0" maxOccurs="unbounded" />
308 </xs:sequence>
309 </xs:complexType>
310
c5e38b74
JR
311 <xs:complexType name="channels_type">
312 <xs:sequence>
313 <xs:element name="channel" type="channel_type" minOccurs="0" maxOccurs="unbounded" />
314 </xs:sequence>
315 </xs:complexType>
316
f4a088f7 317 <!-- Maps to a lttng_session -->
c5e38b74
JR
318 <xs:complexType name="session_type">
319 <xs:all>
320 <xs:element name="name" type="name_type" />
1734c658
JRJ
321 <xs:element name="path" type="name_type" minOccurs="0" />
322 <xs:element name="enabled" type="xs:boolean" default="false" minOccurs="0" />
323 <xs:element name="snapshot_mode" type="uint32_type" minOccurs="0" />
324 <xs:element name="live_timer_interval" type="uint32_type" minOccurs="0" />
c5e38b74
JR
325 <xs:element name="channels" type="channels_type" minOccurs="0" />
326 <xs:element name="domains" type="domains_type" minOccurs="0" />
50534d6f 327 <xs:element name="snapshots" type="snapshots_type" minOccurs="0" />
c5e38b74
JR
328 </xs:all>
329 </xs:complexType>
330
f4a088f7 331 <!-- Maps to a lttng_event_field -->
c5e38b74
JR
332 <xs:complexType name="event_field_type">
333 <xs:all>
334 <xs:element name="name" type="name_type" />
f4a088f7
JRJ
335 <xs:element name="type" type="event_field_type_type" />
336 <xs:element name="nowrite" type="xs:int" />
c5e38b74
JR
337 </xs:all>
338 </xs:complexType>
339
f4a088f7 340 <!-- Map to the save command -->
1734c658
JRJ
341 <xs:complexType name="save_type">
342 <xs:all>
343 <xs:element name="session" type="session_type" />
f4a088f7 344 <xs:element name="path" type="name_type" />
1734c658
JRJ
345 </xs:all>
346 </xs:complexType>
347
f4a088f7 348 <!-- Map to the load command -->
1734c658
JRJ
349 <xs:complexType name="load_type">
350 <xs:all>
351 <xs:element name="session" type="session_type" />
f4a088f7 352 <xs:element name="path" type="name_type" />
1734c658
JRJ
353 </xs:all>
354 </xs:complexType>
c5e38b74 355
7e66b1b0
JRJ
356 <!-- Maps to struct lttng_calibrate -->
357 <xs:complexType name="calibrate_type">
358 <xs:all>
359 <xs:element name="type" type="calibrate_type_type" />
360 </xs:all>
361 </xs:complexType>
362
89b72577
JRJ
363 <!-- Map to lttng_event_perf_counter_ctx -->
364 <xs:complexType name="perf_counter_context_type">
365 <xs:all>
366 <xs:element name="type" type="uint32_type" />
367 <xs:element name="config" type="uint64_type" />
368 <xs:element name="name" type="name_type" />
369 </xs:all>
370 </xs:complexType>
371
372 <!-- Map to lttng_event_context -->
373 <xs:complexType name="context_type">
374 <xs:all>
375 <xs:element name="type" type="context_type_type" />
376 <xs:element name="perf_counter_context" type="perf_counter_context_type" minOccurs="0" />
89b72577
JRJ
377 <xs:element name="success" type="xs:boolean" default="false" minOccurs="0" />
378 </xs:all>
379 </xs:complexType>
380
f4a088f7 381 <!-- Maps to an array of domain -->
c5e38b74
JR
382 <xs:complexType name="domains_type">
383 <xs:sequence>
384 <xs:element name="domain" type="domain_type" minOccurs="0" maxOccurs="unbounded" />
385 </xs:sequence>
386 </xs:complexType>
387
f4a088f7 388 <!-- Maps to an array of session -->
c5e38b74
JR
389 <xs:complexType name="sessions_type">
390 <xs:sequence>
391 <xs:element name="session" type="session_type" minOccurs="0" maxOccurs="unbounded" />
392 </xs:sequence>
393 </xs:complexType>
394
f4a088f7 395 <!-- Maps to an array of event_field -->
c5e38b74
JR
396 <xs:complexType name="event_fields_type">
397 <xs:sequence>
398 <xs:element name="event_field" type="event_field_type" minOccurs="0" maxOccurs="unbounded" />
399 </xs:sequence>
400 </xs:complexType>
401
f4a088f7 402 <!-- Maps to an array of context -->
89b72577
JRJ
403 <xs:complexType name="contexts_type">
404 <xs:sequence>
405 <xs:element name="context" type="context_type" minOccurs="0" maxOccurs="unbounded" />
406 </xs:sequence>
407 </xs:complexType>
408
f4a088f7 409 <!-- Maps to an action dutring snapshot command -->
50534d6f
JRJ
410 <xs:complexType name="snapshot_action_type">
411 <xs:sequence>
412 <xs:element name="name" type="snapshot_actiontype_type" minOccurs="0" />
413 <xs:element name="output" type="output_type" minOccurs="0" />
414 </xs:sequence>
415 </xs:complexType>
416
417 <!-- Type of snapshot commands -->
418 <xs:simpleType name="snapshot_actiontype_type">
419 <xs:restriction base="xs:string">
f4a088f7
JRJ
420 <xs:enumeration value="list-output" />
421 <xs:enumeration value="del-output" />
422 <xs:enumeration value="add-output" />
423 <xs:enumeration value="record-output" />
50534d6f
JRJ
424 </xs:restriction>
425 </xs:simpleType>
426
c5e38b74
JR
427 <xs:complexType name="output_type">
428 <xs:choice>
429 <xs:element name="domains" type="domains_type" minOccurs="0" />
50534d6f 430 <xs:element name="session" type="session_type" minOccurs="0" />
c5e38b74 431 <xs:element name="sessions" type="sessions_type" minOccurs="0" />
37d03ff7 432 <xs:element name="session" type="session_type" minOccurs="0" />
50534d6f 433 <xs:element name="snapshot_action" type="snapshot_action_type" minOccurs="0" />
c5e38b74 434 <xs:element name="version" type="version_type" minOccurs="0" />
1734c658
JRJ
435 <xs:element name="save" type="save_type" minOccurs="0" />
436 <xs:element name="load" type="load_type" minOccurs="0" />
7e66b1b0 437 <xs:element name="calibrate" type="calibrate_type" minOccurs="0" />
89b72577 438 <xs:element name="contexts" type="contexts_type" minOccurs="0" />
acc09215 439 <xs:element name="channels" type="channels_type" minOccurs="0" />
89476427 440 <xs:element name="events" type="event_list_type" minOccurs="0" />
e4d484a5 441 <xs:element name="channel" type="channel_type" minOccurs="0" />
50534d6f 442 <xs:element name="channels" type="channels_type" minOccurs="0" />
c5e38b74
JR
443 </xs:choice>
444 </xs:complexType>
445
446 <!-- Maps to the mi_lttng commands -->
447 <xs:simpleType name="command_string_type">
448 <xs:restriction base="xs:string">
37d03ff7 449 <xs:enumeration value="create" />
c5e38b74 450 <xs:enumeration value="list" />
50534d6f 451 <xs:enumeration value="snapshot" />
c5e38b74 452 <xs:enumeration value="version" />
1734c658
JRJ
453 <xs:enumeration value="save" />
454 <xs:enumeration value="load" />
1cfc0bc8 455 <xs:enumeration value="start" />
e5b83100 456 <xs:enumeration value="stop" />
65f25c66 457 <xs:enumeration value="destroy" />
7e66b1b0 458 <xs:enumeration value="calibrate" />
89b72577 459 <xs:enumeration value="add-context" />
acc09215 460 <xs:enumeration value="enable-channel" />
89476427 461 <xs:enumeration value="enable-event" />
ce91cd0b 462 <xs:enumeration value="set-session" />
e4d484a5 463 <xs:enumeration value="disable-event" />
50534d6f 464 <xs:enumeration value="disable-channel" />
c5e38b74
JR
465 </xs:restriction>
466 </xs:simpleType>
467
468 <xs:element name="command">
469 <xs:complexType>
470 <xs:all>
471 <xs:element name="name" type="command_string_type" maxOccurs="1" />
472 <xs:element name="output" type="output_type" maxOccurs="1" />
1734c658 473 <xs:element name="success" type="xs:boolean" minOccurs="0" maxOccurs="1" />
c5e38b74
JR
474 </xs:all>
475 </xs:complexType>
476 </xs:element>
477</xs:schema>
This page took 0.04347 seconds and 4 git commands to generate.