Docs: Grammar fixes in mi_lttng.xsd
[lttng-tools.git] / src / common / mi_lttng.xsd
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3 Copyright (c) 2014 - Oliver Cotte <olivier.cotte@polymtl.ca>
4 - Jonathan Rajotte <jonathan.r.julien@gmail.com>
5
6 Permission is hereby granted, free of charge, to any person obtaining a copy
7 of this software and associated documentation files (the "Software"), to deal
8 in the Software without restriction, including without limitation the rights
9 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 copies of the Software, and to permit persons to whom the Software is
11 furnished to do so, subject to the following conditions:
12
13 The above copyright notice and this permission notice shall be included in
14 all copies or substantial portions of the Software.
15
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 THE 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
86 <!-- Maps to the lttng_event_context_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
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="JUL_OFF" />
127 <xs:enumeration value="JUL_SEVERE" />
128 <xs:enumeration value="JUL_WARNING" />
129 <xs:enumeration value="JUL_INFO" />
130 <xs:enumeration value="JUL_CONFIG" />
131 <xs:enumeration value="JUL_FINE" />
132 <xs:enumeration value="JUL_FINER" />
133 <xs:enumeration value="JUL_FINEST" />
134 <xs:enumeration value="JUL_ALL" />
135 <xs:enumeration value="LOG4J_OFF" />
136 <xs:enumeration value="LOG4J_FATAL" />
137 <xs:enumeration value="LOG4J_ERROR" />
138 <xs:enumeration value="LOG4J_WARN" />
139 <xs:enumeration value="LOG4J_INFO" />
140 <xs:enumeration value="LOG4J_DEBUG" />
141 <xs:enumeration value="LOG4J_TRACE" />
142 <xs:enumeration value="LOG4J_ALL" />
143 <xs:enumeration value="PYTHON_CRITICAL" />
144 <xs:enumeration value="PYTHON_ERROR" />
145 <xs:enumeration value="PYTHON_WARNING" />
146 <xs:enumeration value="PYTHON_INFO" />
147 <xs:enumeration value="PYTHON_DEBUG" />
148 <xs:enumeration value="PYTHON_NOTSET" />
149 <xs:enumeration value="UNKNOWN" />
150 </xs:restriction>
151 </xs:simpleType>
152
153 <!-- Maps to the lttng_calibrate_type enum -->
154 <xs:simpleType name="calibrate_type_type">
155 <xs:restriction base="xs:string">
156 <xs:enumeration value="FUNCTION" />
157 </xs:restriction>
158 </xs:simpleType>
159
160 <!-- Maps to the lttng_event_probe_attr struct -->
161 <xs:complexType name="event_probe_attributes_type">
162 <xs:all>
163 <xs:element name="address" type="uint64_type" minOccurs="0" />
164 <xs:element name="offset" type="uint64_type" minOccurs="0" />
165 <xs:element name="symbol_name" type="name_type" minOccurs="0" />
166 </xs:all>
167 </xs:complexType>
168
169 <!-- Maps to the lttng_event_function_attr struct -->
170 <xs:complexType name="event_ftrace_attributes_type">
171 <xs:all>
172 <xs:element name="symbol_name" type="name_type" />
173 </xs:all>
174 </xs:complexType>
175
176 <!-- Maps to per event type configuration -->
177 <xs:complexType name="event_attributes_type">
178 <xs:choice>
179 <xs:element name="probe_attributes" type="event_probe_attributes_type" />
180 <xs:element name="function_attributes" type="event_ftrace_attributes_type" />
181 </xs:choice>
182 </xs:complexType>
183
184 <!-- Maps to exclusion type -->
185 <xs:complexType name="event_exclusion_list_type">
186 <xs:sequence>
187 <xs:element name="exclusion" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
188 </xs:sequence>
189 </xs:complexType>
190
191 <!-- Maps to lttng_event struct -->
192 <xs:complexType name="event_type">
193 <xs:all>
194 <xs:element name="type" type="event_type_type" default="TRACEPOINT" minOccurs="0" />
195 <xs:element name="name" type="name_type" minOccurs="0" />
196 <xs:element name="loglevel_type" type="loglevel_type" default="ALL" minOccurs="0" />
197 <xs:element name="loglevel" type="loglevel_string_type" default="" minOccurs="0" />
198 <xs:element name="enabled" type="xs:boolean" default="false" minOccurs="0" />
199 <xs:element name="filter" type="xs:boolean" minOccurs="0" />
200 <xs:element name="exclusion" type="xs:boolean" minOccurs="0" />
201 <xs:element name="exclusions" type="event_exclusion_list_type" minOccurs="0"/>
202 <xs:element name="attributes" type="event_attributes_type" minOccurs="0" />
203 <xs:element name="event_fields" type="event_fields_type" minOccurs="0" />
204 <xs:element name="success" type="xs:boolean" minOccurs="0" />
205 </xs:all>
206 </xs:complexType>
207
208 <!-- Maps to mi_lttng_version struct -->
209 <xs:complexType name="version_type">
210 <xs:all>
211 <xs:element name="name" type="name_type" />
212 <xs:element name="string" type="name_type" />
213 <xs:element name="major" type="uint32_type" />
214 <xs:element name="url" type="xs:string" />
215 <xs:element name="minor" type="uint32_type" />
216 <xs:element name="commit" type="xs:string" />
217 <xs:element name="license" type="xs:string" />
218 <xs:element name="patchLevel" type="uint32_type" />
219 <xs:element name="description" type="xs:string" />
220 </xs:all>
221 </xs:complexType>
222
223 <!-- Maps to an array of event -->
224 <xs:complexType name="event_list_type">
225 <xs:sequence>
226 <xs:element name="event" type="event_type" minOccurs="0" maxOccurs="unbounded" />
227 </xs:sequence>
228 </xs:complexType>
229
230 <!-- Maps to the lttng_domain_type enum -->
231 <xs:simpleType name="domain_type_type">
232 <xs:restriction base="xs:string">
233 <xs:enumeration value="KERNEL"/>
234 <xs:enumeration value="UST"/>
235 <xs:enumeration value="JUL"/>
236 <xs:enumeration value="LOG4J"/>
237 <xs:enumeration value="PYTHON"/>
238 </xs:restriction>
239 </xs:simpleType>
240
241 <!-- Maps to the lttng_buffer_type enum -->
242 <xs:simpleType name="domain_buffer_type">
243 <xs:restriction base="xs:string">
244 <xs:enumeration value="PER_PID"/>
245 <xs:enumeration value="PER_UID"/>
246 <xs:enumeration value="GLOBAL"/>
247 </xs:restriction>
248 </xs:simpleType>
249
250 <!-- Maps to the type mode of a channel -->
251 <xs:simpleType name="channel_overwrite_mode_type">
252 <xs:restriction base="xs:string">
253 <xs:enumeration value="DISCARD" />
254 <xs:enumeration value="OVERWRITE" />
255 </xs:restriction>
256 </xs:simpleType>
257
258 <!-- Maps to the lttng_event_output enum -->
259 <xs:simpleType name="event_output_type">
260 <xs:restriction base="xs:string">
261 <xs:enumeration value="SPLICE" />
262 <xs:enumeration value="MMAP" />
263 </xs:restriction>
264 </xs:simpleType>
265
266 <!-- map to a pid -->
267 <xs:complexType name="pid_type">
268 <xs:all>
269 <xs:element name="id" type="xs:int" />
270 <xs:element name="name" type="name_type" />
271 <xs:element name="events" type="event_list_type" minOccurs="0" />
272 </xs:all>
273 </xs:complexType>
274
275 <!-- maps to an array of pid -->
276 <xs:complexType name="pids_type">
277 <xs:sequence>
278 <xs:element name="pid" type="pid_type" minOccurs="0" maxOccurs="unbounded" />
279 </xs:sequence>
280 </xs:complexType>
281
282 <!-- Maps to struct lttng_domain and contains channels -->
283 <xs:complexType name="domain_type">
284 <xs:all>
285 <xs:element name="type" type="domain_type_type" />
286 <xs:element name="buffer_type" type="domain_buffer_type" />
287 <xs:element name="pids" type="pids_type" minOccurs="0" />
288 <xs:element name="channels" type="channels_type" minOccurs="0" />
289 <xs:element name="events" type="event_list_type" minOccurs="0" />
290 </xs:all>
291 </xs:complexType>
292
293 <!-- Maps to struct lttng_channel -->
294 <xs:complexType name="channel_type">
295 <xs:all>
296 <xs:element name="name" type="name_type" />
297 <xs:element name="enabled" type="xs:boolean" default="true" minOccurs="0" />
298 <xs:element name="attributes" type="channel_attributes_type" minOccurs="0" />
299 <xs:element name="events" type="event_list_type" minOccurs="0" />
300 <xs:element name="success" type="xs:boolean" default="false" minOccurs="0" />
301 </xs:all>
302 </xs:complexType>
303
304 <!-- Maps to struct lttng_channel_attr -->
305 <xs:complexType name="channel_attributes_type">
306 <xs:all>
307 <xs:element name="overwrite_mode" type="channel_overwrite_mode_type" default="DISCARD" minOccurs="0" />
308 <xs:element name="subbuffer_size" type="uint64_type" minOccurs="0" /> <!-- bytes -->
309 <xs:element name="subbuffer_count" type="uint64_type" default="4" minOccurs="0" />
310 <xs:element name="switch_timer_interval" type="uint32_type" default="0" minOccurs="0" /> <!-- usec -->
311 <xs:element name="read_timer_interval" type="uint32_type" /> <!-- usec -->
312 <xs:element name="output_type" type="event_output_type" />
313 <xs:element name="tracefile_size" type="uint64_type" default="0" minOccurs="0" /> <!-- bytes -->
314 <xs:element name="tracefile_count" type="uint64_type" default="0" minOccurs="0" />
315 <xs:element name="live_timer_interval" type="uint32_type" default="0" minOccurs="0" /> <!-- usec -->
316 </xs:all>
317 </xs:complexType>
318
319 <!-- Maps to struct lttng_snapshot_output -->
320 <xs:complexType name="snapshot_type">
321 <xs:all>
322 <xs:element name="id" type="uint32_type" minOccurs="0" />
323 <xs:element name="max_size" type="uint64_type" minOccurs="0" />
324 <xs:element name="name" type="name_type" minOccurs="0" />
325 <xs:element name="session_name" type="name_type" minOccurs="0" />
326 <xs:element name="ctrl_url" type="name_type" minOccurs="0" />
327 <xs:element name="data_url" type="name_type" minOccurs="0" />
328 </xs:all>
329 </xs:complexType>
330
331 <xs:complexType name="snapshots_type">
332 <xs:sequence>
333 <xs:element name="snapshot" type="snapshot_type" minOccurs="0" maxOccurs="unbounded" />
334 </xs:sequence>
335 </xs:complexType>
336
337 <xs:complexType name="channels_type">
338 <xs:sequence>
339 <xs:element name="channel" type="channel_type" minOccurs="0" maxOccurs="unbounded" />
340 </xs:sequence>
341 </xs:complexType>
342
343 <!-- Maps to a lttng_session -->
344 <xs:complexType name="session_type">
345 <xs:all>
346 <xs:element name="name" type="name_type" />
347 <xs:element name="path" type="name_type" minOccurs="0" />
348 <xs:element name="enabled" type="xs:boolean" default="false" minOccurs="0" />
349 <xs:element name="snapshot_mode" type="uint32_type" minOccurs="0" />
350 <xs:element name="live_timer_interval" type="uint32_type" minOccurs="0" />
351 <xs:element name="channels" type="channels_type" minOccurs="0" />
352 <xs:element name="domains" type="domains_type" minOccurs="0" />
353 <xs:element name="snapshots" type="snapshots_type" minOccurs="0" />
354 </xs:all>
355 </xs:complexType>
356
357 <!-- Maps to a lttng_event_field -->
358 <xs:complexType name="event_field_type">
359 <xs:all>
360 <xs:element name="name" type="name_type" />
361 <xs:element name="type" type="event_field_type_type" />
362 <xs:element name="nowrite" type="xs:int" />
363 </xs:all>
364 </xs:complexType>
365
366 <!-- Maps to the save command -->
367 <xs:complexType name="save_type">
368 <xs:all>
369 <xs:element name="session" type="session_type" />
370 <xs:element name="path" type="name_type" />
371 </xs:all>
372 </xs:complexType>
373
374 <!-- Maps to the load command -->
375 <xs:complexType name="load_type">
376 <xs:all>
377 <xs:element name="session" type="session_type" />
378 <xs:element name="path" type="name_type" />
379 </xs:all>
380 </xs:complexType>
381
382 <!-- Maps to struct lttng_calibrate -->
383 <xs:complexType name="calibrate_type">
384 <xs:all>
385 <xs:element name="type" type="calibrate_type_type" />
386 </xs:all>
387 </xs:complexType>
388
389 <!-- Maps to lttng_event_perf_counter_ctx -->
390 <xs:complexType name="perf_counter_context_type">
391 <xs:all>
392 <xs:element name="type" type="uint32_type" />
393 <xs:element name="config" type="uint64_type" />
394 <xs:element name="name" type="name_type" />
395 </xs:all>
396 </xs:complexType>
397
398 <!-- Maps to lttng_event_context -->
399 <xs:complexType name="context_type">
400 <xs:all>
401 <xs:element name="type" type="context_type_type" />
402 <xs:element name="perf_counter_context" type="perf_counter_context_type" minOccurs="0" />
403 <xs:element name="success" type="xs:boolean" default="false" minOccurs="0" />
404 </xs:all>
405 </xs:complexType>
406
407 <!-- Maps to an array of domain -->
408 <xs:complexType name="domains_type">
409 <xs:sequence>
410 <xs:element name="domain" type="domain_type" minOccurs="0" maxOccurs="unbounded" />
411 </xs:sequence>
412 </xs:complexType>
413
414 <!-- Maps to an array of session -->
415 <xs:complexType name="sessions_type">
416 <xs:sequence>
417 <xs:element name="session" type="session_type" minOccurs="0" maxOccurs="unbounded" />
418 </xs:sequence>
419 </xs:complexType>
420
421 <!-- Maps to an array of event_field -->
422 <xs:complexType name="event_fields_type">
423 <xs:sequence>
424 <xs:element name="event_field" type="event_field_type" minOccurs="0" maxOccurs="unbounded" />
425 </xs:sequence>
426 </xs:complexType>
427
428 <!-- Maps to an array of context -->
429 <xs:complexType name="contexts_type">
430 <xs:sequence>
431 <xs:element name="context" type="context_type" minOccurs="0" maxOccurs="unbounded" />
432 </xs:sequence>
433 </xs:complexType>
434
435 <!-- Maps to an action dutring snapshot command -->
436 <xs:complexType name="snapshot_action_type">
437 <xs:sequence>
438 <xs:element name="name" type="snapshot_actiontype_type" minOccurs="0" />
439 <xs:element name="output" type="output_type" minOccurs="0" />
440 </xs:sequence>
441 </xs:complexType>
442
443 <!-- Type of snapshot commands -->
444 <xs:simpleType name="snapshot_actiontype_type">
445 <xs:restriction base="xs:string">
446 <xs:enumeration value="list-output" />
447 <xs:enumeration value="del-output" />
448 <xs:enumeration value="add-output" />
449 <xs:enumeration value="record-output" />
450 </xs:restriction>
451 </xs:simpleType>
452
453 <xs:complexType name="output_type">
454 <xs:choice>
455 <xs:element name="domains" type="domains_type" minOccurs="0" />
456 <xs:element name="sessions" type="sessions_type" minOccurs="0" />
457 <xs:element name="session" type="session_type" minOccurs="0" />
458 <xs:element name="snapshot_action" type="snapshot_action_type" minOccurs="0" />
459 <xs:element name="snapshot" type="snapshot_type" minOccurs="0" />
460 <xs:element name="version" type="version_type" minOccurs="0" />
461 <xs:element name="save" type="save_type" minOccurs="0" />
462 <xs:element name="load" type="load_type" minOccurs="0" />
463 <xs:element name="calibrate" type="calibrate_type" minOccurs="0" />
464 <xs:element name="contexts" type="contexts_type" minOccurs="0" />
465 <xs:element name="channels" type="channels_type" minOccurs="0" />
466 <xs:element name="events" type="event_list_type" minOccurs="0" />
467 <xs:element name="channel" type="channel_type" minOccurs="0" />
468 </xs:choice>
469 </xs:complexType>
470
471 <!-- Maps to the mi_lttng commands -->
472 <xs:simpleType name="command_string_type">
473 <xs:restriction base="xs:string">
474 <xs:enumeration value="create" />
475 <xs:enumeration value="list" />
476 <xs:enumeration value="snapshot" />
477 <xs:enumeration value="version" />
478 <xs:enumeration value="save" />
479 <xs:enumeration value="load" />
480 <xs:enumeration value="start" />
481 <xs:enumeration value="stop" />
482 <xs:enumeration value="destroy" />
483 <xs:enumeration value="calibrate" />
484 <xs:enumeration value="add-context" />
485 <xs:enumeration value="enable-channel" />
486 <xs:enumeration value="enable-event" />
487 <xs:enumeration value="set-session" />
488 <xs:enumeration value="disable-event" />
489 <xs:enumeration value="disable-channel" />
490 </xs:restriction>
491 </xs:simpleType>
492
493 <xs:element name="command">
494 <xs:complexType>
495 <xs:all>
496 <xs:element name="name" type="command_string_type" maxOccurs="1" />
497 <xs:element name="output" type="output_type" maxOccurs="1" />
498 <xs:element name="success" type="xs:boolean" minOccurs="0" maxOccurs="1" />
499 </xs:all>
500 </xs:complexType>
501 </xs:element>
502 </xs:schema>
This page took 0.039938 seconds and 5 git commands to generate.