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="FUNCTION"/>
89 <xs:enumeration value="FUNCTION_ENTRY"/>
90 <xs:enumeration value="NOOP"/>
91 <xs:enumeration value="SYSCALL"/>
92 <xs:enumeration value="KPROBE"/>
93 <xs:enumeration value="KRETPROBE"/>
97 <xs:complexType name="event_probe_attributes_type">
99 <xs:element name="symbol_name" type="name_type" minOccurs="0"/>
100 <xs:element name="address" type="uint64_type" minOccurs="0"/>
101 <xs:element name="offset" type="uint64_type" minOccurs="0"/>
105 <xs:complexType name="event_ftrace_attributes_type">
107 <xs:element name="symbol_name" type="name_type"/>
111 <xs:complexType name="event_attributes_type">
113 <xs:element name="probe_attributes" type="event_probe_attributes_type"/>
114 <xs:element name="function_attributes" type="event_ftrace_attributes_type"/>
118 <xs:complexType name="event_exclusion_list_type">
120 <xs:element name="exclusion" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
124 <xs:complexType name="event_type">
126 <xs:element name="name" type="name_type" minOccurs="0"/>
127 <xs:element name="enabled" type="xs:boolean" default="true" minOccurs="0"/>
128 <xs:element name="type" type="event_type_type" default="TRACEPOINT" minOccurs="0"/>
129 <xs:element name="loglevel_type" type="loglevel_type" default="ALL" minOccurs="0"/>
130 <xs:element name="loglevel" type="xs:int" default="-1" minOccurs="0"/>
131 <xs:element name="filter" type="xs:string" minOccurs="0"/>
132 <xs:element name="exclusions" type="event_exclusion_list_type" minOccurs="0"/>
133 <xs:element name="attributes" type="event_attributes_type" minOccurs="0"/>
137 <xs:complexType name="event_list_type">
139 <xs:element name="event" type="event_type" minOccurs="0" maxOccurs="unbounded"/>
143 <xs:complexType name="event_perf_context_type">
145 <xs:element name="type" type="uint32_type"/>
146 <xs:element name="config" type="uint64_type"/>
147 <xs:element name="name" type="name_type"/>
151 <xs:complexType name="event_app_context_type">
153 <xs:element name="provider_name" type="xs:string"/>
154 <xs:element name="ctx_name" type="xs:string"/>
158 <!-- Maps to the lttng_event_context_type enum -->
159 <xs:simpleType name="event_context_type_type">
160 <xs:restriction base="xs:string">
161 <xs:enumeration value="PID"/>
162 <xs:enumeration value="PROCNAME"/>
163 <xs:enumeration value="PRIO"/>
164 <xs:enumeration value="NICE"/>
165 <xs:enumeration value="VPID"/>
166 <xs:enumeration value="TID"/>
167 <xs:enumeration value="VTID"/>
168 <xs:enumeration value="PPID"/>
169 <xs:enumeration value="VPPID"/>
170 <xs:enumeration value="PTHREAD_ID"/>
171 <xs:enumeration value="HOSTNAME"/>
172 <xs:enumeration value="IP"/>
173 <xs:enumeration value="APP"/>
174 <xs:enumeration value="INTERRUPTIBLE" />
175 <xs:enumeration value="PREEMPTIBLE" />
176 <xs:enumeration value="NEED_RESCHEDULE" />
177 <xs:enumeration value="MIGRATABLE" />
181 <xs:complexType name="event_context_type">
183 <xs:element name="type" type="event_context_type_type"/>
184 <xs:element name="perf" type="event_perf_context_type"/>
185 <xs:element name="app" type="event_app_context_type"/>
189 <xs:complexType name="event_context_list_type">
191 <xs:element name="context" type="event_context_type" minOccurs="0" maxOccurs="unbounded"/>
195 <!-- Maps to struct lttng_channel -->
196 <xs:complexType name="channel_type">
198 <xs:element name="name" type="name_type"/>
199 <xs:element name="enabled" type="xs:boolean" default="true" minOccurs="0"/>
200 <xs:element name="overwrite_mode" type="channel_overwrite_mode_type" default="DISCARD" minOccurs="0"/>
201 <xs:element name="subbuffer_size" type="uint64_type" minOccurs="0"/> <!-- bytes -->
202 <xs:element name="subbuffer_count" type="uint64_type" default="4" minOccurs="0"/>
203 <xs:element name="switch_timer_interval" type="uint32_type" default="0" minOccurs="0"/> <!-- usec -->
204 <xs:element name="read_timer_interval" type="uint32_type"/> <!-- usec -->
205 <xs:element name="blocking_timeout" type="blocking_timeout_type" default="0" minOccurs="0" /> <!-- usec -->
206 <xs:element name="output_type" type="event_output_type"/>
207 <xs:element name="tracefile_size" type="uint64_type" default="0" minOccurs="0"/> <!-- bytes -->
208 <xs:element name="tracefile_count" type="uint64_type" default="0" minOccurs="0"/>
209 <xs:element name="live_timer_interval" type="uint32_type" default="0" minOccurs="0"/> <!-- usec -->
210 <xs:element name="events" type="event_list_type" minOccurs="0"/>
211 <xs:element name="contexts" type="event_context_list_type" minOccurs="0"/>
212 <xs:element name="monitor_timer_interval" type="uint64_type" default="0" minOccurs="0"/> <!-- usec -->
216 <!-- Maps to the lttng_domain_type enum -->
217 <xs:simpleType name="domain_type_type">
218 <xs:restriction base="xs:string">
219 <xs:enumeration value="KERNEL"/>
220 <xs:enumeration value="UST"/>
221 <xs:enumeration value="JUL"/>
222 <xs:enumeration value="LOG4J"/>
223 <xs:enumeration value="PYTHON"/>
227 <!-- Maps to the lttng_buffer_type enum -->
228 <xs:simpleType name="domain_buffer_type">
229 <xs:restriction base="xs:string">
230 <xs:enumeration value="PER_PID"/>
231 <xs:enumeration value="PER_UID"/>
232 <xs:enumeration value="GLOBAL"/>
236 <xs:complexType name="channel_list_type">
238 <xs:element name="channel" type="channel_type" minOccurs="0" maxOccurs="unbounded" />
242 <xs:complexType name="pid_target_type">
244 <xs:element name="pid" type="xs:integer" />
248 <!-- Maps to a list of pid_targets-->
249 <xs:complexType name="targets_type">
252 <xs:element name="pid_target" type="pid_target_type" minOccurs="0" maxOccurs="unbounded" />
257 <!-- Maps to a pid_tracker-->
258 <xs:complexType name="pid_tracker_type">
260 <xs:element name="targets" type="targets_type" />
264 <!-- Maps to a list of trackers-->
265 <xs:complexType name="trackers_type">
266 <xs:sequence minOccurs="0" maxOccurs="unbounded">
267 <xs:element name="pid_tracker" type="pid_tracker_type" maxOccurs="1" />
271 <!-- Maps to struct lttng_domain, contains channels and pid_tracker -->
272 <xs:complexType name="domain_type">
274 <xs:element name="type" type="domain_type_type"/>
275 <xs:element name="buffer_type" type="domain_buffer_type"/>
276 <xs:element name="channels" type="channel_list_type" minOccurs="0"/>
277 <xs:element name="trackers" type="trackers_type" minOccurs="0"/>
281 <xs:complexType name="session_attributes_type">
283 <xs:element name="snapshot_mode" type="xs:boolean" minOccurs="0"/>
284 <xs:element name="live_timer_interval" type="uint32_type" minOccurs="0"/> <!-- usec -->
285 <xs:element name="rotation_schedule_timer_period" type="uint64_type" minOccurs="0"/> <!-- usec -->
286 <xs:element name="rotation_schedule_size" type="uint64_type" minOccurs="0"/> <!-- bytes -->
290 <xs:complexType name="domain_list_type">
292 <xs:element name="domain" type="domain_type" minOccurs="0" maxOccurs="unbounded"/>
296 <xs:complexType name="net_output_type">
298 <xs:element name="control_uri" type="xs:string"/>
299 <xs:element name="data_uri" type="xs:string"/>
303 <xs:complexType name="destination_type">
305 <xs:element name="path" type="xs:string"/>
306 <xs:element name="net_output" type="net_output_type"/>
310 <xs:complexType name="consumer_output_type">
312 <xs:element name="enabled" type="xs:boolean" default="true"/>
313 <xs:element name="destination" type="destination_type"/>
317 <xs:complexType name="snapshot_output_type">
319 <xs:element name="name" type="name_type"/>
320 <xs:element name="max_size" type="uint64_type"/>
321 <xs:element name="consumer_output" type="consumer_output_type"/>
325 <xs:complexType name="snapshot_output_list_type">
327 <xs:element name="output" type="snapshot_output_type" minOccurs="0" maxOccurs="unbounded"/>
331 <xs:complexType name="session_output_type">
333 <xs:element name="snapshot_outputs" type="snapshot_output_list_type"/>
334 <xs:element name="consumer_output" type="consumer_output_type"/>
338 <xs:complexType name="session_type">
340 <xs:element name="name" type="name_type"/>
341 <xs:element name="shared_memory_path" type="xs:string" minOccurs="0"/>
342 <xs:element name="domains" type="domain_list_type" minOccurs="0"/>
343 <xs:element name="started" type="xs:boolean" default="0" minOccurs="0"/>
344 <xs:element name="attributes" type="session_attributes_type" minOccurs="0"/>
345 <xs:element name="output" type="session_output_type" minOccurs="0"/>
349 <xs:element name="sessions">
352 <xs:element name="session" type="session_type" maxOccurs="unbounded"/>