Bump session.xsd version to 2.12
[lttng-tools.git] / src / common / config / session.xsd
CommitLineData
ebfa5166 1<?xml version="1.0" encoding="UTF-8"?>
89aac4d5 2<!--
ab5be9fa 3Copyright (C) 2014 Jérémie Galarneau <jeremie.galarneau@efficios.com>
89aac4d5 4
ab5be9fa 5SPDX-License-Identifier: MIT
89aac4d5 6
89aac4d5 7-->
629bf5b0 8<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
ab8a350b 9elementFormDefault="qualified" version="2.12">
629bf5b0
JG
10
11<xs:simpleType name="name_type">
12 <xs:restriction base="xs:string">
13 <xs:maxLength value="255"/>
14 </xs:restriction>
15</xs:simpleType>
16
17<xs:simpleType name="uint64_type">
18 <xs:restriction base="xs:integer">
19 <xs:minInclusive value="0"/>
20 <xs:maxInclusive value="18446744073709551615"/>
21 </xs:restriction>
22</xs:simpleType>
23
24<xs:simpleType name="uint32_type">
25 <xs:restriction base="xs:integer">
26 <xs:minInclusive value="0"/>
27 <xs:maxInclusive value="4294967295"/>
28 </xs:restriction>
29</xs:simpleType>
30
491d1539
MD
31<!--
32Maps to the range allowed for blocking timeout: -1 (block forever),
330 (do not block), positive integer value (blocking time in usec) limited
34by its signed 32-bit representation when converted to msec.
35-->
36<xs:simpleType name="blocking_timeout_type">
37 <xs:restriction base="xs:integer">
38 <xs:minInclusive value="-1" />
39 <xs:maxInclusive value="2147483648000" />
40 </xs:restriction>
41</xs:simpleType>
42
629bf5b0
JG
43<xs:simpleType name="channel_overwrite_mode_type">
44 <xs:restriction base="xs:string">
45 <xs:enumeration value="DISCARD"/>
46 <xs:enumeration value="OVERWRITE"/>
47 </xs:restriction>
48</xs:simpleType>
49
50<!-- Maps to the lttng_event_output enum -->
51<xs:simpleType name="event_output_type">
52 <xs:restriction base="xs:string">
53 <xs:enumeration value="SPLICE"/>
54 <xs:enumeration value="MMAP"/>
55 </xs:restriction>
56</xs:simpleType>
57
58<!-- Maps to the lttng_loglevel_type enum -->
59<xs:simpleType name="loglevel_type">
60 <xs:restriction base="xs:string">
61 <xs:enumeration value="ALL"/>
62 <xs:enumeration value="RANGE"/>
63 <xs:enumeration value="SINGLE"/>
64 </xs:restriction>
65</xs:simpleType>
66
67<!-- Maps to the lttng_event_type enum -->
68<xs:simpleType name="event_type_type">
69 <xs:restriction base="xs:string">
70 <xs:enumeration value="ALL"/>
71 <xs:enumeration value="TRACEPOINT"/>
72 <xs:enumeration value="PROBE"/>
c1e83fb4 73 <xs:enumeration value="USERSPACE_PROBE"/>
629bf5b0
JG
74 <xs:enumeration value="FUNCTION"/>
75 <xs:enumeration value="FUNCTION_ENTRY"/>
76 <xs:enumeration value="NOOP"/>
77 <xs:enumeration value="SYSCALL"/>
78 <xs:enumeration value="KPROBE"/>
79 <xs:enumeration value="KRETPROBE"/>
80 </xs:restriction>
81</xs:simpleType>
82
83<xs:complexType name="event_probe_attributes_type">
84 <xs:all>
85 <xs:element name="symbol_name" type="name_type" minOccurs="0"/>
86 <xs:element name="address" type="uint64_type" minOccurs="0"/>
87 <xs:element name="offset" type="uint64_type" minOccurs="0"/>
88 </xs:all>
89</xs:complexType>
90
c1e83fb4
FD
91<xs:simpleType name="userspace_probe_lookup_method">
92 <xs:restriction base="xs:string">
93 <xs:enumeration value="DEFAULT"/>
94 <xs:enumeration value="ELF"/>
95 <xs:enumeration value="SDT"/>
96 </xs:restriction>
97</xs:simpleType>
98
99<xs:complexType name="event_userspace_probe_function_attributes_type">
100 <xs:all>
101 <xs:element name="lookup_method" type="userspace_probe_lookup_method"/>
102 <xs:element name="binary_path" type="xs:string"/>
103 <xs:element name="function_name" type="xs:string"/>
104 </xs:all>
105</xs:complexType>
106
107<xs:complexType name="event_userspace_probe_tracepoint_attributes_type">
108 <xs:all>
109 <xs:element name="lookup_method" type="userspace_probe_lookup_method"/>
110 <xs:element name="binary_path" type="xs:string"/>
111 <xs:element name="probe_name" type="xs:string"/>
112 <xs:element name="provider_name" type="xs:string"/>
113 </xs:all>
114</xs:complexType>
115
629bf5b0
JG
116<xs:complexType name="event_ftrace_attributes_type">
117 <xs:all>
118 <xs:element name="symbol_name" type="name_type"/>
119 </xs:all>
120</xs:complexType>
121
122<xs:complexType name="event_attributes_type">
123 <xs:choice>
124 <xs:element name="probe_attributes" type="event_probe_attributes_type"/>
125 <xs:element name="function_attributes" type="event_ftrace_attributes_type"/>
c1e83fb4
FD
126 <xs:element name="userspace_probe_function_attributes" type="event_userspace_probe_function_attributes_type"/>
127 <xs:element name="userspace_probe_tracepoint_attributes" type="event_userspace_probe_tracepoint_attributes_type"/>
629bf5b0
JG
128 </xs:choice>
129</xs:complexType>
130
131<xs:complexType name="event_exclusion_list_type">
132 <xs:sequence>
133 <xs:element name="exclusion" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
134 </xs:sequence>
135</xs:complexType>
136
137<xs:complexType name="event_type">
138 <xs:all>
139 <xs:element name="name" type="name_type" minOccurs="0"/>
140 <xs:element name="enabled" type="xs:boolean" default="true" minOccurs="0"/>
141 <xs:element name="type" type="event_type_type" default="TRACEPOINT" minOccurs="0"/>
142 <xs:element name="loglevel_type" type="loglevel_type" default="ALL" minOccurs="0"/>
143 <xs:element name="loglevel" type="xs:int" default="-1" minOccurs="0"/>
144 <xs:element name="filter" type="xs:string" minOccurs="0"/>
145 <xs:element name="exclusions" type="event_exclusion_list_type" minOccurs="0"/>
146 <xs:element name="attributes" type="event_attributes_type" minOccurs="0"/>
147 </xs:all>
148</xs:complexType>
149
150<xs:complexType name="event_list_type">
151 <xs:sequence>
152 <xs:element name="event" type="event_type" minOccurs="0" maxOccurs="unbounded"/>
153 </xs:sequence>
154</xs:complexType>
155
156<xs:complexType name="event_perf_context_type">
157 <xs:all>
158 <xs:element name="type" type="uint32_type"/>
159 <xs:element name="config" type="uint64_type"/>
160 <xs:element name="name" type="name_type"/>
161 </xs:all>
162</xs:complexType>
163
045fc617
JG
164<xs:complexType name="event_app_context_type">
165 <xs:all>
166 <xs:element name="provider_name" type="xs:string"/>
167 <xs:element name="ctx_name" type="xs:string"/>
168 </xs:all>
169</xs:complexType>
170
629bf5b0
JG
171<!-- Maps to the lttng_event_context_type enum -->
172<xs:simpleType name="event_context_type_type">
173 <xs:restriction base="xs:string">
174 <xs:enumeration value="PID"/>
175 <xs:enumeration value="PROCNAME"/>
176 <xs:enumeration value="PRIO"/>
177 <xs:enumeration value="NICE"/>
178 <xs:enumeration value="VPID"/>
179 <xs:enumeration value="TID"/>
180 <xs:enumeration value="VTID"/>
181 <xs:enumeration value="PPID"/>
182 <xs:enumeration value="VPPID"/>
183 <xs:enumeration value="PTHREAD_ID"/>
184 <xs:enumeration value="HOSTNAME"/>
185 <xs:enumeration value="IP"/>
045fc617 186 <xs:enumeration value="APP"/>
c460810b
FD
187 <xs:enumeration value="INTERRUPTIBLE" />
188 <xs:enumeration value="PREEMPTIBLE" />
189 <xs:enumeration value="NEED_RESCHEDULE" />
190 <xs:enumeration value="MIGRATABLE" />
16c4c991
FD
191 <xs:enumeration value="CALLSTACK_USER" />
192 <xs:enumeration value="CALLSTACK_KERNEL" />
629bf5b0
JG
193 </xs:restriction>
194</xs:simpleType>
195
196<xs:complexType name="event_context_type">
197 <xs:choice>
198 <xs:element name="type" type="event_context_type_type"/>
199 <xs:element name="perf" type="event_perf_context_type"/>
045fc617 200 <xs:element name="app" type="event_app_context_type"/>
629bf5b0
JG
201 </xs:choice>
202</xs:complexType>
203
204<xs:complexType name="event_context_list_type">
205 <xs:sequence>
206 <xs:element name="context" type="event_context_type" minOccurs="0" maxOccurs="unbounded"/>
207 </xs:sequence>
208</xs:complexType>
209
210<!-- Maps to struct lttng_channel -->
211<xs:complexType name="channel_type">
212 <xs:all>
213 <xs:element name="name" type="name_type"/>
214 <xs:element name="enabled" type="xs:boolean" default="true" minOccurs="0"/>
215 <xs:element name="overwrite_mode" type="channel_overwrite_mode_type" default="DISCARD" minOccurs="0"/>
216 <xs:element name="subbuffer_size" type="uint64_type" minOccurs="0"/> <!-- bytes -->
217 <xs:element name="subbuffer_count" type="uint64_type" default="4" minOccurs="0"/>
218 <xs:element name="switch_timer_interval" type="uint32_type" default="0" minOccurs="0"/> <!-- usec -->
219 <xs:element name="read_timer_interval" type="uint32_type"/> <!-- usec -->
491d1539 220 <xs:element name="blocking_timeout" type="blocking_timeout_type" default="0" minOccurs="0" /> <!-- usec -->
629bf5b0
JG
221 <xs:element name="output_type" type="event_output_type"/>
222 <xs:element name="tracefile_size" type="uint64_type" default="0" minOccurs="0"/> <!-- bytes -->
223 <xs:element name="tracefile_count" type="uint64_type" default="0" minOccurs="0"/>
224 <xs:element name="live_timer_interval" type="uint32_type" default="0" minOccurs="0"/> <!-- usec -->
225 <xs:element name="events" type="event_list_type" minOccurs="0"/>
226 <xs:element name="contexts" type="event_context_list_type" minOccurs="0"/>
4fc2b126 227 <xs:element name="monitor_timer_interval" type="uint64_type" default="0" minOccurs="0"/> <!-- usec -->
629bf5b0
JG
228 </xs:all>
229</xs:complexType>
230
231<!-- Maps to the lttng_domain_type enum -->
232<xs:simpleType name="domain_type_type">
233 <xs:restriction base="xs:string">
234 <xs:enumeration value="KERNEL"/>
235 <xs:enumeration value="UST"/>
236 <xs:enumeration value="JUL"/>
ff00898c 237 <xs:enumeration value="LOG4J"/>
0e115563 238 <xs:enumeration value="PYTHON"/>
629bf5b0
JG
239 </xs:restriction>
240</xs:simpleType>
241
242<!-- Maps to the lttng_buffer_type enum -->
243<xs:simpleType name="domain_buffer_type">
244 <xs:restriction base="xs:string">
245 <xs:enumeration value="PER_PID"/>
246 <xs:enumeration value="PER_UID"/>
247 <xs:enumeration value="GLOBAL"/>
248 </xs:restriction>
249</xs:simpleType>
250
251<xs:complexType name="channel_list_type">
252 <xs:sequence>
847a5916 253 <xs:element name="channel" type="channel_type" minOccurs="0" maxOccurs="unbounded" />
629bf5b0
JG
254 </xs:sequence>
255</xs:complexType>
256
159b042f 257<xs:complexType name="pid_value_type">
55c9e7ca 258 <xs:choice minOccurs="0">
55c9e7ca
JR
259 <xs:element name="id" type="xs:integer" />
260 </xs:choice>
847a5916
JR
261</xs:complexType>
262
159b042f
JG
263<!-- Maps to a list of pid_process_attr_values-->
264<xs:complexType name="pid_process_attr_values_type">
847a5916 265 <xs:sequence>
55c9e7ca 266 <xs:choice minOccurs="0" maxOccurs="unbounded" >
159b042f 267 <xs:element name="pid" type="pid_value_type" />
847a5916
JR
268 </xs:choice>
269 </xs:sequence>
270</xs:complexType>
271
159b042f
JG
272<!-- Maps to a pid_process_attr_tracker-->
273<xs:complexType name="pid_process_attr_tracker_type">
847a5916 274 <xs:all>
159b042f 275 <xs:element name="process_attr_values" type="pid_process_attr_values_type" />
55c9e7ca
JR
276 </xs:all>
277</xs:complexType>
278
159b042f 279<xs:complexType name="vpid_value_type">
55c9e7ca
JR
280 <xs:all>
281 <xs:element name="id" type="xs:integer" />
282 </xs:all>
283</xs:complexType>
284
159b042f
JG
285<!-- Maps to a list of vpid_process_attr_values-->
286<xs:complexType name="vpid_process_attr_values_type">
55c9e7ca 287 <xs:sequence>
159b042f 288 <xs:element name="vpid" type="vpid_value_type" minOccurs="0" maxOccurs="unbounded" />
55c9e7ca
JR
289 </xs:sequence>
290</xs:complexType>
291
159b042f
JG
292<!-- Maps to a pid_process_attr_tracker-->
293<xs:complexType name="vpid_process_attr_tracker_type">
55c9e7ca 294 <xs:all>
159b042f 295 <xs:element name="process_attr_values" type="vpid_process_attr_values_type" />
55c9e7ca
JR
296 </xs:all>
297</xs:complexType>
298
159b042f 299<xs:complexType name="uid_value_type">
55c9e7ca
JR
300 <xs:choice>
301 <xs:element name="id" type="xs:integer" />
302 <xs:element name="name" type="xs:string" />
303 </xs:choice>
304</xs:complexType>
305
159b042f
JG
306<!-- Maps to a list of uid_process_attr_values-->
307<xs:complexType name="uid_process_attr_values_type">
55c9e7ca 308 <xs:sequence>
159b042f 309 <xs:element name="uid" type="uid_value_type" minOccurs="0" maxOccurs="unbounded" />
55c9e7ca
JR
310 </xs:sequence>
311</xs:complexType>
312
159b042f
JG
313<!-- Maps to a uid_process_attr_tracker-->
314<xs:complexType name="uid_process_attr_tracker_type">
55c9e7ca 315 <xs:all>
159b042f 316 <xs:element name="process_attr_values" type="uid_process_attr_values_type" />
55c9e7ca
JR
317 </xs:all>
318</xs:complexType>
319
159b042f 320<xs:complexType name="vuid_value_type">
55c9e7ca
JR
321 <xs:choice>
322 <xs:element name="id" type="xs:integer" />
323 <xs:element name="name" type="xs:string" />
324 </xs:choice>
325</xs:complexType>
326
159b042f
JG
327<!-- Maps to a list of vuid_process_attr_values-->
328<xs:complexType name="vuid_process_attr_values_type">
55c9e7ca 329 <xs:sequence>
159b042f 330 <xs:element name="vuid" type="vuid_value_type" minOccurs="0" maxOccurs="unbounded" />
55c9e7ca
JR
331 </xs:sequence>
332</xs:complexType>
333
159b042f
JG
334<!-- Maps to a vuid_process_attr_tracker-->
335<xs:complexType name="vuid_process_attr_tracker_type">
55c9e7ca 336 <xs:all>
159b042f 337 <xs:element name="process_attr_values" type="vuid_process_attr_values_type" />
55c9e7ca
JR
338 </xs:all>
339</xs:complexType>
340
159b042f 341<xs:complexType name="gid_value_type">
55c9e7ca
JR
342 <xs:choice>
343 <xs:element name="id" type="xs:integer" />
344 <xs:element name="name" type="xs:string" />
345 </xs:choice>
346</xs:complexType>
347
159b042f
JG
348<!-- Maps to a list of gid_process_attr_values-->
349<xs:complexType name="gid_process_attr_values_type">
55c9e7ca 350 <xs:sequence>
159b042f 351 <xs:element name="gid" type="gid_value_type" minOccurs="0" maxOccurs="unbounded" />
55c9e7ca
JR
352 </xs:sequence>
353</xs:complexType>
354
159b042f
JG
355<!-- Maps to a gid_process_attr_tracker-->
356<xs:complexType name="gid_process_attr_tracker_type">
55c9e7ca 357 <xs:all>
159b042f 358 <xs:element name="process_attr_values" type="gid_process_attr_values_type" />
55c9e7ca
JR
359 </xs:all>
360</xs:complexType>
361
159b042f 362<xs:complexType name="vgid_value_type">
55c9e7ca
JR
363 <xs:choice>
364 <xs:element name="id" type="xs:integer" />
365 <xs:element name="name" type="xs:string" />
366 </xs:choice>
367</xs:complexType>
368
159b042f
JG
369<!-- Maps to a list of vgid_process_attr_values-->
370<xs:complexType name="vgid_process_attr_values_type">
55c9e7ca 371 <xs:sequence>
159b042f 372 <xs:element name="vgid" type="vgid_value_type" minOccurs="0" maxOccurs="unbounded" />
55c9e7ca
JR
373 </xs:sequence>
374</xs:complexType>
375
159b042f
JG
376<!-- Maps to a vgid_process_attr_tracker-->
377<xs:complexType name="vgid_process_attr_tracker_type">
55c9e7ca 378 <xs:all>
159b042f 379 <xs:element name="process_attr_values" type="vgid_process_attr_values_type" />
847a5916
JR
380 </xs:all>
381</xs:complexType>
382
383<!-- Maps to a list of trackers-->
159b042f 384<xs:complexType name="process_attr_tracker_type">
55c9e7ca
JR
385 <xs:sequence>
386 <xs:choice minOccurs="0" maxOccurs="unbounded" >
159b042f
JG
387 <xs:element name="pid_process_attr_tracker" type="pid_process_attr_tracker_type" maxOccurs="1" />
388 <xs:element name="vpid_process_attr_tracker" type="vpid_process_attr_tracker_type" maxOccurs="1" />
389 <xs:element name="uid_process_attr_tracker" type="uid_process_attr_tracker_type" maxOccurs="1" />
390 <xs:element name="vuid_process_attr_tracker" type="vuid_process_attr_tracker_type" maxOccurs="1" />
391 <xs:element name="gid_process_attr_tracker" type="gid_process_attr_tracker_type" maxOccurs="1" />
392 <xs:element name="vgid_process_attr_tracker" type="vgid_process_attr_tracker_type" maxOccurs="1" />
55c9e7ca 393 </xs:choice>
847a5916
JR
394 </xs:sequence>
395</xs:complexType>
396
159b042f 397<!-- Maps to struct lttng_domain, contains channels and pid_process_attr_tracker -->
629bf5b0
JG
398<xs:complexType name="domain_type">
399 <xs:all>
400 <xs:element name="type" type="domain_type_type"/>
401 <xs:element name="buffer_type" type="domain_buffer_type"/>
402 <xs:element name="channels" type="channel_list_type" minOccurs="0"/>
159b042f 403 <xs:element name="process_attr_trackers" type="process_attr_tracker_type" minOccurs="0"/>
629bf5b0
JG
404 </xs:all>
405</xs:complexType>
406
ce6176f2
JG
407<xs:complexType name="periodic_rotation_schedule_type">
408 <xs:all>
409 <xs:element name="time_us" type="uint64_type" minOccurs="0" />
410 </xs:all>
411</xs:complexType>
412
413<xs:complexType name="size_threshold_rotation_schedule_type">
414 <xs:all>
415 <xs:element name="bytes" type="uint64_type" minOccurs="0" />
416 </xs:all>
417</xs:complexType>
418
419<xs:complexType name="rotation_schedule_type">
420 <xs:sequence>
421 <xs:choice maxOccurs="unbounded">
422 <xs:element name="periodic" type="periodic_rotation_schedule_type" maxOccurs="unbounded" />
423 <xs:element name="size_threshold" type="size_threshold_rotation_schedule_type" maxOccurs="unbounded" />
424 </xs:choice>
425 </xs:sequence>
426</xs:complexType>
427
629bf5b0 428<xs:complexType name="session_attributes_type">
259c2674
JD
429 <xs:all>
430 <xs:element name="snapshot_mode" type="xs:boolean" minOccurs="0"/>
431 <xs:element name="live_timer_interval" type="uint32_type" minOccurs="0"/> <!-- usec -->
ce6176f2 432 <xs:element name="rotation_schedules" type="rotation_schedule_type" minOccurs="0" />
259c2674 433 </xs:all>
629bf5b0
JG
434</xs:complexType>
435
436<xs:complexType name="domain_list_type">
437 <xs:sequence>
438 <xs:element name="domain" type="domain_type" minOccurs="0" maxOccurs="unbounded"/>
439 </xs:sequence>
440</xs:complexType>
441
442<xs:complexType name="net_output_type">
443 <xs:all>
444 <xs:element name="control_uri" type="xs:string"/>
445 <xs:element name="data_uri" type="xs:string"/>
446 </xs:all>
447</xs:complexType>
448
449<xs:complexType name="destination_type">
450 <xs:choice>
451 <xs:element name="path" type="xs:string"/>
452 <xs:element name="net_output" type="net_output_type"/>
453 </xs:choice>
454</xs:complexType>
455
456<xs:complexType name="consumer_output_type">
457 <xs:all>
458 <xs:element name="enabled" type="xs:boolean" default="true"/>
459 <xs:element name="destination" type="destination_type"/>
460 </xs:all>
461</xs:complexType>
462
463<xs:complexType name="snapshot_output_type">
464 <xs:all>
465 <xs:element name="name" type="name_type"/>
466 <xs:element name="max_size" type="uint64_type"/>
467 <xs:element name="consumer_output" type="consumer_output_type"/>
468 </xs:all>
469</xs:complexType>
470
471<xs:complexType name="snapshot_output_list_type">
472 <xs:sequence>
473 <xs:element name="output" type="snapshot_output_type" minOccurs="0" maxOccurs="unbounded"/>
474 </xs:sequence>
475</xs:complexType>
476
477<xs:complexType name="session_output_type">
478 <xs:choice>
479 <xs:element name="snapshot_outputs" type="snapshot_output_list_type"/>
480 <xs:element name="consumer_output" type="consumer_output_type"/>
481 </xs:choice>
482</xs:complexType>
483
484<xs:complexType name="session_type">
485 <xs:all>
486 <xs:element name="name" type="name_type"/>
9e7c9f56 487 <xs:element name="shared_memory_path" type="xs:string" minOccurs="0"/>
629bf5b0
JG
488 <xs:element name="domains" type="domain_list_type" minOccurs="0"/>
489 <xs:element name="started" type="xs:boolean" default="0" minOccurs="0"/>
490 <xs:element name="attributes" type="session_attributes_type" minOccurs="0"/>
491 <xs:element name="output" type="session_output_type" minOccurs="0"/>
492 </xs:all>
493</xs:complexType>
494
495<xs:element name="sessions">
496 <xs:complexType>
497 <xs:sequence>
498 <xs:element name="session" type="session_type" maxOccurs="unbounded"/>
499 </xs:sequence>
500 </xs:complexType>
501</xs:element>
502
503</xs:schema>
This page took 0.097766 seconds and 4 git commands to generate.