Commit | Line | Data |
---|---|---|
ebfa5166 | 1 | <?xml version="1.0" encoding="UTF-8"?> |
89aac4d5 JG |
2 | <!-- |
3 | Copyright (c) 2014 - Jérémie Galarneau <jeremie.galarneau@efficios.com> | |
4 | ||
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: | |
11 | ||
12 | The above copyright notice and this permission notice shall be included in | |
13 | all copies or substantial portions of the Software. | |
14 | ||
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 | |
21 | THE SOFTWARE. | |
22 | --> | |
629bf5b0 | 23 | <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" |
045fc617 | 24 | elementFormDefault="qualified" version="2.8"> |
629bf5b0 JG |
25 | |
26 | <xs:simpleType name="name_type"> | |
27 | <xs:restriction base="xs:string"> | |
28 | <xs:maxLength value="255"/> | |
29 | </xs:restriction> | |
30 | </xs:simpleType> | |
31 | ||
32 | <xs:simpleType name="uint64_type"> | |
33 | <xs:restriction base="xs:integer"> | |
34 | <xs:minInclusive value="0"/> | |
35 | <xs:maxInclusive value="18446744073709551615"/> | |
36 | </xs:restriction> | |
37 | </xs:simpleType> | |
38 | ||
39 | <xs:simpleType name="uint32_type"> | |
40 | <xs:restriction base="xs:integer"> | |
41 | <xs:minInclusive value="0"/> | |
42 | <xs:maxInclusive value="4294967295"/> | |
43 | </xs:restriction> | |
44 | </xs:simpleType> | |
45 | ||
46 | <xs:simpleType name="channel_overwrite_mode_type"> | |
47 | <xs:restriction base="xs:string"> | |
48 | <xs:enumeration value="DISCARD"/> | |
49 | <xs:enumeration value="OVERWRITE"/> | |
50 | </xs:restriction> | |
51 | </xs:simpleType> | |
52 | ||
53 | <!-- Maps to the lttng_event_output enum --> | |
54 | <xs:simpleType name="event_output_type"> | |
55 | <xs:restriction base="xs:string"> | |
56 | <xs:enumeration value="SPLICE"/> | |
57 | <xs:enumeration value="MMAP"/> | |
58 | </xs:restriction> | |
59 | </xs:simpleType> | |
60 | ||
61 | <!-- Maps to the lttng_loglevel_type enum --> | |
62 | <xs:simpleType name="loglevel_type"> | |
63 | <xs:restriction base="xs:string"> | |
64 | <xs:enumeration value="ALL"/> | |
65 | <xs:enumeration value="RANGE"/> | |
66 | <xs:enumeration value="SINGLE"/> | |
67 | </xs:restriction> | |
68 | </xs:simpleType> | |
69 | ||
70 | <!-- Maps to the lttng_event_type enum --> | |
71 | <xs:simpleType name="event_type_type"> | |
72 | <xs:restriction base="xs:string"> | |
73 | <xs:enumeration value="ALL"/> | |
74 | <xs:enumeration value="TRACEPOINT"/> | |
75 | <xs:enumeration value="PROBE"/> | |
76 | <xs:enumeration value="FUNCTION"/> | |
77 | <xs:enumeration value="FUNCTION_ENTRY"/> | |
78 | <xs:enumeration value="NOOP"/> | |
79 | <xs:enumeration value="SYSCALL"/> | |
80 | <xs:enumeration value="KPROBE"/> | |
81 | <xs:enumeration value="KRETPROBE"/> | |
82 | </xs:restriction> | |
83 | </xs:simpleType> | |
84 | ||
85 | <xs:complexType name="event_probe_attributes_type"> | |
86 | <xs:all> | |
87 | <xs:element name="symbol_name" type="name_type" minOccurs="0"/> | |
88 | <xs:element name="address" type="uint64_type" minOccurs="0"/> | |
89 | <xs:element name="offset" type="uint64_type" minOccurs="0"/> | |
90 | </xs:all> | |
91 | </xs:complexType> | |
92 | ||
93 | <xs:complexType name="event_ftrace_attributes_type"> | |
94 | <xs:all> | |
95 | <xs:element name="symbol_name" type="name_type"/> | |
96 | </xs:all> | |
97 | </xs:complexType> | |
98 | ||
99 | <xs:complexType name="event_attributes_type"> | |
100 | <xs:choice> | |
101 | <xs:element name="probe_attributes" type="event_probe_attributes_type"/> | |
102 | <xs:element name="function_attributes" type="event_ftrace_attributes_type"/> | |
103 | </xs:choice> | |
104 | </xs:complexType> | |
105 | ||
106 | <xs:complexType name="event_exclusion_list_type"> | |
107 | <xs:sequence> | |
108 | <xs:element name="exclusion" type="xs:string" minOccurs="0" maxOccurs="unbounded"/> | |
109 | </xs:sequence> | |
110 | </xs:complexType> | |
111 | ||
112 | <xs:complexType name="event_type"> | |
113 | <xs:all> | |
114 | <xs:element name="name" type="name_type" minOccurs="0"/> | |
115 | <xs:element name="enabled" type="xs:boolean" default="true" minOccurs="0"/> | |
116 | <xs:element name="type" type="event_type_type" default="TRACEPOINT" minOccurs="0"/> | |
117 | <xs:element name="loglevel_type" type="loglevel_type" default="ALL" minOccurs="0"/> | |
118 | <xs:element name="loglevel" type="xs:int" default="-1" minOccurs="0"/> | |
119 | <xs:element name="filter" type="xs:string" minOccurs="0"/> | |
120 | <xs:element name="exclusions" type="event_exclusion_list_type" minOccurs="0"/> | |
121 | <xs:element name="attributes" type="event_attributes_type" minOccurs="0"/> | |
122 | </xs:all> | |
123 | </xs:complexType> | |
124 | ||
125 | <xs:complexType name="event_list_type"> | |
126 | <xs:sequence> | |
127 | <xs:element name="event" type="event_type" minOccurs="0" maxOccurs="unbounded"/> | |
128 | </xs:sequence> | |
129 | </xs:complexType> | |
130 | ||
131 | <xs:complexType name="event_perf_context_type"> | |
132 | <xs:all> | |
133 | <xs:element name="type" type="uint32_type"/> | |
134 | <xs:element name="config" type="uint64_type"/> | |
135 | <xs:element name="name" type="name_type"/> | |
136 | </xs:all> | |
137 | </xs:complexType> | |
138 | ||
045fc617 JG |
139 | <xs:complexType name="event_app_context_type"> |
140 | <xs:all> | |
141 | <xs:element name="provider_name" type="xs:string"/> | |
142 | <xs:element name="ctx_name" type="xs:string"/> | |
143 | </xs:all> | |
144 | </xs:complexType> | |
145 | ||
629bf5b0 JG |
146 | <!-- Maps to the lttng_event_context_type enum --> |
147 | <xs:simpleType name="event_context_type_type"> | |
148 | <xs:restriction base="xs:string"> | |
149 | <xs:enumeration value="PID"/> | |
150 | <xs:enumeration value="PROCNAME"/> | |
151 | <xs:enumeration value="PRIO"/> | |
152 | <xs:enumeration value="NICE"/> | |
153 | <xs:enumeration value="VPID"/> | |
154 | <xs:enumeration value="TID"/> | |
155 | <xs:enumeration value="VTID"/> | |
156 | <xs:enumeration value="PPID"/> | |
157 | <xs:enumeration value="VPPID"/> | |
158 | <xs:enumeration value="PTHREAD_ID"/> | |
159 | <xs:enumeration value="HOSTNAME"/> | |
160 | <xs:enumeration value="IP"/> | |
045fc617 | 161 | <xs:enumeration value="APP"/> |
629bf5b0 JG |
162 | </xs:restriction> |
163 | </xs:simpleType> | |
164 | ||
165 | <xs:complexType name="event_context_type"> | |
166 | <xs:choice> | |
167 | <xs:element name="type" type="event_context_type_type"/> | |
168 | <xs:element name="perf" type="event_perf_context_type"/> | |
045fc617 | 169 | <xs:element name="app" type="event_app_context_type"/> |
629bf5b0 JG |
170 | </xs:choice> |
171 | </xs:complexType> | |
172 | ||
173 | <xs:complexType name="event_context_list_type"> | |
174 | <xs:sequence> | |
175 | <xs:element name="context" type="event_context_type" minOccurs="0" maxOccurs="unbounded"/> | |
176 | </xs:sequence> | |
177 | </xs:complexType> | |
178 | ||
179 | <!-- Maps to struct lttng_channel --> | |
180 | <xs:complexType name="channel_type"> | |
181 | <xs:all> | |
182 | <xs:element name="name" type="name_type"/> | |
183 | <xs:element name="enabled" type="xs:boolean" default="true" minOccurs="0"/> | |
184 | <xs:element name="overwrite_mode" type="channel_overwrite_mode_type" default="DISCARD" minOccurs="0"/> | |
185 | <xs:element name="subbuffer_size" type="uint64_type" minOccurs="0"/> <!-- bytes --> | |
186 | <xs:element name="subbuffer_count" type="uint64_type" default="4" minOccurs="0"/> | |
187 | <xs:element name="switch_timer_interval" type="uint32_type" default="0" minOccurs="0"/> <!-- usec --> | |
188 | <xs:element name="read_timer_interval" type="uint32_type"/> <!-- usec --> | |
189 | <xs:element name="output_type" type="event_output_type"/> | |
190 | <xs:element name="tracefile_size" type="uint64_type" default="0" minOccurs="0"/> <!-- bytes --> | |
191 | <xs:element name="tracefile_count" type="uint64_type" default="0" minOccurs="0"/> | |
192 | <xs:element name="live_timer_interval" type="uint32_type" default="0" minOccurs="0"/> <!-- usec --> | |
193 | <xs:element name="events" type="event_list_type" minOccurs="0"/> | |
194 | <xs:element name="contexts" type="event_context_list_type" minOccurs="0"/> | |
195 | </xs:all> | |
196 | </xs:complexType> | |
197 | ||
198 | <!-- Maps to the lttng_domain_type enum --> | |
199 | <xs:simpleType name="domain_type_type"> | |
200 | <xs:restriction base="xs:string"> | |
201 | <xs:enumeration value="KERNEL"/> | |
202 | <xs:enumeration value="UST"/> | |
203 | <xs:enumeration value="JUL"/> | |
ff00898c | 204 | <xs:enumeration value="LOG4J"/> |
0e115563 | 205 | <xs:enumeration value="PYTHON"/> |
629bf5b0 JG |
206 | </xs:restriction> |
207 | </xs:simpleType> | |
208 | ||
209 | <!-- Maps to the lttng_buffer_type enum --> | |
210 | <xs:simpleType name="domain_buffer_type"> | |
211 | <xs:restriction base="xs:string"> | |
212 | <xs:enumeration value="PER_PID"/> | |
213 | <xs:enumeration value="PER_UID"/> | |
214 | <xs:enumeration value="GLOBAL"/> | |
215 | </xs:restriction> | |
216 | </xs:simpleType> | |
217 | ||
218 | <xs:complexType name="channel_list_type"> | |
219 | <xs:sequence> | |
847a5916 | 220 | <xs:element name="channel" type="channel_type" minOccurs="0" maxOccurs="unbounded" /> |
629bf5b0 JG |
221 | </xs:sequence> |
222 | </xs:complexType> | |
223 | ||
847a5916 | 224 | <xs:complexType name="pid_target_type"> |
c43d6a0c | 225 | <xs:choice minOccurs="0"> |
847a5916 | 226 | <xs:element name="pid" type="xs:integer" /> |
c43d6a0c MD |
227 | <xs:element name="id" type="xs:integer" /> |
228 | </xs:choice> | |
847a5916 JR |
229 | </xs:complexType> |
230 | ||
231 | <!-- Maps to a list of pid_targets--> | |
c43d6a0c | 232 | <xs:complexType name="pid_targets_type"> |
847a5916 | 233 | <xs:sequence> |
c43d6a0c MD |
234 | <xs:choice minOccurs="0" maxOccurs="unbounded" > |
235 | <xs:element name="pid_target" type="pid_target_type" /> | |
847a5916 JR |
236 | </xs:choice> |
237 | </xs:sequence> | |
238 | </xs:complexType> | |
239 | ||
240 | <!-- Maps to a pid_tracker--> | |
241 | <xs:complexType name="pid_tracker_type"> | |
242 | <xs:all> | |
c43d6a0c MD |
243 | <xs:element name="targets" type="pid_targets_type" /> |
244 | </xs:all> | |
245 | </xs:complexType> | |
246 | ||
247 | <xs:complexType name="vpid_target_type"> | |
248 | <xs:all> | |
249 | <xs:element name="id" type="xs:integer" /> | |
250 | </xs:all> | |
251 | </xs:complexType> | |
252 | ||
253 | <!-- Maps to a list of vpid_targets--> | |
254 | <xs:complexType name="vpid_targets_type"> | |
255 | <xs:sequence> | |
256 | <xs:element name="vpid_target" type="vpid_target_type" minOccurs="0" maxOccurs="unbounded" /> | |
257 | </xs:sequence> | |
258 | </xs:complexType> | |
259 | ||
260 | <!-- Maps to a pid_tracker--> | |
261 | <xs:complexType name="vpid_tracker_type"> | |
262 | <xs:all> | |
263 | <xs:element name="targets" type="vpid_targets_type" /> | |
264 | </xs:all> | |
265 | </xs:complexType> | |
266 | ||
267 | <xs:complexType name="uid_target_type"> | |
268 | <xs:choice> | |
269 | <xs:element name="id" type="xs:integer" /> | |
270 | <xs:element name="name" type="xs:string" /> | |
271 | </xs:choice> | |
272 | </xs:complexType> | |
273 | ||
274 | <!-- Maps to a list of uid_targets--> | |
275 | <xs:complexType name="uid_targets_type"> | |
276 | <xs:sequence> | |
277 | <xs:element name="uid_target" type="uid_target_type" minOccurs="0" maxOccurs="unbounded" /> | |
278 | </xs:sequence> | |
279 | </xs:complexType> | |
280 | ||
281 | <!-- Maps to a uid_tracker--> | |
282 | <xs:complexType name="uid_tracker_type"> | |
283 | <xs:all> | |
284 | <xs:element name="targets" type="uid_targets_type" /> | |
285 | </xs:all> | |
286 | </xs:complexType> | |
287 | ||
288 | <xs:complexType name="vuid_target_type"> | |
289 | <xs:choice> | |
290 | <xs:element name="id" type="xs:integer" /> | |
291 | <xs:element name="name" type="xs:string" /> | |
292 | </xs:choice> | |
293 | </xs:complexType> | |
294 | ||
295 | <!-- Maps to a list of vuid_targets--> | |
296 | <xs:complexType name="vuid_targets_type"> | |
297 | <xs:sequence> | |
298 | <xs:element name="vuid_target" type="vuid_target_type" minOccurs="0" maxOccurs="unbounded" /> | |
299 | </xs:sequence> | |
300 | </xs:complexType> | |
301 | ||
302 | <!-- Maps to a uid_tracker--> | |
303 | <xs:complexType name="vuid_tracker_type"> | |
304 | <xs:all> | |
305 | <xs:element name="targets" type="vuid_targets_type" /> | |
306 | </xs:all> | |
307 | </xs:complexType> | |
308 | ||
309 | <xs:complexType name="gid_target_type"> | |
310 | <xs:choice> | |
311 | <xs:element name="id" type="xs:integer" /> | |
312 | <xs:element name="name" type="xs:string" /> | |
313 | </xs:choice> | |
314 | </xs:complexType> | |
315 | ||
316 | <!-- Maps to a list of gid_targets--> | |
317 | <xs:complexType name="gid_targets_type"> | |
318 | <xs:sequence> | |
319 | <xs:element name="gid_target" type="gid_target_type" minOccurs="0" maxOccurs="unbounded" /> | |
320 | </xs:sequence> | |
321 | </xs:complexType> | |
322 | ||
323 | <!-- Maps to a gid_tracker--> | |
324 | <xs:complexType name="gid_tracker_type"> | |
325 | <xs:all> | |
326 | <xs:element name="targets" type="gid_targets_type" /> | |
327 | </xs:all> | |
328 | </xs:complexType> | |
329 | ||
330 | <xs:complexType name="vgid_target_type"> | |
331 | <xs:choice> | |
332 | <xs:element name="id" type="xs:integer" /> | |
333 | <xs:element name="name" type="xs:string" /> | |
334 | </xs:choice> | |
335 | </xs:complexType> | |
336 | ||
337 | <!-- Maps to a list of vgid_targets--> | |
338 | <xs:complexType name="vgid_targets_type"> | |
339 | <xs:sequence> | |
340 | <xs:element name="vgid_target" type="vgid_target_type" minOccurs="0" maxOccurs="unbounded" /> | |
341 | </xs:sequence> | |
342 | </xs:complexType> | |
343 | ||
344 | <!-- Maps to a gid_tracker--> | |
345 | <xs:complexType name="vgid_tracker_type"> | |
346 | <xs:all> | |
347 | <xs:element name="targets" type="vgid_targets_type" /> | |
847a5916 JR |
348 | </xs:all> |
349 | </xs:complexType> | |
350 | ||
351 | <!-- Maps to a list of trackers--> | |
352 | <xs:complexType name="trackers_type"> | |
c43d6a0c MD |
353 | <xs:sequence> |
354 | <xs:choice minOccurs="0" maxOccurs="unbounded" > | |
355 | <xs:element name="pid_tracker" type="pid_tracker_type" maxOccurs="1" /> | |
356 | <xs:element name="vpid_tracker" type="vpid_tracker_type" maxOccurs="1" /> | |
357 | <xs:element name="uid_tracker" type="uid_tracker_type" maxOccurs="1" /> | |
358 | <xs:element name="vuid_tracker" type="vuid_tracker_type" maxOccurs="1" /> | |
359 | <xs:element name="gid_tracker" type="gid_tracker_type" maxOccurs="1" /> | |
360 | <xs:element name="vgid_tracker" type="vgid_tracker_type" maxOccurs="1" /> | |
361 | </xs:choice> | |
847a5916 JR |
362 | </xs:sequence> |
363 | </xs:complexType> | |
364 | ||
365 | <!-- Maps to struct lttng_domain, contains channels and pid_tracker --> | |
629bf5b0 JG |
366 | <xs:complexType name="domain_type"> |
367 | <xs:all> | |
368 | <xs:element name="type" type="domain_type_type"/> | |
369 | <xs:element name="buffer_type" type="domain_buffer_type"/> | |
370 | <xs:element name="channels" type="channel_list_type" minOccurs="0"/> | |
847a5916 | 371 | <xs:element name="trackers" type="trackers_type" minOccurs="0"/> |
629bf5b0 JG |
372 | </xs:all> |
373 | </xs:complexType> | |
374 | ||
375 | <xs:complexType name="session_attributes_type"> | |
376 | <xs:choice> | |
377 | <xs:element name="snapshot_mode" type="xs:boolean"/> | |
378 | <xs:element name="live_timer_interval" type="uint32_type"/> <!-- usec --> | |
379 | </xs:choice> | |
380 | </xs:complexType> | |
381 | ||
382 | <xs:complexType name="domain_list_type"> | |
383 | <xs:sequence> | |
384 | <xs:element name="domain" type="domain_type" minOccurs="0" maxOccurs="unbounded"/> | |
385 | </xs:sequence> | |
386 | </xs:complexType> | |
387 | ||
388 | <xs:complexType name="net_output_type"> | |
389 | <xs:all> | |
390 | <xs:element name="control_uri" type="xs:string"/> | |
391 | <xs:element name="data_uri" type="xs:string"/> | |
392 | </xs:all> | |
393 | </xs:complexType> | |
394 | ||
395 | <xs:complexType name="destination_type"> | |
396 | <xs:choice> | |
397 | <xs:element name="path" type="xs:string"/> | |
398 | <xs:element name="net_output" type="net_output_type"/> | |
399 | </xs:choice> | |
400 | </xs:complexType> | |
401 | ||
402 | <xs:complexType name="consumer_output_type"> | |
403 | <xs:all> | |
404 | <xs:element name="enabled" type="xs:boolean" default="true"/> | |
405 | <xs:element name="destination" type="destination_type"/> | |
406 | </xs:all> | |
407 | </xs:complexType> | |
408 | ||
409 | <xs:complexType name="snapshot_output_type"> | |
410 | <xs:all> | |
411 | <xs:element name="name" type="name_type"/> | |
412 | <xs:element name="max_size" type="uint64_type"/> | |
413 | <xs:element name="consumer_output" type="consumer_output_type"/> | |
414 | </xs:all> | |
415 | </xs:complexType> | |
416 | ||
417 | <xs:complexType name="snapshot_output_list_type"> | |
418 | <xs:sequence> | |
419 | <xs:element name="output" type="snapshot_output_type" minOccurs="0" maxOccurs="unbounded"/> | |
420 | </xs:sequence> | |
421 | </xs:complexType> | |
422 | ||
423 | <xs:complexType name="session_output_type"> | |
424 | <xs:choice> | |
425 | <xs:element name="snapshot_outputs" type="snapshot_output_list_type"/> | |
426 | <xs:element name="consumer_output" type="consumer_output_type"/> | |
427 | </xs:choice> | |
428 | </xs:complexType> | |
429 | ||
430 | <xs:complexType name="session_type"> | |
431 | <xs:all> | |
432 | <xs:element name="name" type="name_type"/> | |
9e7c9f56 | 433 | <xs:element name="shared_memory_path" type="xs:string" minOccurs="0"/> |
629bf5b0 JG |
434 | <xs:element name="domains" type="domain_list_type" minOccurs="0"/> |
435 | <xs:element name="started" type="xs:boolean" default="0" minOccurs="0"/> | |
436 | <xs:element name="attributes" type="session_attributes_type" minOccurs="0"/> | |
437 | <xs:element name="output" type="session_output_type" minOccurs="0"/> | |
438 | </xs:all> | |
439 | </xs:complexType> | |
440 | ||
441 | <xs:element name="sessions"> | |
442 | <xs:complexType> | |
443 | <xs:sequence> | |
444 | <xs:element name="session" type="session_type" maxOccurs="unbounded"/> | |
445 | </xs:sequence> | |
446 | </xs:complexType> | |
447 | </xs:element> | |
448 | ||
449 | </xs:schema> |