trackers: support tracking feature
[lttng-tools.git] / src / common / config / session.xsd
CommitLineData
ebfa5166 1<?xml version="1.0" encoding="UTF-8"?>
89aac4d5
JG
2<!--
3Copyright (c) 2014 - Jérémie Galarneau <jeremie.galarneau@efficios.com>
4
5Permission is hereby granted, free of charge, to any person obtaining a copy
6of this software and associated documentation files (the "Software"), to deal
7in the Software without restriction, including without limitation the rights
8to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9copies of the Software, and to permit persons to whom the Software is
10furnished to do so, subject to the following conditions:
11
12The above copyright notice and this permission notice shall be included in
13all copies or substantial portions of the Software.
14
15THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21THE SOFTWARE.
22-->
629bf5b0 23<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
259c2674 24elementFormDefault="qualified" version="2.11">
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
491d1539
MD
46<!--
47Maps to the range allowed for blocking timeout: -1 (block forever),
480 (do not block), positive integer value (blocking time in usec) limited
49by its signed 32-bit representation when converted to msec.
50-->
51<xs:simpleType name="blocking_timeout_type">
52 <xs:restriction base="xs:integer">
53 <xs:minInclusive value="-1" />
54 <xs:maxInclusive value="2147483648000" />
55 </xs:restriction>
56</xs:simpleType>
57
629bf5b0
JG
58<xs:simpleType name="channel_overwrite_mode_type">
59 <xs:restriction base="xs:string">
60 <xs:enumeration value="DISCARD"/>
61 <xs:enumeration value="OVERWRITE"/>
62 </xs:restriction>
63</xs:simpleType>
64
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"/>
70 </xs:restriction>
71</xs:simpleType>
72
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"/>
79 </xs:restriction>
80</xs:simpleType>
81
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"/>
c1e83fb4 88 <xs:enumeration value="USERSPACE_PROBE"/>
629bf5b0
JG
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"/>
95 </xs:restriction>
96</xs:simpleType>
97
98<xs:complexType name="event_probe_attributes_type">
99 <xs:all>
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"/>
103 </xs:all>
104</xs:complexType>
105
c1e83fb4
FD
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"/>
111 </xs:restriction>
112</xs:simpleType>
113
114<xs:complexType name="event_userspace_probe_function_attributes_type">
115 <xs:all>
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"/>
119 </xs:all>
120</xs:complexType>
121
122<xs:complexType name="event_userspace_probe_tracepoint_attributes_type">
123 <xs:all>
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"/>
128 </xs:all>
129</xs:complexType>
130
629bf5b0
JG
131<xs:complexType name="event_ftrace_attributes_type">
132 <xs:all>
133 <xs:element name="symbol_name" type="name_type"/>
134 </xs:all>
135</xs:complexType>
136
137<xs:complexType name="event_attributes_type">
138 <xs:choice>
139 <xs:element name="probe_attributes" type="event_probe_attributes_type"/>
140 <xs:element name="function_attributes" type="event_ftrace_attributes_type"/>
c1e83fb4
FD
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"/>
629bf5b0
JG
143 </xs:choice>
144</xs:complexType>
145
146<xs:complexType name="event_exclusion_list_type">
147 <xs:sequence>
148 <xs:element name="exclusion" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
149 </xs:sequence>
150</xs:complexType>
151
152<xs:complexType name="event_type">
153 <xs:all>
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"/>
162 </xs:all>
163</xs:complexType>
164
165<xs:complexType name="event_list_type">
166 <xs:sequence>
167 <xs:element name="event" type="event_type" minOccurs="0" maxOccurs="unbounded"/>
168 </xs:sequence>
169</xs:complexType>
170
171<xs:complexType name="event_perf_context_type">
172 <xs:all>
173 <xs:element name="type" type="uint32_type"/>
174 <xs:element name="config" type="uint64_type"/>
175 <xs:element name="name" type="name_type"/>
176 </xs:all>
177</xs:complexType>
178
045fc617
JG
179<xs:complexType name="event_app_context_type">
180 <xs:all>
181 <xs:element name="provider_name" type="xs:string"/>
182 <xs:element name="ctx_name" type="xs:string"/>
183 </xs:all>
184</xs:complexType>
185
629bf5b0
JG
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"/>
045fc617 201 <xs:enumeration value="APP"/>
c460810b
FD
202 <xs:enumeration value="INTERRUPTIBLE" />
203 <xs:enumeration value="PREEMPTIBLE" />
204 <xs:enumeration value="NEED_RESCHEDULE" />
205 <xs:enumeration value="MIGRATABLE" />
16c4c991
FD
206 <xs:enumeration value="CALLSTACK_USER" />
207 <xs:enumeration value="CALLSTACK_KERNEL" />
629bf5b0
JG
208 </xs:restriction>
209</xs:simpleType>
210
211<xs:complexType name="event_context_type">
212 <xs:choice>
213 <xs:element name="type" type="event_context_type_type"/>
214 <xs:element name="perf" type="event_perf_context_type"/>
045fc617 215 <xs:element name="app" type="event_app_context_type"/>
629bf5b0
JG
216 </xs:choice>
217</xs:complexType>
218
219<xs:complexType name="event_context_list_type">
220 <xs:sequence>
221 <xs:element name="context" type="event_context_type" minOccurs="0" maxOccurs="unbounded"/>
222 </xs:sequence>
223</xs:complexType>
224
225<!-- Maps to struct lttng_channel -->
226<xs:complexType name="channel_type">
227 <xs:all>
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 -->
491d1539 235 <xs:element name="blocking_timeout" type="blocking_timeout_type" default="0" minOccurs="0" /> <!-- usec -->
629bf5b0
JG
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"/>
4fc2b126 242 <xs:element name="monitor_timer_interval" type="uint64_type" default="0" minOccurs="0"/> <!-- usec -->
629bf5b0
JG
243 </xs:all>
244</xs:complexType>
245
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"/>
ff00898c 252 <xs:enumeration value="LOG4J"/>
0e115563 253 <xs:enumeration value="PYTHON"/>
629bf5b0
JG
254 </xs:restriction>
255</xs:simpleType>
256
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"/>
263 </xs:restriction>
264</xs:simpleType>
265
266<xs:complexType name="channel_list_type">
267 <xs:sequence>
847a5916 268 <xs:element name="channel" type="channel_type" minOccurs="0" maxOccurs="unbounded" />
629bf5b0
JG
269 </xs:sequence>
270</xs:complexType>
271
847a5916 272<xs:complexType name="pid_target_type">
55c9e7ca 273 <xs:choice minOccurs="0">
847a5916 274 <xs:element name="pid" type="xs:integer" />
55c9e7ca
JR
275 <xs:element name="id" type="xs:integer" />
276 </xs:choice>
847a5916
JR
277</xs:complexType>
278
279<!-- Maps to a list of pid_targets-->
55c9e7ca 280<xs:complexType name="pid_targets_type">
847a5916 281 <xs:sequence>
55c9e7ca
JR
282 <xs:choice minOccurs="0" maxOccurs="unbounded" >
283 <xs:element name="pid_target" type="pid_target_type" />
847a5916
JR
284 </xs:choice>
285 </xs:sequence>
286</xs:complexType>
287
288<!-- Maps to a pid_tracker-->
289<xs:complexType name="pid_tracker_type">
290 <xs:all>
55c9e7ca
JR
291 <xs:element name="targets" type="pid_targets_type" />
292 </xs:all>
293</xs:complexType>
294
295<xs:complexType name="vpid_target_type">
296 <xs:all>
297 <xs:element name="id" type="xs:integer" />
298 </xs:all>
299</xs:complexType>
300
301<!-- Maps to a list of vpid_targets-->
302<xs:complexType name="vpid_targets_type">
303 <xs:sequence>
304 <xs:element name="vpid_target" type="vpid_target_type" minOccurs="0" maxOccurs="unbounded" />
305 </xs:sequence>
306</xs:complexType>
307
308<!-- Maps to a pid_tracker-->
309<xs:complexType name="vpid_tracker_type">
310 <xs:all>
311 <xs:element name="targets" type="vpid_targets_type" />
312 </xs:all>
313</xs:complexType>
314
315<xs:complexType name="uid_target_type">
316 <xs:choice>
317 <xs:element name="id" type="xs:integer" />
318 <xs:element name="name" type="xs:string" />
319 </xs:choice>
320</xs:complexType>
321
322<!-- Maps to a list of uid_targets-->
323<xs:complexType name="uid_targets_type">
324 <xs:sequence>
325 <xs:element name="uid_target" type="uid_target_type" minOccurs="0" maxOccurs="unbounded" />
326 </xs:sequence>
327</xs:complexType>
328
329<!-- Maps to a uid_tracker-->
330<xs:complexType name="uid_tracker_type">
331 <xs:all>
332 <xs:element name="targets" type="uid_targets_type" />
333 </xs:all>
334</xs:complexType>
335
336<xs:complexType name="vuid_target_type">
337 <xs:choice>
338 <xs:element name="id" type="xs:integer" />
339 <xs:element name="name" type="xs:string" />
340 </xs:choice>
341</xs:complexType>
342
343<!-- Maps to a list of vuid_targets-->
344<xs:complexType name="vuid_targets_type">
345 <xs:sequence>
346 <xs:element name="vuid_target" type="vuid_target_type" minOccurs="0" maxOccurs="unbounded" />
347 </xs:sequence>
348</xs:complexType>
349
350<!-- Maps to a uid_tracker-->
351<xs:complexType name="vuid_tracker_type">
352 <xs:all>
353 <xs:element name="targets" type="vuid_targets_type" />
354 </xs:all>
355</xs:complexType>
356
357<xs:complexType name="gid_target_type">
358 <xs:choice>
359 <xs:element name="id" type="xs:integer" />
360 <xs:element name="name" type="xs:string" />
361 </xs:choice>
362</xs:complexType>
363
364<!-- Maps to a list of gid_targets-->
365<xs:complexType name="gid_targets_type">
366 <xs:sequence>
367 <xs:element name="gid_target" type="gid_target_type" minOccurs="0" maxOccurs="unbounded" />
368 </xs:sequence>
369</xs:complexType>
370
371<!-- Maps to a gid_tracker-->
372<xs:complexType name="gid_tracker_type">
373 <xs:all>
374 <xs:element name="targets" type="gid_targets_type" />
375 </xs:all>
376</xs:complexType>
377
378<xs:complexType name="vgid_target_type">
379 <xs:choice>
380 <xs:element name="id" type="xs:integer" />
381 <xs:element name="name" type="xs:string" />
382 </xs:choice>
383</xs:complexType>
384
385<!-- Maps to a list of vgid_targets-->
386<xs:complexType name="vgid_targets_type">
387 <xs:sequence>
388 <xs:element name="vgid_target" type="vgid_target_type" minOccurs="0" maxOccurs="unbounded" />
389 </xs:sequence>
390</xs:complexType>
391
392<!-- Maps to a gid_tracker-->
393<xs:complexType name="vgid_tracker_type">
394 <xs:all>
395 <xs:element name="targets" type="vgid_targets_type" />
847a5916
JR
396 </xs:all>
397</xs:complexType>
398
399<!-- Maps to a list of trackers-->
400<xs:complexType name="trackers_type">
55c9e7ca
JR
401 <xs:sequence>
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" />
409 </xs:choice>
847a5916
JR
410 </xs:sequence>
411</xs:complexType>
412
413<!-- Maps to struct lttng_domain, contains channels and pid_tracker -->
629bf5b0
JG
414<xs:complexType name="domain_type">
415 <xs:all>
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"/>
847a5916 419 <xs:element name="trackers" type="trackers_type" minOccurs="0"/>
629bf5b0
JG
420 </xs:all>
421</xs:complexType>
422
ce6176f2
JG
423<xs:complexType name="periodic_rotation_schedule_type">
424 <xs:all>
425 <xs:element name="time_us" type="uint64_type" minOccurs="0" />
426 </xs:all>
427</xs:complexType>
428
429<xs:complexType name="size_threshold_rotation_schedule_type">
430 <xs:all>
431 <xs:element name="bytes" type="uint64_type" minOccurs="0" />
432 </xs:all>
433</xs:complexType>
434
435<xs:complexType name="rotation_schedule_type">
436 <xs:sequence>
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" />
440 </xs:choice>
441 </xs:sequence>
442</xs:complexType>
443
629bf5b0 444<xs:complexType name="session_attributes_type">
259c2674
JD
445 <xs:all>
446 <xs:element name="snapshot_mode" type="xs:boolean" minOccurs="0"/>
447 <xs:element name="live_timer_interval" type="uint32_type" minOccurs="0"/> <!-- usec -->
ce6176f2 448 <xs:element name="rotation_schedules" type="rotation_schedule_type" minOccurs="0" />
259c2674 449 </xs:all>
629bf5b0
JG
450</xs:complexType>
451
452<xs:complexType name="domain_list_type">
453 <xs:sequence>
454 <xs:element name="domain" type="domain_type" minOccurs="0" maxOccurs="unbounded"/>
455 </xs:sequence>
456</xs:complexType>
457
458<xs:complexType name="net_output_type">
459 <xs:all>
460 <xs:element name="control_uri" type="xs:string"/>
461 <xs:element name="data_uri" type="xs:string"/>
462 </xs:all>
463</xs:complexType>
464
465<xs:complexType name="destination_type">
466 <xs:choice>
467 <xs:element name="path" type="xs:string"/>
468 <xs:element name="net_output" type="net_output_type"/>
469 </xs:choice>
470</xs:complexType>
471
472<xs:complexType name="consumer_output_type">
473 <xs:all>
474 <xs:element name="enabled" type="xs:boolean" default="true"/>
475 <xs:element name="destination" type="destination_type"/>
476 </xs:all>
477</xs:complexType>
478
479<xs:complexType name="snapshot_output_type">
480 <xs:all>
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"/>
484 </xs:all>
485</xs:complexType>
486
487<xs:complexType name="snapshot_output_list_type">
488 <xs:sequence>
489 <xs:element name="output" type="snapshot_output_type" minOccurs="0" maxOccurs="unbounded"/>
490 </xs:sequence>
491</xs:complexType>
492
493<xs:complexType name="session_output_type">
494 <xs:choice>
495 <xs:element name="snapshot_outputs" type="snapshot_output_list_type"/>
496 <xs:element name="consumer_output" type="consumer_output_type"/>
497 </xs:choice>
498</xs:complexType>
499
500<xs:complexType name="session_type">
501 <xs:all>
502 <xs:element name="name" type="name_type"/>
9e7c9f56 503 <xs:element name="shared_memory_path" type="xs:string" minOccurs="0"/>
629bf5b0
JG
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"/>
508 </xs:all>
509</xs:complexType>
510
511<xs:element name="sessions">
512 <xs:complexType>
513 <xs:sequence>
514 <xs:element name="session" type="session_type" maxOccurs="unbounded"/>
515 </xs:sequence>
516 </xs:complexType>
517</xs:element>
518
519</xs:schema>
This page took 0.058501 seconds and 4 git commands to generate.