Commit | Line | Data |
---|---|---|
c5e38b74 JR |
1 | <?xml version="1.0" encoding="UTF-8"?> |
2 | <!-- | |
3 | Copyright (c) 2014 - Oliver Cotte <olivier.cotte@polymtl.ca> | |
4 | - Jonathan Rajotte <jonathan.r.julien@gmail.com> | |
5 | ||
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: | |
12 | ||
13 | The above copyright notice and this permission notice shall be included in | |
14 | all copies or substantial portions of the Software. | |
15 | ||
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 | |
22 | THE SOFTWARE. | |
23 | --> | |
24 | <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" | |
25 | elementFormDefault="qualified" version="2.5"> | |
26 | ||
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" /> | |
32 | </xs:restriction> | |
33 | </xs:simpleType> | |
34 | ||
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" /> | |
40 | </xs:restriction> | |
41 | </xs:simpleType> | |
42 | ||
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" /> | |
47 | </xs:restriction> | |
48 | </xs:simpleType> | |
49 | ||
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" /> | |
62 | </xs:restriction> | |
63 | </xs:simpleType> | |
64 | ||
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" /> | |
73 | </xs:restriction> | |
74 | </xs:simpleType> | |
75 | ||
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" /> | |
83 | </xs:restriction> | |
84 | </xs:simpleType> | |
85 | ||
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" /> | |
106 | </xs:restriction> | |
107 | </xs:simpleType> | |
108 | ||
109 | <!-- Maps to the lttng_event_probe_attr struct --> | |
110 | <xs:complexType name="event_probe_attributes_type"> | |
111 | <xs:all> | |
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" /> | |
115 | </xs:all> | |
116 | </xs:complexType> | |
117 | ||
118 | <!-- Maps to the lttng_event_function_attr struct --> | |
119 | <xs:complexType name="event_ftrace_attributes_type"> | |
120 | <xs:all> | |
121 | <xs:element name="symbol_name" type="name_type" /> | |
122 | </xs:all> | |
123 | </xs:complexType> | |
124 | ||
125 | <!-- Maps to per event type configuration --> | |
126 | <xs:complexType name="event_attributes_type"> | |
127 | <xs:choice> | |
128 | <xs:element name="probe_attributes" type="event_probe_attributes_type" /> | |
129 | <xs:element name="function_attributes" type="event_ftrace_attributes_type" /> | |
130 | </xs:choice> | |
131 | </xs:complexType> | |
132 | ||
133 | <!-- Maps to lttng_event struct --> | |
134 | <xs:complexType name="event_type"> | |
135 | <xs:all> | |
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" /> | |
145 | </xs:all> | |
146 | </xs:complexType> | |
147 | ||
148 | <!-- Maps to mi_lttng_version struct --> | |
149 | <xs:complexType name="version_type"> | |
150 | <xs:all> | |
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" /> | |
314d5222 | 156 | <xs:element name="commit" type="xs:string" /> |
c5e38b74 JR |
157 | <xs:element name="license" type="xs:string" /> |
158 | <xs:element name="patchLevel" type="uint32_type" /> | |
159 | <xs:element name="description" type="xs:string" /> | |
160 | </xs:all> | |
161 | </xs:complexType> | |
162 | ||
163 | <xs:complexType name="event_list_type"> | |
164 | <xs:sequence> | |
165 | <xs:element name="event" type="event_type" minOccurs="0" maxOccurs="unbounded" /> | |
166 | </xs:sequence> | |
167 | </xs:complexType> | |
168 | ||
169 | <!-- Maps to the lttng_domain_type enum --> | |
170 | <xs:simpleType name="domain_type_type"> | |
171 | <xs:restriction base="xs:string"> | |
172 | <xs:enumeration value="KERNEL"/> | |
173 | <xs:enumeration value="UST"/> | |
174 | <xs:enumeration value="JUL"/> | |
175 | </xs:restriction> | |
176 | </xs:simpleType> | |
177 | ||
178 | <!-- Maps to the lttng_buffer_type enum --> | |
179 | <xs:simpleType name="domain_buffer_type"> | |
180 | <xs:restriction base="xs:string"> | |
181 | <xs:enumeration value="PER_PID"/> | |
182 | <xs:enumeration value="PER_UID"/> | |
183 | <xs:enumeration value="GLOBAL"/> | |
184 | </xs:restriction> | |
185 | </xs:simpleType> | |
186 | ||
187 | <xs:simpleType name="channel_overwrite_mode_type"> | |
188 | <xs:restriction base="xs:string"> | |
189 | <xs:enumeration value="DISCARD" /> | |
190 | <xs:enumeration value="OVERWRITE" /> | |
191 | </xs:restriction> | |
192 | </xs:simpleType> | |
193 | ||
194 | <!-- Maps to the lttng_event_output enum --> | |
195 | <xs:simpleType name="event_output_type"> | |
196 | <xs:restriction base="xs:string"> | |
197 | <xs:enumeration value="SPLICE" /> | |
198 | <xs:enumeration value="MMAP" /> | |
199 | </xs:restriction> | |
200 | </xs:simpleType> | |
201 | ||
202 | <xs:complexType name="pid_type"> | |
203 | <xs:all> | |
204 | <xs:element name="id" type="xs:int"/> | |
205 | <xs:element name="name" type="name_type"/> | |
206 | <xs:element name="events" type="event_list_type" minOccurs="0" /> | |
207 | </xs:all> | |
208 | </xs:complexType> | |
209 | ||
210 | <xs:complexType name="pids_type"> | |
211 | <xs:sequence> | |
212 | <xs:element name="pid" type="pid_type" minOccurs="0" maxOccurs="unbounded" /> | |
213 | </xs:sequence> | |
214 | </xs:complexType> | |
215 | ||
216 | <!-- Maps to struct lttng_domain and contains channels --> | |
217 | <xs:complexType name="domain_type"> | |
218 | <xs:all> | |
219 | <xs:element name="type" type="domain_type_type"/> | |
220 | <xs:element name="buffer_type" type="domain_buffer_type"/> | |
221 | <xs:element name="pids" type="pids_type" minOccurs="0" /> | |
222 | <xs:element name="channels" type="channels_type" minOccurs="0" /> | |
223 | <xs:element name="events" type="event_list_type" minOccurs="0" /> | |
224 | </xs:all> | |
225 | </xs:complexType> | |
226 | ||
227 | <!-- Maps to struct lttng_channel --> | |
228 | <xs:complexType name="channel_type"> | |
229 | <xs:all> | |
230 | <xs:element name="name" type="name_type"/> | |
231 | <xs:element name="enabled" type="xs:boolean" default="true" minOccurs="0"/> | |
232 | <xs:element name="attributes" type="channel_attributes_type" minOccurs="0"/> | |
233 | <xs:element name="events" type="event_list_type"/> | |
234 | </xs:all> | |
235 | </xs:complexType> | |
236 | ||
237 | <!-- Maps to struct lttng_channel_attr --> | |
238 | <xs:complexType name="channel_attributes_type"> | |
239 | <xs:all> | |
240 | <xs:element name="overwrite_mode" type="channel_overwrite_mode_type" default="DISCARD" minOccurs="0"/> | |
241 | <xs:element name="subbuffer_size" type="uint64_type" minOccurs="0"/> <!-- bytes --> | |
242 | <xs:element name="subbuffer_count" type="uint64_type" default="4" minOccurs="0"/> | |
243 | <xs:element name="switch_timer_interval" type="uint32_type" default="0" minOccurs="0"/> <!-- usec --> | |
244 | <xs:element name="read_timer_interval" type="uint32_type"/> <!-- usec --> | |
245 | <xs:element name="output_type" type="event_output_type"/> | |
246 | <xs:element name="tracefile_size" type="uint64_type" default="0" minOccurs="0"/> <!-- bytes --> | |
247 | <xs:element name="tracefile_count" type="uint64_type" default="0" minOccurs="0"/> | |
248 | <xs:element name="live_timer_interval" type="uint32_type" default="0" minOccurs="0"/> <!-- usec --> | |
249 | </xs:all> | |
250 | </xs:complexType> | |
251 | ||
252 | <xs:complexType name="channels_type"> | |
253 | <xs:sequence> | |
254 | <xs:element name="channel" type="channel_type" minOccurs="0" maxOccurs="unbounded" /> | |
255 | </xs:sequence> | |
256 | </xs:complexType> | |
257 | ||
258 | <xs:complexType name="session_type"> | |
259 | <xs:all> | |
260 | <xs:element name="name" type="name_type" /> | |
261 | <xs:element name="path" type="name_type" /> | |
262 | <xs:element name="enabled" type="xs:boolean" default="false" /> | |
263 | <xs:element name="snapshot_mode" type="uint32_type" /> | |
264 | <xs:element name="live_timer_interval" type="uint32_type" /> | |
265 | <xs:element name="channels" type="channels_type" minOccurs="0" /> | |
266 | <xs:element name="domains" type="domains_type" minOccurs="0" /> | |
267 | </xs:all> | |
268 | </xs:complexType> | |
269 | ||
270 | <xs:complexType name="event_field_type"> | |
271 | <xs:all> | |
272 | <xs:element name="name" type="name_type" /> | |
273 | <xs:element name="type" type="event_field_type_type"/> | |
274 | <xs:element name="nowrite" type="xs:int"/> | |
275 | </xs:all> | |
276 | </xs:complexType> | |
277 | ||
278 | ||
279 | <xs:complexType name="domains_type"> | |
280 | <xs:sequence> | |
281 | <xs:element name="domain" type="domain_type" minOccurs="0" maxOccurs="unbounded" /> | |
282 | </xs:sequence> | |
283 | </xs:complexType> | |
284 | ||
285 | <xs:complexType name="sessions_type"> | |
286 | <xs:sequence> | |
287 | <xs:element name="session" type="session_type" minOccurs="0" maxOccurs="unbounded" /> | |
288 | </xs:sequence> | |
289 | </xs:complexType> | |
290 | ||
291 | <xs:complexType name="event_fields_type"> | |
292 | <xs:sequence> | |
293 | <xs:element name="event_field" type="event_field_type" minOccurs="0" maxOccurs="unbounded" /> | |
294 | </xs:sequence> | |
295 | </xs:complexType> | |
296 | ||
297 | <xs:complexType name="output_type"> | |
298 | <xs:choice> | |
299 | <xs:element name="domains" type="domains_type" minOccurs="0" /> | |
300 | <xs:element name="sessions" type="sessions_type" minOccurs="0" /> | |
301 | <xs:element name="version" type="version_type" minOccurs="0" /> | |
302 | </xs:choice> | |
303 | </xs:complexType> | |
304 | ||
305 | <!-- Maps to the mi_lttng commands --> | |
306 | <xs:simpleType name="command_string_type"> | |
307 | <xs:restriction base="xs:string"> | |
308 | <xs:enumeration value="list" /> | |
309 | <xs:enumeration value="version" /> | |
310 | </xs:restriction> | |
311 | </xs:simpleType> | |
312 | ||
313 | <xs:element name="command"> | |
314 | <xs:complexType> | |
315 | <xs:all> | |
316 | <xs:element name="name" type="command_string_type" maxOccurs="1" /> | |
317 | <xs:element name="output" type="output_type" maxOccurs="1" /> | |
318 | </xs:all> | |
319 | </xs:complexType> | |
320 | </xs:element> | |
321 | </xs:schema> |