1 <?xml version="1.0" encoding="UTF-8"?>
3 Copyright (c) 2014 - Jérémie Galarneau <jeremie.galarneau@efficios.com>
5 Permission is hereby granted, free of charge, to any person obtaining a copy
6 of this software and associated documentation files (the "Software"), to deal
7 in the Software without restriction, including without limitation the rights
8 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 copies of the Software, and to permit persons to whom the Software is
10 furnished to do so, subject to the following conditions:
12 The above copyright notice and this permission notice shall be included in
13 all copies or substantial portions of the Software.
15 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23 <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
24 elementFormDefault="qualified" version="2.11">
26 <xs:simpleType name="name_type">
27 <xs:restriction base="xs:string">
28 <xs:maxLength value="255"/>
32 <xs:simpleType name="uint64_type">
33 <xs:restriction base="xs:integer">
34 <xs:minInclusive value="0"/>
35 <xs:maxInclusive value="18446744073709551615"/>
39 <xs:simpleType name="uint32_type">
40 <xs:restriction base="xs:integer">
41 <xs:minInclusive value="0"/>
42 <xs:maxInclusive value="4294967295"/>
47 Maps to the range allowed for blocking timeout: -1 (block forever),
48 0 (do not block), positive integer value (blocking time in usec) limited
49 by its signed 32-bit representation when converted to msec.
51 <xs:simpleType name="blocking_timeout_type">
52 <xs:restriction base="xs:integer">
53 <xs:minInclusive value="-1" />
54 <xs:maxInclusive value="2147483648000" />
58 <xs:simpleType name="channel_overwrite_mode_type">
59 <xs:restriction base="xs:string">
60 <xs:enumeration value="DISCARD"/>
61 <xs:enumeration value="OVERWRITE"/>
65 <!-- Maps to the lttng_event_output enum -->
66 <xs:simpleType name="event_output_type">
67 <xs:restriction base="xs:string">
68 <xs:enumeration value="SPLICE"/>
69 <xs:enumeration value="MMAP"/>
73 <!-- Maps to the lttng_loglevel_type enum -->
74 <xs:simpleType name="loglevel_type">
75 <xs:restriction base="xs:string">
76 <xs:enumeration value="ALL"/>
77 <xs:enumeration value="RANGE"/>
78 <xs:enumeration value="SINGLE"/>
82 <!-- Maps to the lttng_event_type enum -->
83 <xs:simpleType name="event_type_type">
84 <xs:restriction base="xs:string">
85 <xs:enumeration value="ALL"/>
86 <xs:enumeration value="TRACEPOINT"/>
87 <xs:enumeration value="PROBE"/>
88 <xs:enumeration value="USERSPACE_PROBE"/>
89 <xs:enumeration value="FUNCTION"/>
90 <xs:enumeration value="FUNCTION_ENTRY"/>
91 <xs:enumeration value="NOOP"/>
92 <xs:enumeration value="SYSCALL"/>
93 <xs:enumeration value="KPROBE"/>
94 <xs:enumeration value="KRETPROBE"/>
98 <xs:complexType name="event_probe_attributes_type">
100 <xs:element name="symbol_name" type="name_type" minOccurs="0"/>
101 <xs:element name="address" type="uint64_type" minOccurs="0"/>
102 <xs:element name="offset" type="uint64_type" minOccurs="0"/>
106 <xs:simpleType name="userspace_probe_lookup_method">
107 <xs:restriction base="xs:string">
108 <xs:enumeration value="DEFAULT"/>
109 <xs:enumeration value="ELF"/>
110 <xs:enumeration value="SDT"/>
114 <xs:complexType name="event_userspace_probe_function_attributes_type">
116 <xs:element name="lookup_method" type="userspace_probe_lookup_method"/>
117 <xs:element name="binary_path" type="xs:string"/>
118 <xs:element name="function_name" type="xs:string"/>
122 <xs:complexType name="event_userspace_probe_tracepoint_attributes_type">
124 <xs:element name="lookup_method" type="userspace_probe_lookup_method"/>
125 <xs:element name="binary_path" type="xs:string"/>
126 <xs:element name="probe_name" type="xs:string"/>
127 <xs:element name="provider_name" type="xs:string"/>
131 <xs:complexType name="event_ftrace_attributes_type">
133 <xs:element name="symbol_name" type="name_type"/>
137 <xs:complexType name="event_attributes_type">
139 <xs:element name="probe_attributes" type="event_probe_attributes_type"/>
140 <xs:element name="function_attributes" type="event_ftrace_attributes_type"/>
141 <xs:element name="userspace_probe_function_attributes" type="event_userspace_probe_function_attributes_type"/>
142 <xs:element name="userspace_probe_tracepoint_attributes" type="event_userspace_probe_tracepoint_attributes_type"/>
146 <xs:complexType name="event_exclusion_list_type">
148 <xs:element name="exclusion" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
152 <xs:complexType name="event_type">
154 <xs:element name="name" type="name_type" minOccurs="0"/>
155 <xs:element name="enabled" type="xs:boolean" default="true" minOccurs="0"/>
156 <xs:element name="type" type="event_type_type" default="TRACEPOINT" minOccurs="0"/>
157 <xs:element name="loglevel_type" type="loglevel_type" default="ALL" minOccurs="0"/>
158 <xs:element name="loglevel" type="xs:int" default="-1" minOccurs="0"/>
159 <xs:element name="filter" type="xs:string" minOccurs="0"/>
160 <xs:element name="exclusions" type="event_exclusion_list_type" minOccurs="0"/>
161 <xs:element name="attributes" type="event_attributes_type" minOccurs="0"/>
165 <xs:complexType name="event_list_type">
167 <xs:element name="event" type="event_type" minOccurs="0" maxOccurs="unbounded"/>
171 <xs:complexType name="event_perf_context_type">
173 <xs:element name="type" type="uint32_type"/>
174 <xs:element name="config" type="uint64_type"/>
175 <xs:element name="name" type="name_type"/>
179 <xs:complexType name="event_app_context_type">
181 <xs:element name="provider_name" type="xs:string"/>
182 <xs:element name="ctx_name" type="xs:string"/>
186 <!-- Maps to the lttng_event_context_type enum -->
187 <xs:simpleType name="event_context_type_type">
188 <xs:restriction base="xs:string">
189 <xs:enumeration value="PID"/>
190 <xs:enumeration value="PROCNAME"/>
191 <xs:enumeration value="PRIO"/>
192 <xs:enumeration value="NICE"/>
193 <xs:enumeration value="VPID"/>
194 <xs:enumeration value="TID"/>
195 <xs:enumeration value="VTID"/>
196 <xs:enumeration value="PPID"/>
197 <xs:enumeration value="VPPID"/>
198 <xs:enumeration value="PTHREAD_ID"/>
199 <xs:enumeration value="HOSTNAME"/>
200 <xs:enumeration value="IP"/>
201 <xs:enumeration value="APP"/>
202 <xs:enumeration value="INTERRUPTIBLE" />
203 <xs:enumeration value="PREEMPTIBLE" />
204 <xs:enumeration value="NEED_RESCHEDULE" />
205 <xs:enumeration value="MIGRATABLE" />
206 <xs:enumeration value="CALLSTACK_USER" />
207 <xs:enumeration value="CALLSTACK_KERNEL" />
211 <xs:complexType name="event_context_type">
213 <xs:element name="type" type="event_context_type_type"/>
214 <xs:element name="perf" type="event_perf_context_type"/>
215 <xs:element name="app" type="event_app_context_type"/>
219 <xs:complexType name="event_context_list_type">
221 <xs:element name="context" type="event_context_type" minOccurs="0" maxOccurs="unbounded"/>
225 <!-- Maps to struct lttng_channel -->
226 <xs:complexType name="channel_type">
228 <xs:element name="name" type="name_type"/>
229 <xs:element name="enabled" type="xs:boolean" default="true" minOccurs="0"/>
230 <xs:element name="overwrite_mode" type="channel_overwrite_mode_type" default="DISCARD" minOccurs="0"/>
231 <xs:element name="subbuffer_size" type="uint64_type" minOccurs="0"/> <!-- bytes -->
232 <xs:element name="subbuffer_count" type="uint64_type" default="4" minOccurs="0"/>
233 <xs:element name="switch_timer_interval" type="uint32_type" default="0" minOccurs="0"/> <!-- usec -->
234 <xs:element name="read_timer_interval" type="uint32_type"/> <!-- usec -->
235 <xs:element name="blocking_timeout" type="blocking_timeout_type" default="0" minOccurs="0" /> <!-- usec -->
236 <xs:element name="output_type" type="event_output_type"/>
237 <xs:element name="tracefile_size" type="uint64_type" default="0" minOccurs="0"/> <!-- bytes -->
238 <xs:element name="tracefile_count" type="uint64_type" default="0" minOccurs="0"/>
239 <xs:element name="live_timer_interval" type="uint32_type" default="0" minOccurs="0"/> <!-- usec -->
240 <xs:element name="events" type="event_list_type" minOccurs="0"/>
241 <xs:element name="contexts" type="event_context_list_type" minOccurs="0"/>
242 <xs:element name="monitor_timer_interval" type="uint64_type" default="0" minOccurs="0"/> <!-- usec -->
246 <!-- Maps to the lttng_domain_type enum -->
247 <xs:simpleType name="domain_type_type">
248 <xs:restriction base="xs:string">
249 <xs:enumeration value="KERNEL"/>
250 <xs:enumeration value="UST"/>
251 <xs:enumeration value="JUL"/>
252 <xs:enumeration value="LOG4J"/>
253 <xs:enumeration value="PYTHON"/>
257 <!-- Maps to the lttng_buffer_type enum -->
258 <xs:simpleType name="domain_buffer_type">
259 <xs:restriction base="xs:string">
260 <xs:enumeration value="PER_PID"/>
261 <xs:enumeration value="PER_UID"/>
262 <xs:enumeration value="GLOBAL"/>
266 <xs:complexType name="channel_list_type">
268 <xs:element name="channel" type="channel_type" minOccurs="0" maxOccurs="unbounded" />
272 <xs:complexType name="pid_target_type">
273 <xs:choice minOccurs="0">
274 <xs:element name="pid" type="xs:integer" />
275 <xs:element name="id" type="xs:integer" />
279 <!-- Maps to a list of pid_targets-->
280 <xs:complexType name="pid_targets_type">
282 <xs:choice minOccurs="0" maxOccurs="unbounded" >
283 <xs:element name="pid_target" type="pid_target_type" />
288 <!-- Maps to a pid_tracker-->
289 <xs:complexType name="pid_tracker_type">
291 <xs:element name="targets" type="pid_targets_type" />
295 <xs:complexType name="vpid_target_type">
297 <xs:element name="id" type="xs:integer" />
301 <!-- Maps to a list of vpid_targets-->
302 <xs:complexType name="vpid_targets_type">
304 <xs:element name="vpid_target" type="vpid_target_type" minOccurs="0" maxOccurs="unbounded" />
308 <!-- Maps to a pid_tracker-->
309 <xs:complexType name="vpid_tracker_type">
311 <xs:element name="targets" type="vpid_targets_type" />
315 <xs:complexType name="uid_target_type">
317 <xs:element name="id" type="xs:integer" />
318 <xs:element name="name" type="xs:string" />
322 <!-- Maps to a list of uid_targets-->
323 <xs:complexType name="uid_targets_type">
325 <xs:element name="uid_target" type="uid_target_type" minOccurs="0" maxOccurs="unbounded" />
329 <!-- Maps to a uid_tracker-->
330 <xs:complexType name="uid_tracker_type">
332 <xs:element name="targets" type="uid_targets_type" />
336 <xs:complexType name="vuid_target_type">
338 <xs:element name="id" type="xs:integer" />
339 <xs:element name="name" type="xs:string" />
343 <!-- Maps to a list of vuid_targets-->
344 <xs:complexType name="vuid_targets_type">
346 <xs:element name="vuid_target" type="vuid_target_type" minOccurs="0" maxOccurs="unbounded" />
350 <!-- Maps to a uid_tracker-->
351 <xs:complexType name="vuid_tracker_type">
353 <xs:element name="targets" type="vuid_targets_type" />
357 <xs:complexType name="gid_target_type">
359 <xs:element name="id" type="xs:integer" />
360 <xs:element name="name" type="xs:string" />
364 <!-- Maps to a list of gid_targets-->
365 <xs:complexType name="gid_targets_type">
367 <xs:element name="gid_target" type="gid_target_type" minOccurs="0" maxOccurs="unbounded" />
371 <!-- Maps to a gid_tracker-->
372 <xs:complexType name="gid_tracker_type">
374 <xs:element name="targets" type="gid_targets_type" />
378 <xs:complexType name="vgid_target_type">
380 <xs:element name="id" type="xs:integer" />
381 <xs:element name="name" type="xs:string" />
385 <!-- Maps to a list of vgid_targets-->
386 <xs:complexType name="vgid_targets_type">
388 <xs:element name="vgid_target" type="vgid_target_type" minOccurs="0" maxOccurs="unbounded" />
392 <!-- Maps to a gid_tracker-->
393 <xs:complexType name="vgid_tracker_type">
395 <xs:element name="targets" type="vgid_targets_type" />
399 <!-- Maps to a list of trackers-->
400 <xs:complexType name="trackers_type">
402 <xs:choice minOccurs="0" maxOccurs="unbounded" >
403 <xs:element name="pid_tracker" type="pid_tracker_type" maxOccurs="1" />
404 <xs:element name="vpid_tracker" type="vpid_tracker_type" maxOccurs="1" />
405 <xs:element name="uid_tracker" type="uid_tracker_type" maxOccurs="1" />
406 <xs:element name="vuid_tracker" type="vuid_tracker_type" maxOccurs="1" />
407 <xs:element name="gid_tracker" type="gid_tracker_type" maxOccurs="1" />
408 <xs:element name="vgid_tracker" type="vgid_tracker_type" maxOccurs="1" />
413 <!-- Maps to struct lttng_domain, contains channels and pid_tracker -->
414 <xs:complexType name="domain_type">
416 <xs:element name="type" type="domain_type_type"/>
417 <xs:element name="buffer_type" type="domain_buffer_type"/>
418 <xs:element name="channels" type="channel_list_type" minOccurs="0"/>
419 <xs:element name="trackers" type="trackers_type" minOccurs="0"/>
423 <xs:complexType name="periodic_rotation_schedule_type">
425 <xs:element name="time_us" type="uint64_type" minOccurs="0" />
429 <xs:complexType name="size_threshold_rotation_schedule_type">
431 <xs:element name="bytes" type="uint64_type" minOccurs="0" />
435 <xs:complexType name="rotation_schedule_type">
437 <xs:choice maxOccurs="unbounded">
438 <xs:element name="periodic" type="periodic_rotation_schedule_type" maxOccurs="unbounded" />
439 <xs:element name="size_threshold" type="size_threshold_rotation_schedule_type" maxOccurs="unbounded" />
444 <xs:complexType name="session_attributes_type">
446 <xs:element name="snapshot_mode" type="xs:boolean" minOccurs="0"/>
447 <xs:element name="live_timer_interval" type="uint32_type" minOccurs="0"/> <!-- usec -->
448 <xs:element name="rotation_schedules" type="rotation_schedule_type" minOccurs="0" />
452 <xs:complexType name="domain_list_type">
454 <xs:element name="domain" type="domain_type" minOccurs="0" maxOccurs="unbounded"/>
458 <xs:complexType name="net_output_type">
460 <xs:element name="control_uri" type="xs:string"/>
461 <xs:element name="data_uri" type="xs:string"/>
465 <xs:complexType name="destination_type">
467 <xs:element name="path" type="xs:string"/>
468 <xs:element name="net_output" type="net_output_type"/>
472 <xs:complexType name="consumer_output_type">
474 <xs:element name="enabled" type="xs:boolean" default="true"/>
475 <xs:element name="destination" type="destination_type"/>
479 <xs:complexType name="snapshot_output_type">
481 <xs:element name="name" type="name_type"/>
482 <xs:element name="max_size" type="uint64_type"/>
483 <xs:element name="consumer_output" type="consumer_output_type"/>
487 <xs:complexType name="snapshot_output_list_type">
489 <xs:element name="output" type="snapshot_output_type" minOccurs="0" maxOccurs="unbounded"/>
493 <xs:complexType name="session_output_type">
495 <xs:element name="snapshot_outputs" type="snapshot_output_list_type"/>
496 <xs:element name="consumer_output" type="consumer_output_type"/>
500 <xs:complexType name="session_type">
502 <xs:element name="name" type="name_type"/>
503 <xs:element name="shared_memory_path" type="xs:string" minOccurs="0"/>
504 <xs:element name="domains" type="domain_list_type" minOccurs="0"/>
505 <xs:element name="started" type="xs:boolean" default="0" minOccurs="0"/>
506 <xs:element name="attributes" type="session_attributes_type" minOccurs="0"/>
507 <xs:element name="output" type="session_output_type" minOccurs="0"/>
511 <xs:element name="sessions">
514 <xs:element name="session" type="session_type" maxOccurs="unbounded"/>