Fix: compat: 'LTTNG_UST_ABI_PROCNAME_LEN' is undeclared
[lttng-tools.git] / src / common / 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 SPDX-License-Identifier: MIT
6
7 -->
8 <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
9 elementFormDefault="qualified" version="2.12">
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
31 <!--
32 Maps to the range allowed for blocking timeout: -1 (block forever),
33 0 (do not block), positive integer value (blocking time in usec) limited
34 by 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
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"/>
73 <xs:enumeration value="USERSPACE_PROBE"/>
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
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
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"/>
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"/>
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
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
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"/>
186 <xs:enumeration value="APP"/>
187 <xs:enumeration value="INTERRUPTIBLE" />
188 <xs:enumeration value="PREEMPTIBLE" />
189 <xs:enumeration value="NEED_RESCHEDULE" />
190 <xs:enumeration value="MIGRATABLE" />
191 <xs:enumeration value="CALLSTACK_USER" />
192 <xs:enumeration value="CALLSTACK_KERNEL" />
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"/>
200 <xs:element name="app" type="event_app_context_type"/>
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 -->
220 <xs:element name="blocking_timeout" type="blocking_timeout_type" default="0" minOccurs="0" /> <!-- usec -->
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"/>
227 <xs:element name="monitor_timer_interval" type="uint64_type" default="0" minOccurs="0"/> <!-- usec -->
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"/>
237 <xs:enumeration value="LOG4J"/>
238 <xs:enumeration value="PYTHON"/>
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>
253 <xs:element name="channel" type="channel_type" minOccurs="0" maxOccurs="unbounded" />
254 </xs:sequence>
255 </xs:complexType>
256
257 <xs:complexType name="pid_value_type">
258 <xs:choice minOccurs="0">
259 <xs:element name="id" type="xs:integer" />
260 </xs:choice>
261 </xs:complexType>
262
263 <!-- Maps to a list of pid_process_attr_values-->
264 <xs:complexType name="pid_process_attr_values_type">
265 <xs:sequence>
266 <xs:choice minOccurs="0" maxOccurs="unbounded" >
267 <xs:element name="pid" type="pid_value_type" />
268 </xs:choice>
269 </xs:sequence>
270 </xs:complexType>
271
272 <!-- Maps to a pid_process_attr_tracker-->
273 <xs:complexType name="pid_process_attr_tracker_type">
274 <xs:all>
275 <xs:element name="process_attr_values" type="pid_process_attr_values_type" />
276 </xs:all>
277 </xs:complexType>
278
279 <xs:complexType name="vpid_value_type">
280 <xs:all>
281 <xs:element name="id" type="xs:integer" />
282 </xs:all>
283 </xs:complexType>
284
285 <!-- Maps to a list of vpid_process_attr_values-->
286 <xs:complexType name="vpid_process_attr_values_type">
287 <xs:sequence>
288 <xs:element name="vpid" type="vpid_value_type" minOccurs="0" maxOccurs="unbounded" />
289 </xs:sequence>
290 </xs:complexType>
291
292 <!-- Maps to a pid_process_attr_tracker-->
293 <xs:complexType name="vpid_process_attr_tracker_type">
294 <xs:all>
295 <xs:element name="process_attr_values" type="vpid_process_attr_values_type" />
296 </xs:all>
297 </xs:complexType>
298
299 <xs:complexType name="uid_value_type">
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
306 <!-- Maps to a list of uid_process_attr_values-->
307 <xs:complexType name="uid_process_attr_values_type">
308 <xs:sequence>
309 <xs:element name="uid" type="uid_value_type" minOccurs="0" maxOccurs="unbounded" />
310 </xs:sequence>
311 </xs:complexType>
312
313 <!-- Maps to a uid_process_attr_tracker-->
314 <xs:complexType name="uid_process_attr_tracker_type">
315 <xs:all>
316 <xs:element name="process_attr_values" type="uid_process_attr_values_type" />
317 </xs:all>
318 </xs:complexType>
319
320 <xs:complexType name="vuid_value_type">
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
327 <!-- Maps to a list of vuid_process_attr_values-->
328 <xs:complexType name="vuid_process_attr_values_type">
329 <xs:sequence>
330 <xs:element name="vuid" type="vuid_value_type" minOccurs="0" maxOccurs="unbounded" />
331 </xs:sequence>
332 </xs:complexType>
333
334 <!-- Maps to a vuid_process_attr_tracker-->
335 <xs:complexType name="vuid_process_attr_tracker_type">
336 <xs:all>
337 <xs:element name="process_attr_values" type="vuid_process_attr_values_type" />
338 </xs:all>
339 </xs:complexType>
340
341 <xs:complexType name="gid_value_type">
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
348 <!-- Maps to a list of gid_process_attr_values-->
349 <xs:complexType name="gid_process_attr_values_type">
350 <xs:sequence>
351 <xs:element name="gid" type="gid_value_type" minOccurs="0" maxOccurs="unbounded" />
352 </xs:sequence>
353 </xs:complexType>
354
355 <!-- Maps to a gid_process_attr_tracker-->
356 <xs:complexType name="gid_process_attr_tracker_type">
357 <xs:all>
358 <xs:element name="process_attr_values" type="gid_process_attr_values_type" />
359 </xs:all>
360 </xs:complexType>
361
362 <xs:complexType name="vgid_value_type">
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
369 <!-- Maps to a list of vgid_process_attr_values-->
370 <xs:complexType name="vgid_process_attr_values_type">
371 <xs:sequence>
372 <xs:element name="vgid" type="vgid_value_type" minOccurs="0" maxOccurs="unbounded" />
373 </xs:sequence>
374 </xs:complexType>
375
376 <!-- Maps to a vgid_process_attr_tracker-->
377 <xs:complexType name="vgid_process_attr_tracker_type">
378 <xs:all>
379 <xs:element name="process_attr_values" type="vgid_process_attr_values_type" />
380 </xs:all>
381 </xs:complexType>
382
383 <!-- Maps to a list of trackers-->
384 <xs:complexType name="process_attr_tracker_type">
385 <xs:sequence>
386 <xs:choice minOccurs="0" maxOccurs="unbounded" >
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" />
393 </xs:choice>
394 </xs:sequence>
395 </xs:complexType>
396
397 <xs:complexType name="pid_target_type">
398 <xs:all>
399 <xs:element name="pid" type="xs:integer" />
400 </xs:all>
401 </xs:complexType>
402
403 <!-- Maps to a list of pid_targets (legacy)-->
404 <xs:complexType name="targets_type">
405 <xs:sequence>
406 <xs:choice>
407 <xs:element name="pid_target" type="pid_target_type" minOccurs="0" maxOccurs="unbounded" />
408 </xs:choice>
409 </xs:sequence>
410 </xs:complexType>
411
412 <!-- Maps to a pid_tracker (legacy)-->
413 <xs:complexType name="pid_tracker_type">
414 <xs:all>
415 <xs:element name="targets" type="targets_type" />
416 </xs:all>
417 </xs:complexType>
418
419 <!-- Maps to a list of trackers (legacy)-->
420 <xs:complexType name="trackers_type">
421 <xs:sequence minOccurs="0" maxOccurs="unbounded">
422 <xs:element name="pid_tracker" type="pid_tracker_type" maxOccurs="1" />
423 </xs:sequence>
424 </xs:complexType>
425
426 <!-- Maps to struct lttng_domain, contains channels and pid_process_attr_tracker -->
427 <xs:complexType name="domain_type">
428 <xs:all>
429 <xs:element name="type" type="domain_type_type"/>
430 <xs:element name="buffer_type" type="domain_buffer_type"/>
431 <xs:element name="channels" type="channel_list_type" minOccurs="0"/>
432 <xs:element name="process_attr_trackers" type="process_attr_tracker_type" minOccurs="0"/>
433 <!-- Support of legacy tracker specification -->
434 <xs:element name="trackers" type="trackers_type" minOccurs="0"/>
435 </xs:all>
436 </xs:complexType>
437
438 <xs:complexType name="periodic_rotation_schedule_type">
439 <xs:all>
440 <xs:element name="time_us" type="uint64_type" minOccurs="0" />
441 </xs:all>
442 </xs:complexType>
443
444 <xs:complexType name="size_threshold_rotation_schedule_type">
445 <xs:all>
446 <xs:element name="bytes" type="uint64_type" minOccurs="0" />
447 </xs:all>
448 </xs:complexType>
449
450 <xs:complexType name="rotation_schedule_type">
451 <xs:sequence>
452 <xs:choice maxOccurs="unbounded">
453 <xs:element name="periodic" type="periodic_rotation_schedule_type" maxOccurs="unbounded" />
454 <xs:element name="size_threshold" type="size_threshold_rotation_schedule_type" maxOccurs="unbounded" />
455 </xs:choice>
456 </xs:sequence>
457 </xs:complexType>
458
459 <xs:complexType name="session_attributes_type">
460 <xs:all>
461 <xs:element name="snapshot_mode" type="xs:boolean" minOccurs="0"/>
462 <xs:element name="live_timer_interval" type="uint32_type" minOccurs="0"/> <!-- usec -->
463 <xs:element name="rotation_schedules" type="rotation_schedule_type" minOccurs="0" />
464 </xs:all>
465 </xs:complexType>
466
467 <xs:complexType name="domain_list_type">
468 <xs:sequence>
469 <xs:element name="domain" type="domain_type" minOccurs="0" maxOccurs="unbounded"/>
470 </xs:sequence>
471 </xs:complexType>
472
473 <xs:complexType name="net_output_type">
474 <xs:all>
475 <xs:element name="control_uri" type="xs:string"/>
476 <xs:element name="data_uri" type="xs:string"/>
477 </xs:all>
478 </xs:complexType>
479
480 <xs:complexType name="destination_type">
481 <xs:choice>
482 <xs:element name="path" type="xs:string"/>
483 <xs:element name="net_output" type="net_output_type"/>
484 </xs:choice>
485 </xs:complexType>
486
487 <xs:complexType name="consumer_output_type">
488 <xs:all>
489 <xs:element name="enabled" type="xs:boolean" default="true"/>
490 <xs:element name="destination" type="destination_type"/>
491 </xs:all>
492 </xs:complexType>
493
494 <xs:complexType name="snapshot_output_type">
495 <xs:all>
496 <xs:element name="name" type="name_type"/>
497 <xs:element name="max_size" type="uint64_type"/>
498 <xs:element name="consumer_output" type="consumer_output_type"/>
499 </xs:all>
500 </xs:complexType>
501
502 <xs:complexType name="snapshot_output_list_type">
503 <xs:sequence>
504 <xs:element name="output" type="snapshot_output_type" minOccurs="0" maxOccurs="unbounded"/>
505 </xs:sequence>
506 </xs:complexType>
507
508 <xs:complexType name="session_output_type">
509 <xs:choice>
510 <xs:element name="snapshot_outputs" type="snapshot_output_list_type"/>
511 <xs:element name="consumer_output" type="consumer_output_type"/>
512 </xs:choice>
513 </xs:complexType>
514
515 <xs:complexType name="session_type">
516 <xs:all>
517 <xs:element name="name" type="name_type"/>
518 <xs:element name="shared_memory_path" type="xs:string" minOccurs="0"/>
519 <xs:element name="domains" type="domain_list_type" minOccurs="0"/>
520 <xs:element name="started" type="xs:boolean" default="0" minOccurs="0"/>
521 <xs:element name="attributes" type="session_attributes_type" minOccurs="0"/>
522 <xs:element name="output" type="session_output_type" minOccurs="0"/>
523 </xs:all>
524 </xs:complexType>
525
526 <xs:element name="sessions">
527 <xs:complexType>
528 <xs:sequence>
529 <xs:element name="session" type="session_type" maxOccurs="unbounded"/>
530 </xs:sequence>
531 </xs:complexType>
532 </xs:element>
533
534 </xs:schema>
This page took 0.041065 seconds and 4 git commands to generate.