Consumer: implement LTTNG_CONSUMER_CLEAR_CHANNEL
[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
JR
272<xs:complexType name="pid_target_type">
273 <xs:all>
274 <xs:element name="pid" type="xs:integer" />
275 </xs:all>
276</xs:complexType>
277
278<!-- Maps to a list of pid_targets-->
279<xs:complexType name="targets_type">
280 <xs:sequence>
281 <xs:choice>
282 <xs:element name="pid_target" type="pid_target_type" minOccurs="0" maxOccurs="unbounded" />
283 </xs:choice>
284 </xs:sequence>
285</xs:complexType>
286
287<!-- Maps to a pid_tracker-->
288<xs:complexType name="pid_tracker_type">
289 <xs:all>
290 <xs:element name="targets" type="targets_type" />
291 </xs:all>
292</xs:complexType>
293
294<!-- Maps to a list of trackers-->
295<xs:complexType name="trackers_type">
296 <xs:sequence minOccurs="0" maxOccurs="unbounded">
297 <xs:element name="pid_tracker" type="pid_tracker_type" maxOccurs="1" />
298 </xs:sequence>
299</xs:complexType>
300
301<!-- Maps to struct lttng_domain, contains channels and pid_tracker -->
629bf5b0
JG
302<xs:complexType name="domain_type">
303 <xs:all>
304 <xs:element name="type" type="domain_type_type"/>
305 <xs:element name="buffer_type" type="domain_buffer_type"/>
306 <xs:element name="channels" type="channel_list_type" minOccurs="0"/>
847a5916 307 <xs:element name="trackers" type="trackers_type" minOccurs="0"/>
629bf5b0
JG
308 </xs:all>
309</xs:complexType>
310
ce6176f2
JG
311<xs:complexType name="periodic_rotation_schedule_type">
312 <xs:all>
313 <xs:element name="time_us" type="uint64_type" minOccurs="0" />
314 </xs:all>
315</xs:complexType>
316
317<xs:complexType name="size_threshold_rotation_schedule_type">
318 <xs:all>
319 <xs:element name="bytes" type="uint64_type" minOccurs="0" />
320 </xs:all>
321</xs:complexType>
322
323<xs:complexType name="rotation_schedule_type">
324 <xs:sequence>
325 <xs:choice maxOccurs="unbounded">
326 <xs:element name="periodic" type="periodic_rotation_schedule_type" maxOccurs="unbounded" />
327 <xs:element name="size_threshold" type="size_threshold_rotation_schedule_type" maxOccurs="unbounded" />
328 </xs:choice>
329 </xs:sequence>
330</xs:complexType>
331
629bf5b0 332<xs:complexType name="session_attributes_type">
259c2674
JD
333 <xs:all>
334 <xs:element name="snapshot_mode" type="xs:boolean" minOccurs="0"/>
335 <xs:element name="live_timer_interval" type="uint32_type" minOccurs="0"/> <!-- usec -->
ce6176f2 336 <xs:element name="rotation_schedules" type="rotation_schedule_type" minOccurs="0" />
259c2674 337 </xs:all>
629bf5b0
JG
338</xs:complexType>
339
340<xs:complexType name="domain_list_type">
341 <xs:sequence>
342 <xs:element name="domain" type="domain_type" minOccurs="0" maxOccurs="unbounded"/>
343 </xs:sequence>
344</xs:complexType>
345
346<xs:complexType name="net_output_type">
347 <xs:all>
348 <xs:element name="control_uri" type="xs:string"/>
349 <xs:element name="data_uri" type="xs:string"/>
350 </xs:all>
351</xs:complexType>
352
353<xs:complexType name="destination_type">
354 <xs:choice>
355 <xs:element name="path" type="xs:string"/>
356 <xs:element name="net_output" type="net_output_type"/>
357 </xs:choice>
358</xs:complexType>
359
360<xs:complexType name="consumer_output_type">
361 <xs:all>
362 <xs:element name="enabled" type="xs:boolean" default="true"/>
363 <xs:element name="destination" type="destination_type"/>
364 </xs:all>
365</xs:complexType>
366
367<xs:complexType name="snapshot_output_type">
368 <xs:all>
369 <xs:element name="name" type="name_type"/>
370 <xs:element name="max_size" type="uint64_type"/>
371 <xs:element name="consumer_output" type="consumer_output_type"/>
372 </xs:all>
373</xs:complexType>
374
375<xs:complexType name="snapshot_output_list_type">
376 <xs:sequence>
377 <xs:element name="output" type="snapshot_output_type" minOccurs="0" maxOccurs="unbounded"/>
378 </xs:sequence>
379</xs:complexType>
380
381<xs:complexType name="session_output_type">
382 <xs:choice>
383 <xs:element name="snapshot_outputs" type="snapshot_output_list_type"/>
384 <xs:element name="consumer_output" type="consumer_output_type"/>
385 </xs:choice>
386</xs:complexType>
387
388<xs:complexType name="session_type">
389 <xs:all>
390 <xs:element name="name" type="name_type"/>
9e7c9f56 391 <xs:element name="shared_memory_path" type="xs:string" minOccurs="0"/>
629bf5b0
JG
392 <xs:element name="domains" type="domain_list_type" minOccurs="0"/>
393 <xs:element name="started" type="xs:boolean" default="0" minOccurs="0"/>
394 <xs:element name="attributes" type="session_attributes_type" minOccurs="0"/>
395 <xs:element name="output" type="session_output_type" minOccurs="0"/>
396 </xs:all>
397</xs:complexType>
398
399<xs:element name="sessions">
400 <xs:complexType>
401 <xs:sequence>
402 <xs:element name="session" type="session_type" maxOccurs="unbounded"/>
403 </xs:sequence>
404 </xs:complexType>
405</xs:element>
406
407</xs:schema>
This page took 0.066752 seconds and 5 git commands to generate.