1 <?xml version="1.0" encoding="UTF-8"?>
3 Copyright (c) 2014 - Oliver Cotte <olivier.cotte@polymtl.ca>
4 - Jonathan Rajotte <jonathan.r.julien@gmail.com>
6 Permission is hereby granted, free of charge, to any person obtaining a copy
7 of this software and associated documentation files (the "Software"), to deal
8 in the Software without restriction, including without limitation the rights
9 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 copies of the Software, and to permit persons to whom the Software is
11 furnished to do so, subject to the following conditions:
13 The above copyright notice and this permission notice shall be included in
14 all copies or substantial portions of the Software.
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24 <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
25 elementFormDefault="qualified" version="2.5">
27 <!-- Maps to the uint32_t type -->
28 <xs:simpleType name="uint32_type">
29 <xs:restriction base="xs:integer">
30 <xs:minInclusive value="0" />
31 <xs:maxInclusive value="4294967295" />
35 <!-- Maps to the uint64_t type -->
36 <xs:simpleType name="uint64_type">
37 <xs:restriction base="xs:integer">
38 <xs:minInclusive value="0" />
39 <xs:maxInclusive value="18446744073709551615" />
43 <!-- Maps to the char name[LTTNG_SYMBOL_NAME_LEN] -->
44 <xs:simpleType name="name_type">
45 <xs:restriction base="xs:string">
46 <xs:maxLength value="255" />
50 <!-- Maps to the lttng_event_type enum -->
51 <xs:simpleType name="event_type_type">
52 <xs:restriction base="xs:string">
53 <xs:enumeration value="ALL" />
54 <xs:enumeration value="TRACEPOINT" />
55 <xs:enumeration value="PROBE" />
56 <xs:enumeration value="FUNCTION" />
57 <xs:enumeration value="FUNCTION_ENTRY" />
58 <xs:enumeration value="NOOP" />
59 <xs:enumeration value="SYSCALL" />
60 <xs:enumeration value="KPROBE" />
61 <xs:enumeration value="KRETPROBE" />
65 <!-- Maps to the lttng_event_field_type enum -->
66 <xs:simpleType name="event_field_type_type">
67 <xs:restriction base="xs:string">
68 <xs:enumeration value="OTHER" />
69 <xs:enumeration value="INTEGER" />
70 <xs:enumeration value="ENUM" />
71 <xs:enumeration value="FLOAT" />
72 <xs:enumeration value="STRING" />
76 <!-- Maps to the lttng_loglevel_type enum -->
77 <xs:simpleType name="loglevel_type">
78 <xs:restriction base="xs:string">
79 <xs:enumeration value="ALL" />
80 <xs:enumeration value="RANGE" />
81 <xs:enumeration value="SINGLE" />
82 <xs:enumeration value="UNKNOWN" />
86 <!-- Maps to loglevel_string char * -->
87 <xs:simpleType name="loglevel_string_type">
88 <xs:restriction base="xs:string">
89 <xs:enumeration value="" />
90 <xs:enumeration value="TRACE_EMERG" />
91 <xs:enumeration value="TRACE_ALERT" />
92 <xs:enumeration value="TRACE_CRIT" />
93 <xs:enumeration value="TRACE_ERR" />
94 <xs:enumeration value="TRACE_WARNING" />
95 <xs:enumeration value="TRACE_NOTICE" />
96 <xs:enumeration value="TRACE_INFO" />
97 <xs:enumeration value="TRACE_DEBUG_SYSTEM" />
98 <xs:enumeration value="TRACE_DEBUG_PROGRAM" />
99 <xs:enumeration value="TRACE_DEBUG_PROCESS" />
100 <xs:enumeration value="TRACE_DEBUG_MODULE" />
101 <xs:enumeration value="TRACE_DEBUG_UNIT" />
102 <xs:enumeration value="TRACE_DEBUG_FUNCTION" />
103 <xs:enumeration value="TRACE_DEBUG_LINE" />
104 <xs:enumeration value="TRACE_DEBUG" />
105 <xs:enumeration value="UNKNOWN" />
109 <!-- Maps to the lttng_event_probe_attr struct -->
110 <xs:complexType name="event_probe_attributes_type">
112 <xs:element name="address" type="uint64_type" />
113 <xs:element name="offset" type="uint64_type" />
114 <xs:element name="symbol_name" type="name_type" />
118 <!-- Maps to the lttng_event_function_attr struct -->
119 <xs:complexType name="event_ftrace_attributes_type">
121 <xs:element name="symbol_name" type="name_type" />
125 <!-- Maps to per event type configuration -->
126 <xs:complexType name="event_attributes_type">
128 <xs:element name="probe_attributes" type="event_probe_attributes_type" />
129 <xs:element name="function_attributes" type="event_ftrace_attributes_type" />
133 <!-- Maps to lttng_event struct -->
134 <xs:complexType name="event_type">
136 <xs:element name="type" type="event_type_type" default="TRACEPOINT" minOccurs="0" />
137 <xs:element name="name" type="name_type" minOccurs="0" />
138 <xs:element name="loglevel_type" type="loglevel_type" default="ALL" minOccurs="0" />
139 <xs:element name="loglevel" type="loglevel_string_type" default="" minOccurs="0" />
140 <xs:element name="enabled" type="xs:boolean" default="false" minOccurs="0" />
141 <xs:element name="filter" type="xs:boolean" minOccurs="0" />
142 <xs:element name="exclusion" type="xs:boolean" minOccurs="0" />
143 <xs:element name="attributes" type="event_attributes_type" minOccurs="0" />
144 <xs:element name="event_fields" type="event_fields_type" minOccurs="0" />
148 <!-- Maps to mi_lttng_version struct -->
149 <xs:complexType name="version_type">
151 <xs:element name="name" type="name_type" />
152 <xs:element name="string" type="name_type" />
153 <xs:element name="major" type="uint32_type" />
154 <xs:element name="url" type="xs:string" />
155 <xs:element name="minor" type="uint32_type" />
156 <xs:element name="license" type="xs:string" />
157 <xs:element name="patchLevel" type="uint32_type" />
158 <xs:element name="description" type="xs:string" />
162 <xs:complexType name="event_list_type">
164 <xs:element name="event" type="event_type" minOccurs="0" maxOccurs="unbounded" />
168 <!-- Maps to the lttng_domain_type enum -->
169 <xs:simpleType name="domain_type_type">
170 <xs:restriction base="xs:string">
171 <xs:enumeration value="KERNEL"/>
172 <xs:enumeration value="UST"/>
173 <xs:enumeration value="JUL"/>
177 <!-- Maps to the lttng_buffer_type enum -->
178 <xs:simpleType name="domain_buffer_type">
179 <xs:restriction base="xs:string">
180 <xs:enumeration value="PER_PID"/>
181 <xs:enumeration value="PER_UID"/>
182 <xs:enumeration value="GLOBAL"/>
186 <xs:simpleType name="channel_overwrite_mode_type">
187 <xs:restriction base="xs:string">
188 <xs:enumeration value="DISCARD" />
189 <xs:enumeration value="OVERWRITE" />
193 <!-- Maps to the lttng_event_output enum -->
194 <xs:simpleType name="event_output_type">
195 <xs:restriction base="xs:string">
196 <xs:enumeration value="SPLICE" />
197 <xs:enumeration value="MMAP" />
201 <xs:complexType name="pid_type">
203 <xs:element name="id" type="xs:int"/>
204 <xs:element name="name" type="name_type"/>
205 <xs:element name="events" type="event_list_type" minOccurs="0" />
209 <xs:complexType name="pids_type">
211 <xs:element name="pid" type="pid_type" minOccurs="0" maxOccurs="unbounded" />
215 <!-- Maps to struct lttng_domain and contains channels -->
216 <xs:complexType name="domain_type">
218 <xs:element name="type" type="domain_type_type"/>
219 <xs:element name="buffer_type" type="domain_buffer_type"/>
220 <xs:element name="pids" type="pids_type" minOccurs="0" />
221 <xs:element name="channels" type="channels_type" minOccurs="0" />
222 <xs:element name="events" type="event_list_type" minOccurs="0" />
226 <!-- Maps to struct lttng_channel -->
227 <xs:complexType name="channel_type">
229 <xs:element name="name" type="name_type"/>
230 <xs:element name="enabled" type="xs:boolean" default="true" minOccurs="0"/>
231 <xs:element name="attributes" type="channel_attributes_type" minOccurs="0"/>
232 <xs:element name="events" type="event_list_type"/>
236 <!-- Maps to struct lttng_channel_attr -->
237 <xs:complexType name="channel_attributes_type">
239 <xs:element name="overwrite_mode" type="channel_overwrite_mode_type" default="DISCARD" minOccurs="0"/>
240 <xs:element name="subbuffer_size" type="uint64_type" minOccurs="0"/> <!-- bytes -->
241 <xs:element name="subbuffer_count" type="uint64_type" default="4" minOccurs="0"/>
242 <xs:element name="switch_timer_interval" type="uint32_type" default="0" minOccurs="0"/> <!-- usec -->
243 <xs:element name="read_timer_interval" type="uint32_type"/> <!-- usec -->
244 <xs:element name="output_type" type="event_output_type"/>
245 <xs:element name="tracefile_size" type="uint64_type" default="0" minOccurs="0"/> <!-- bytes -->
246 <xs:element name="tracefile_count" type="uint64_type" default="0" minOccurs="0"/>
247 <xs:element name="live_timer_interval" type="uint32_type" default="0" minOccurs="0"/> <!-- usec -->
251 <xs:complexType name="channels_type">
253 <xs:element name="channel" type="channel_type" minOccurs="0" maxOccurs="unbounded" />
257 <xs:complexType name="session_type">
259 <xs:element name="name" type="name_type" />
260 <xs:element name="path" type="name_type" />
261 <xs:element name="enabled" type="xs:boolean" default="false" />
262 <xs:element name="snapshot_mode" type="uint32_type" />
263 <xs:element name="live_timer_interval" type="uint32_type" />
264 <xs:element name="channels" type="channels_type" minOccurs="0" />
265 <xs:element name="domains" type="domains_type" minOccurs="0" />
269 <xs:complexType name="event_field_type">
271 <xs:element name="name" type="name_type" />
272 <xs:element name="type" type="event_field_type_type"/>
273 <xs:element name="nowrite" type="xs:int"/>
278 <xs:complexType name="domains_type">
280 <xs:element name="domain" type="domain_type" minOccurs="0" maxOccurs="unbounded" />
284 <xs:complexType name="sessions_type">
286 <xs:element name="session" type="session_type" minOccurs="0" maxOccurs="unbounded" />
290 <xs:complexType name="event_fields_type">
292 <xs:element name="event_field" type="event_field_type" minOccurs="0" maxOccurs="unbounded" />
296 <xs:complexType name="output_type">
298 <xs:element name="domains" type="domains_type" minOccurs="0" />
299 <xs:element name="sessions" type="sessions_type" minOccurs="0" />
300 <xs:element name="version" type="version_type" minOccurs="0" />
304 <!-- Maps to the mi_lttng commands -->
305 <xs:simpleType name="command_string_type">
306 <xs:restriction base="xs:string">
307 <xs:enumeration value="list" />
308 <xs:enumeration value="version" />
312 <xs:element name="command">
315 <xs:element name="name" type="command_string_type" maxOccurs="1" />
316 <xs:element name="output" type="output_type" maxOccurs="1" />