1 <?xml version="1.0" encoding="UTF-8"?>
3 Copyright (C) 2014 Jérémie Galarneau <jeremie.galarneau@efficios.com>
5 SPDX-License-Identifier: MIT
8 <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
9 elementFormDefault="qualified" version="2.12">
11 <xs:simpleType name="name_type">
12 <xs:restriction base="xs:string">
13 <xs:maxLength value="255"/>
17 <xs:simpleType name="uint64_type">
18 <xs:restriction base="xs:integer">
19 <xs:minInclusive value="0"/>
20 <xs:maxInclusive value="18446744073709551615"/>
24 <xs:simpleType name="uint32_type">
25 <xs:restriction base="xs:integer">
26 <xs:minInclusive value="0"/>
27 <xs:maxInclusive value="4294967295"/>
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.
36 <xs:simpleType name="blocking_timeout_type">
37 <xs:restriction base="xs:integer">
38 <xs:minInclusive value="-1" />
39 <xs:maxInclusive value="2147483648000" />
43 <xs:simpleType name="channel_overwrite_mode_type">
44 <xs:restriction base="xs:string">
45 <xs:enumeration value="DISCARD"/>
46 <xs:enumeration value="OVERWRITE"/>
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"/>
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"/>
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"/>
83 <xs:complexType name="event_probe_attributes_type">
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"/>
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"/>
99 <xs:complexType name="event_userspace_probe_function_attributes_type">
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"/>
107 <xs:complexType name="event_userspace_probe_tracepoint_attributes_type">
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"/>
116 <xs:complexType name="event_ftrace_attributes_type">
118 <xs:element name="symbol_name" type="name_type"/>
122 <xs:complexType name="event_attributes_type">
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"/>
131 <xs:complexType name="event_exclusion_list_type">
133 <xs:element name="exclusion" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
137 <xs:complexType name="event_type">
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"/>
150 <xs:complexType name="event_list_type">
152 <xs:element name="event" type="event_type" minOccurs="0" maxOccurs="unbounded"/>
156 <xs:complexType name="event_perf_context_type">
158 <xs:element name="type" type="uint32_type"/>
159 <xs:element name="config" type="uint64_type"/>
160 <xs:element name="name" type="name_type"/>
164 <xs:complexType name="event_app_context_type">
166 <xs:element name="provider_name" type="xs:string"/>
167 <xs:element name="ctx_name" type="xs:string"/>
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" />
196 <xs:complexType name="event_context_type">
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"/>
204 <xs:complexType name="event_context_list_type">
206 <xs:element name="context" type="event_context_type" minOccurs="0" maxOccurs="unbounded"/>
210 <!-- Maps to struct lttng_channel -->
211 <xs:complexType name="channel_type">
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 -->
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"/>
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"/>
251 <xs:complexType name="channel_list_type">
253 <xs:element name="channel" type="channel_type" minOccurs="0" maxOccurs="unbounded" />
257 <xs:complexType name="pid_value_type">
258 <xs:choice minOccurs="0">
259 <xs:element name="id" type="xs:integer" />
263 <!-- Maps to a list of pid_process_attr_values-->
264 <xs:complexType name="pid_process_attr_values_type">
266 <xs:choice minOccurs="0" maxOccurs="unbounded" >
267 <xs:element name="pid" type="pid_value_type" />
272 <!-- Maps to a pid_process_attr_tracker-->
273 <xs:complexType name="pid_process_attr_tracker_type">
275 <xs:element name="process_attr_values" type="pid_process_attr_values_type" />
279 <xs:complexType name="vpid_value_type">
281 <xs:element name="id" type="xs:integer" />
285 <!-- Maps to a list of vpid_process_attr_values-->
286 <xs:complexType name="vpid_process_attr_values_type">
288 <xs:element name="vpid" type="vpid_value_type" minOccurs="0" maxOccurs="unbounded" />
292 <!-- Maps to a pid_process_attr_tracker-->
293 <xs:complexType name="vpid_process_attr_tracker_type">
295 <xs:element name="process_attr_values" type="vpid_process_attr_values_type" />
299 <xs:complexType name="uid_value_type">
301 <xs:element name="id" type="xs:integer" />
302 <xs:element name="name" type="xs:string" />
306 <!-- Maps to a list of uid_process_attr_values-->
307 <xs:complexType name="uid_process_attr_values_type">
309 <xs:element name="uid" type="uid_value_type" minOccurs="0" maxOccurs="unbounded" />
313 <!-- Maps to a uid_process_attr_tracker-->
314 <xs:complexType name="uid_process_attr_tracker_type">
316 <xs:element name="process_attr_values" type="uid_process_attr_values_type" />
320 <xs:complexType name="vuid_value_type">
322 <xs:element name="id" type="xs:integer" />
323 <xs:element name="name" type="xs:string" />
327 <!-- Maps to a list of vuid_process_attr_values-->
328 <xs:complexType name="vuid_process_attr_values_type">
330 <xs:element name="vuid" type="vuid_value_type" minOccurs="0" maxOccurs="unbounded" />
334 <!-- Maps to a vuid_process_attr_tracker-->
335 <xs:complexType name="vuid_process_attr_tracker_type">
337 <xs:element name="process_attr_values" type="vuid_process_attr_values_type" />
341 <xs:complexType name="gid_value_type">
343 <xs:element name="id" type="xs:integer" />
344 <xs:element name="name" type="xs:string" />
348 <!-- Maps to a list of gid_process_attr_values-->
349 <xs:complexType name="gid_process_attr_values_type">
351 <xs:element name="gid" type="gid_value_type" minOccurs="0" maxOccurs="unbounded" />
355 <!-- Maps to a gid_process_attr_tracker-->
356 <xs:complexType name="gid_process_attr_tracker_type">
358 <xs:element name="process_attr_values" type="gid_process_attr_values_type" />
362 <xs:complexType name="vgid_value_type">
364 <xs:element name="id" type="xs:integer" />
365 <xs:element name="name" type="xs:string" />
369 <!-- Maps to a list of vgid_process_attr_values-->
370 <xs:complexType name="vgid_process_attr_values_type">
372 <xs:element name="vgid" type="vgid_value_type" minOccurs="0" maxOccurs="unbounded" />
376 <!-- Maps to a vgid_process_attr_tracker-->
377 <xs:complexType name="vgid_process_attr_tracker_type">
379 <xs:element name="process_attr_values" type="vgid_process_attr_values_type" />
383 <!-- Maps to a list of trackers-->
384 <xs:complexType name="process_attr_tracker_type">
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" />
397 <xs:complexType name="pid_target_type">
399 <xs:element name="pid" type="xs:integer" />
403 <!-- Maps to a list of pid_targets (legacy)-->
404 <xs:complexType name="targets_type">
407 <xs:element name="pid_target" type="pid_target_type" minOccurs="0" maxOccurs="unbounded" />
412 <!-- Maps to a pid_tracker (legacy)-->
413 <xs:complexType name="pid_tracker_type">
415 <xs:element name="targets" type="targets_type" />
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" />
426 <!-- Maps to struct lttng_domain, contains channels and pid_process_attr_tracker -->
427 <xs:complexType name="domain_type">
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"/>
438 <xs:complexType name="periodic_rotation_schedule_type">
440 <xs:element name="time_us" type="uint64_type" minOccurs="0" />
444 <xs:complexType name="size_threshold_rotation_schedule_type">
446 <xs:element name="bytes" type="uint64_type" minOccurs="0" />
450 <xs:complexType name="rotation_schedule_type">
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" />
459 <xs:complexType name="session_attributes_type">
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" />
467 <xs:complexType name="domain_list_type">
469 <xs:element name="domain" type="domain_type" minOccurs="0" maxOccurs="unbounded"/>
473 <xs:complexType name="net_output_type">
475 <xs:element name="control_uri" type="xs:string"/>
476 <xs:element name="data_uri" type="xs:string"/>
480 <xs:complexType name="destination_type">
482 <xs:element name="path" type="xs:string"/>
483 <xs:element name="net_output" type="net_output_type"/>
487 <xs:complexType name="consumer_output_type">
489 <xs:element name="enabled" type="xs:boolean" default="true"/>
490 <xs:element name="destination" type="destination_type"/>
494 <xs:complexType name="snapshot_output_type">
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"/>
502 <xs:complexType name="snapshot_output_list_type">
504 <xs:element name="output" type="snapshot_output_type" minOccurs="0" maxOccurs="unbounded"/>
508 <xs:complexType name="session_output_type">
510 <xs:element name="snapshot_outputs" type="snapshot_output_list_type"/>
511 <xs:element name="consumer_output" type="consumer_output_type"/>
515 <xs:complexType name="session_type">
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"/>
526 <xs:element name="sessions">
529 <xs:element name="session" type="session_type" maxOccurs="unbounded"/>