Commit | Line | Data |
---|---|---|
276c17e7 | 1 | /********************************************************************** |
81d5dc3a | 2 | * Copyright (c) 2012, 2014 Ericsson |
cfdb727a | 3 | * |
276c17e7 BH |
4 | * All rights reserved. This program and the accompanying materials are |
5 | * made available under the terms of the Eclipse Public License v1.0 which | |
6 | * accompanies this distribution, and is available at | |
7 | * http://www.eclipse.org/legal/epl-v10.html | |
cfdb727a AM |
8 | * |
9 | * Contributors: | |
276c17e7 | 10 | * Bernd Hufmann - Initial API and implementation |
ba3a9bd2 | 11 | * Bernd Hufmann - Updated for support of LTTng Tools 2.1 |
e799e5f3 | 12 | * Simon Delisle - Updated for support of LTTng Tools 2.2 |
81d5dc3a | 13 | * Marc-Andre Laperle - Support for creating a live session |
276c17e7 | 14 | **********************************************************************/ |
8e8c0226 | 15 | package org.eclipse.linuxtools.internal.lttng2.control.ui.views.service; |
276c17e7 BH |
16 | |
17 | import java.util.regex.Pattern; | |
18 | ||
19 | /** | |
276c17e7 BH |
20 | * <p> |
21 | * Constants for LTTng Control Service. | |
22 | * </p> | |
cfdb727a | 23 | * |
dbd4432d | 24 | * @author Bernd Hufmann |
276c17e7 | 25 | */ |
046b6849 | 26 | public interface LTTngControlServiceConstants { |
276c17e7 BH |
27 | |
28 | // ------------------------------------------------------------------------ | |
29 | // Version constants | |
30 | // ------------------------------------------------------------------------ | |
cfdb727a | 31 | /** |
cfe737e4 | 32 | * Pattern to match the LTTng toolchain version 2.x.y. |
cfdb727a | 33 | */ |
046b6849 | 34 | static final Pattern VERSION_2_PATTERN = Pattern.compile("(2\\.\\d+\\.\\d+).*"); //$NON-NLS-1$ |
276c17e7 | 35 | |
e799e5f3 SD |
36 | // ------------------------------------------------------------------------ |
37 | // Constants | |
38 | // ------------------------------------------------------------------------ | |
39 | /** | |
40 | * Unused value | |
41 | */ | |
42 | static final int UNUSED_VALUE = -1; | |
43 | ||
276c17e7 BH |
44 | // ------------------------------------------------------------------------ |
45 | // Command constants | |
46 | // ------------------------------------------------------------------------ | |
47 | /** | |
48 | * The lttng tools command. | |
49 | */ | |
046b6849 | 50 | static final String CONTROL_COMMAND = "lttng"; //$NON-NLS-1$ |
276c17e7 BH |
51 | /** |
52 | * Command: lttng version. | |
53 | */ | |
046b6849 | 54 | static final String COMMAND_VERSION = " version "; //$NON-NLS-1$ |
276c17e7 BH |
55 | /** |
56 | * Command: lttng list. | |
57 | */ | |
046b6849 | 58 | static final String COMMAND_LIST = " list "; //$NON-NLS-1$ |
276c17e7 BH |
59 | /** |
60 | * Command to list kernel tracer information. | |
61 | */ | |
046b6849 | 62 | static final String COMMAND_LIST_KERNEL = COMMAND_LIST + "-k"; //$NON-NLS-1$ |
276c17e7 BH |
63 | /** |
64 | * Command to list user space trace information. | |
65 | */ | |
046b6849 | 66 | static final String COMMAND_LIST_UST = COMMAND_LIST + "-u"; //$NON-NLS-1$ |
276c17e7 | 67 | /** |
cfdb727a | 68 | * Command to create a session. |
276c17e7 | 69 | */ |
046b6849 | 70 | static final String COMMAND_CREATE_SESSION = " create "; //$NON-NLS-1$ |
276c17e7 | 71 | /** |
cfdb727a | 72 | * Command to destroy a session. |
276c17e7 | 73 | */ |
046b6849 | 74 | static final String COMMAND_DESTROY_SESSION = " destroy "; //$NON-NLS-1$ |
276c17e7 | 75 | /** |
cfdb727a | 76 | * Command to destroy a session. |
276c17e7 | 77 | */ |
046b6849 | 78 | static final String COMMAND_START_SESSION = " start "; //$NON-NLS-1$ |
276c17e7 | 79 | /** |
cfdb727a | 80 | * Command to destroy a session. |
276c17e7 | 81 | */ |
046b6849 | 82 | static final String COMMAND_STOP_SESSION = " stop "; //$NON-NLS-1$ |
276c17e7 | 83 | /** |
cfdb727a | 84 | * Command to enable a channel. |
276c17e7 | 85 | */ |
046b6849 | 86 | static final String COMMAND_ENABLE_CHANNEL = " enable-channel "; //$NON-NLS-1$ |
276c17e7 | 87 | /** |
cfdb727a | 88 | * Command to disable a channel. |
276c17e7 | 89 | */ |
046b6849 | 90 | static final String COMMAND_DISABLE_CHANNEL = " disable-channel "; //$NON-NLS-1$ |
276c17e7 | 91 | /** |
cfdb727a | 92 | * Command to enable a event. |
276c17e7 | 93 | */ |
046b6849 | 94 | static final String COMMAND_ENABLE_EVENT = " enable-event "; //$NON-NLS-1$ |
276c17e7 | 95 | /** |
cfdb727a | 96 | * Command to disable a event. |
276c17e7 | 97 | */ |
046b6849 | 98 | static final String COMMAND_DISABLE_EVENT = " disable-event "; //$NON-NLS-1$ |
276c17e7 BH |
99 | /** |
100 | * Command to add a context to channels and/or events | |
101 | */ | |
046b6849 | 102 | static final String COMMAND_ADD_CONTEXT = " add-context "; //$NON-NLS-1$ |
276c17e7 BH |
103 | /** |
104 | * Command to execute calibrate command to quantify LTTng overhead | |
105 | */ | |
046b6849 | 106 | static final String COMMAND_CALIBRATE = " calibrate "; //$NON-NLS-1$ |
589d0d33 BH |
107 | /** |
108 | * Command to execute calibrate command to quantify LTTng overhead | |
109 | */ | |
110 | static final String COMMAND_LIST_SNAPSHOT_OUTPUT = " snapshot list-output "; //$NON-NLS-1$ | |
111 | /** | |
112 | * Command to execute calibrate command to quantify LTTng overhead | |
113 | */ | |
114 | static final String COMMAND_RECORD_SNAPSHOT = " snapshot record "; //$NON-NLS-1$ | |
276c17e7 BH |
115 | |
116 | // ------------------------------------------------------------------------ | |
117 | // Command line options constants | |
118 | // ------------------------------------------------------------------------ | |
119 | /** | |
120 | * Command line option to add tracing group of user. | |
121 | */ | |
046b6849 | 122 | static final String OPTION_TRACING_GROUP = " -g "; //$NON-NLS-1$ |
276c17e7 BH |
123 | /** |
124 | * Command line option for verbose output. | |
125 | */ | |
046b6849 | 126 | static final String OPTION_VERBOSE = " -v "; //$NON-NLS-1$ |
276c17e7 BH |
127 | /** |
128 | * Command line option for verbose output. | |
129 | */ | |
046b6849 | 130 | static final String OPTION_VERY_VERBOSE = " -vv "; //$NON-NLS-1$ |
276c17e7 BH |
131 | /** |
132 | * Command line option for verbose output. | |
133 | */ | |
046b6849 | 134 | static final String OPTION_VERY_VERY_VERBOSE = " -vvv "; //$NON-NLS-1$ |
276c17e7 BH |
135 | /** |
136 | * Command line option for output path. | |
137 | */ | |
046b6849 | 138 | static final String OPTION_OUTPUT_PATH = " -o "; //$NON-NLS-1$ |
589d0d33 BH |
139 | /** |
140 | * Command line option for output path. | |
141 | */ | |
142 | static final String OPTION_SNAPSHOT = " --snapshot "; //$NON-NLS-1$ | |
81d5dc3a MAL |
143 | /** |
144 | * Command line option for live | |
145 | */ | |
146 | static final String OPTION_LIVE = " --live "; //$NON-NLS-1$ | |
276c17e7 BH |
147 | /** |
148 | * Command line option for kernel tracer. | |
149 | */ | |
046b6849 | 150 | static final String OPTION_KERNEL = " -k "; //$NON-NLS-1$ |
276c17e7 BH |
151 | /** |
152 | * Command line option for UST tracer. | |
153 | */ | |
046b6849 | 154 | static final String OPTION_UST = " -u "; //$NON-NLS-1$ |
276c17e7 BH |
155 | /** |
156 | * Command line option for specifying a session. | |
157 | */ | |
046b6849 | 158 | static final String OPTION_SESSION = " -s "; //$NON-NLS-1$ |
276c17e7 BH |
159 | /** |
160 | * Command line option for specifying a channel. | |
161 | */ | |
046b6849 | 162 | static final String OPTION_CHANNEL = " -c "; //$NON-NLS-1$ |
276c17e7 BH |
163 | /** |
164 | * Command line option for specifying a event. | |
165 | */ | |
046b6849 | 166 | static final String OPTION_EVENT = " -e "; //$NON-NLS-1$ |
276c17e7 BH |
167 | /** |
168 | * Command line option for specifying all events. | |
169 | */ | |
046b6849 | 170 | static final String OPTION_ALL = " -a "; //$NON-NLS-1$ |
276c17e7 BH |
171 | /** |
172 | * Command line option for specifying a context. | |
173 | */ | |
046b6849 | 174 | static final String OPTION_CONTEXT_TYPE = " -t "; //$NON-NLS-1$ |
276c17e7 BH |
175 | /** |
176 | * Command line option for specifying tracepoint events. | |
177 | */ | |
046b6849 | 178 | static final String OPTION_TRACEPOINT = " --tracepoint "; //$NON-NLS-1$ |
276c17e7 BH |
179 | /** |
180 | * Command line option for specifying syscall events. | |
181 | */ | |
046b6849 | 182 | static final String OPTION_SYSCALL = " --syscall "; //$NON-NLS-1$ |
276c17e7 BH |
183 | /** |
184 | * Command line option for specifying a dynamic probe. | |
185 | */ | |
046b6849 | 186 | static final String OPTION_PROBE = " --probe "; //$NON-NLS-1$ |
276c17e7 BH |
187 | /** |
188 | * Command line option for specifying a dynamic function entry/return probe. | |
189 | */ | |
046b6849 | 190 | static final String OPTION_FUNCTION_PROBE = " --function "; //$NON-NLS-1$ |
276c17e7 BH |
191 | /** |
192 | * Command line option for specifying a log level range. | |
193 | */ | |
046b6849 | 194 | static final String OPTION_LOGLEVEL = " --loglevel "; //$NON-NLS-1$ |
276c17e7 BH |
195 | /** |
196 | * Command line option for specifying a specific log level. | |
197 | */ | |
046b6849 | 198 | static final String OPTION_LOGLEVEL_ONLY = " --loglevel-only "; //$NON-NLS-1$ |
276c17e7 BH |
199 | /** |
200 | * Optional command line option for configuring a channel's overwrite mode. | |
201 | */ | |
046b6849 | 202 | static final String OPTION_OVERWRITE = " --overwrite "; //$NON-NLS-1$ |
276c17e7 BH |
203 | /** |
204 | * Optional command line option for configuring a channel's number of sub buffers. | |
205 | */ | |
046b6849 | 206 | static final String OPTION_NUM_SUB_BUFFERS = " --num-subbuf "; //$NON-NLS-1$ |
276c17e7 BH |
207 | /** |
208 | * Optional command line option for configuring a channel's sub buffer size. | |
209 | */ | |
046b6849 | 210 | static final String OPTION_SUB_BUFFER_SIZE = " --subbuf-size "; //$NON-NLS-1$ |
276c17e7 BH |
211 | /** |
212 | * Optional command line option for configuring a channel's switch timer interval. | |
213 | */ | |
046b6849 | 214 | static final String OPTION_SWITCH_TIMER = " --switch-timer "; //$NON-NLS-1$ |
276c17e7 BH |
215 | /** |
216 | * Optional command line option for configuring a channel's read timer interval. | |
217 | */ | |
046b6849 | 218 | static final String OPTION_READ_TIMER = " --read-timer "; //$NON-NLS-1$ |
276c17e7 | 219 | /** |
cfdb727a | 220 | * Command line option for printing the help of a specif command |
276c17e7 | 221 | */ |
046b6849 | 222 | static final String OPTION_HELP = " -h "; //$NON-NLS-1$ |
d4514365 BH |
223 | /** |
224 | * Command line option for listing the fields of UST tracepoints | |
225 | */ | |
046b6849 | 226 | static final String OPTION_FIELDS = " -f "; //$NON-NLS-1$ |
d4514365 BH |
227 | /** |
228 | * Command line option for configuring event's filter | |
229 | */ | |
046b6849 | 230 | static final String OPTION_FILTER = " --filter "; //$NON-NLS-1$ |
f3b33d40 BH |
231 | /** |
232 | * Command line option for configuring the streaming network URL (common for control and data channel). | |
233 | */ | |
046b6849 | 234 | static final String OPTION_NETWORK_URL = " -U "; //$NON-NLS-1$ |
f3b33d40 BH |
235 | /** |
236 | * Command line option for configuring the streaming control URL. | |
237 | */ | |
046b6849 | 238 | static final String OPTION_CONTROL_URL = " -C "; //$NON-NLS-1$ |
f3b33d40 BH |
239 | /** |
240 | * Command line option for configuring the streaming data URL. | |
241 | */ | |
046b6849 | 242 | static final String OPTION_DATA_URL = " -D "; //$NON-NLS-1$ |
e799e5f3 SD |
243 | /** |
244 | * Command line option for per UID buffers | |
245 | */ | |
246 | static final String OPTION_PER_UID_BUFFERS = " --buffers-uid "; //$NON-NLS-1$ | |
83051fc3 BH |
247 | /** |
248 | * Command line option for per PID buffers | |
249 | */ | |
250 | static final String OPTION_PER_PID_BUFFERS = " --buffers-pid "; //$NON-NLS-1$ | |
e799e5f3 SD |
251 | /** |
252 | * Command line option for maximum size of trace files | |
253 | */ | |
254 | static final String OPTION_MAX_SIZE_TRACE_FILES = " -C "; //$NON-NLS-1$ | |
255 | /** | |
256 | * Command line option for maximum trace files | |
257 | */ | |
258 | static final String OPTION_MAX_TRACE_FILES = " -W "; //$NON-NLS-1$ | |
276c17e7 BH |
259 | |
260 | // ------------------------------------------------------------------------ | |
261 | // Parsing constants | |
262 | // ------------------------------------------------------------------------ | |
263 | /** | |
264 | * Pattern to match the version. | |
265 | */ | |
046b6849 | 266 | static final Pattern VERSION_PATTERN = Pattern.compile(".*lttng\\s+version\\s+(\\d+\\.\\d+\\.\\d+).*"); //$NON-NLS-1$ |
276c17e7 BH |
267 | /** |
268 | * Pattern to match for error output | |
269 | */ | |
046b6849 | 270 | static final Pattern ERROR_PATTERN = Pattern.compile("\\s*Error\\:.*"); //$NON-NLS-1$ |
276c17e7 BH |
271 | /** |
272 | * Pattern to match for session information (lttng list) | |
273 | */ | |
589d0d33 | 274 | static final Pattern SESSION_PATTERN = Pattern.compile("\\s+(\\d+)\\)\\s+(.*)\\s+\\((.*)\\)\\s+\\[(active|inactive).*\\].*"); //$NON-NLS-1$ |
276c17e7 BH |
275 | /** |
276 | * Pattern to match for session information (lttng list <session>) | |
277 | */ | |
046b6849 | 278 | static final Pattern TRACE_SESSION_PATTERN = Pattern.compile("\\s*Tracing\\s+session\\s+(.*)\\:\\s+\\[(active|inactive)\\].*"); //$NON-NLS-1$ |
589d0d33 BH |
279 | /** |
280 | * Pattern to match for snapshot session information (lttng list <session>) | |
281 | */ | |
282 | static final Pattern TRACE_SNAPSHOT_SESSION_PATTERN = Pattern.compile("\\s*Tracing\\s+session\\s+(.*)\\:\\s+\\[(active|inactive)\\s*snapshot\\].*"); //$NON-NLS-1$ | |
276c17e7 BH |
283 | /** |
284 | * Pattern to match for session path information (lttng list <session>) | |
285 | */ | |
046b6849 | 286 | static final Pattern TRACE_SESSION_PATH_PATTERN = Pattern.compile("\\s*Trace\\s+path\\:\\s+(.*)"); //$NON-NLS-1$ |
f3b33d40 | 287 | /** |
a30e79fe BH |
288 | * Pattern to match session path for network tracing (lttng list <session>) |
289 | * Note: file for protocol is not considered as network trace since local consumer will be used. | |
f3b33d40 | 290 | */ |
589d0d33 | 291 | static final Pattern TRACE_NETWORK_PATH_PATTERN = Pattern.compile("\\s*Trace\\s+path\\:\\s+(net|net4|net6|tcp|tcp6)\\:\\/\\/(.*)(\\:(\\d*)\\/(.*)\\[data\\:\\s+(\\d*)\\]){0,1}"); //$NON-NLS-1$ |
d128c979 BH |
292 | /** |
293 | * Sub-pattern to pattern TRACE_NETWORK_PATH_PATTERN to match file protocol | |
294 | */ | |
046b6849 | 295 | static final Pattern TRACE_FILE_PROTOCOL_PATTERN = Pattern.compile("(file)\\:\\/\\/(.*)"); //$NON-NLS-1$ |
276c17e7 BH |
296 | /** |
297 | * Pattern to match for kernel domain information (lttng list <session>) | |
298 | */ | |
046b6849 | 299 | static final Pattern DOMAIN_KERNEL_PATTERN = Pattern.compile("=== Domain: Kernel ==="); //$NON-NLS-1$ |
276c17e7 BH |
300 | /** |
301 | * Pattern to match for ust domain information (lttng list <session>) | |
302 | */ | |
046b6849 | 303 | static final Pattern DOMAIN_UST_GLOBAL_PATTERN = Pattern.compile("=== Domain: UST global ==="); //$NON-NLS-1$ |
a30e79fe BH |
304 | /** |
305 | * Pattern to match for matching warning about no kernel channel | |
306 | */ | |
046b6849 | 307 | static final Pattern DOMAIN_NO_KERNEL_CHANNEL_PATTERN = Pattern.compile("\\s*Warning\\:\\s+No kernel\\s+channel.*"); //$NON-NLS-1$ |
a30e79fe BH |
308 | /** |
309 | * Pattern to match for matching warning about no UST channel | |
310 | */ | |
046b6849 | 311 | static final Pattern DOMAIN_NO_UST_CHANNEL_PATTERN = Pattern.compile("\\s*Error\\:\\s+UST\\s+channel\\s+not\\s+found.*"); //$NON-NLS-1$ |
ca8c54b3 SD |
312 | /** |
313 | * Pattern to match for buffer type (lttng list <session>) | |
314 | */ | |
315 | static final Pattern BUFFER_TYPE_PATTERN = Pattern.compile("\\s*Buffer\\s+type\\:.*"); //$NON-NLS-1$ | |
276c17e7 BH |
316 | /** |
317 | * Pattern to match for channels section (lttng list <session>) | |
318 | */ | |
046b6849 | 319 | static final Pattern CHANNELS_SECTION_PATTERN = Pattern.compile("\\s*Channels\\:"); //$NON-NLS-1$ |
276c17e7 BH |
320 | /** |
321 | * Pattern to match for channel information (lttng list <session>) | |
322 | */ | |
046b6849 | 323 | static final Pattern CHANNEL_PATTERN = Pattern.compile("\\s*-\\s+(.*)\\:\\s+\\[(enabled|disabled)\\]"); //$NON-NLS-1$ |
276c17e7 BH |
324 | /** |
325 | * Pattern to match for events section information (lttng list <session>) | |
326 | */ | |
046b6849 | 327 | static final Pattern EVENT_SECTION_PATTERN = Pattern.compile("\\s*Events\\:"); //$NON-NLS-1$ |
276c17e7 BH |
328 | /** |
329 | * Pattern to match for event information (lttng list <session>) | |
330 | */ | |
54f2dcc0 | 331 | static final Pattern EVENT_PATTERN = Pattern.compile("\\s+(.*)\\s+\\(loglevel\\s*(:|<=|==)\\s+(.*)\\s+\\(\\d*\\)\\)\\s+\\(type:\\s+(.*)\\)\\s+\\[(enabled|disabled)\\]\\s*(\\[.*\\]){0,1}.*"); //$NON-NLS-1$ |
276c17e7 BH |
332 | /** |
333 | * Pattern to match a wildcarded event information (lttng list <session>) | |
334 | */ | |
046b6849 | 335 | static final Pattern WILDCARD_EVENT_PATTERN = Pattern.compile("\\s+(.*)\\s+\\(type:\\s+(.*)\\)\\s+\\[(enabled|disabled)\\]\\s*(\\[.*\\]){0,1}.*"); //$NON-NLS-1$ |
276c17e7 BH |
336 | /** |
337 | * Pattern to match a probe address information (lttng list <session>) | |
338 | */ | |
046b6849 | 339 | static final Pattern PROBE_ADDRESS_PATTERN = Pattern.compile("\\s+(addr)\\:\\s+(0x[0-9a-fA-F]{1,8})"); //$NON-NLS-1$ |
276c17e7 BH |
340 | /** |
341 | * Pattern to match a probe OFFSET information (lttng list <session>) | |
342 | */ | |
046b6849 | 343 | static final Pattern PROBE_OFFSET_PATTERN = Pattern.compile("\\s+(offset)\\:\\s+(0x[0-9a-fA-F]{1,8})"); //$NON-NLS-1$ |
276c17e7 BH |
344 | /** |
345 | * Pattern to match a probe SYMBOL information (lttng list <session>) | |
346 | */ | |
046b6849 | 347 | static final Pattern PROBE_SYMBOL_PATTERN = Pattern.compile("\\s+(symbol)\\:\\s+(.+)"); //$NON-NLS-1$ |
276c17e7 BH |
348 | /** |
349 | * Pattern to match for channel (overwite mode) information (lttng list <session>) | |
350 | */ | |
046b6849 | 351 | static final Pattern OVERWRITE_MODE_ATTRIBUTE = Pattern.compile("\\s+overwrite\\s+mode\\:.*"); //$NON-NLS-1$ |
276c17e7 BH |
352 | /** |
353 | * Pattern to match indicating false for overwrite mode | |
354 | */ | |
046b6849 | 355 | static final String OVERWRITE_MODE_ATTRIBUTE_FALSE = "0"; //$NON-NLS-1$ |
276c17e7 BH |
356 | /** |
357 | * Pattern to match for channel (sub-buffer size) information (lttng list <session>) | |
358 | */ | |
046b6849 | 359 | static final Pattern SUBBUFFER_SIZE_ATTRIBUTE = Pattern.compile("\\s+subbufers\\s+size\\:.*"); //$NON-NLS-1$ |
276c17e7 BH |
360 | /** |
361 | * Pattern to match for channel (number of sub-buffers) information (lttng list <session>) | |
362 | */ | |
046b6849 | 363 | static final Pattern NUM_SUBBUFFERS_ATTRIBUTE = Pattern.compile("\\s+number\\s+of\\s+subbufers\\:.*"); //$NON-NLS-1$ |
276c17e7 BH |
364 | /** |
365 | * Pattern to match for channel (switch timer) information (lttng list <session>) | |
366 | */ | |
046b6849 | 367 | static final Pattern SWITCH_TIMER_ATTRIBUTE = Pattern.compile("\\s+switch\\s+timer\\s+interval\\:.*"); //$NON-NLS-1$ |
276c17e7 BH |
368 | /** |
369 | * Pattern to match for channel (read timer) information (lttng list <session>) | |
370 | */ | |
046b6849 | 371 | static final Pattern READ_TIMER_ATTRIBUTE = Pattern.compile("\\s+read\\s+timer\\s+interval\\:.*"); //$NON-NLS-1$ |
276c17e7 BH |
372 | /** |
373 | * Pattern to match for channel (output type) information (lttng list <session>) | |
374 | */ | |
046b6849 | 375 | static final Pattern OUTPUT_ATTRIBUTE = Pattern.compile("\\s+output\\:.*"); //$NON-NLS-1$ |
276c17e7 BH |
376 | /** |
377 | * Pattern to match for provider information (lttng list -k/-u) | |
378 | */ | |
046b6849 | 379 | static final Pattern PROVIDER_EVENT_PATTERN = Pattern.compile("\\s*(.*)\\s+\\(loglevel:\\s+(.*)\\s+\\(\\d*\\)\\)\\s+\\(type:\\s+(.*)\\)"); //$NON-NLS-1$ |
d4514365 BH |
380 | /** |
381 | * Pattern to match event fields | |
382 | */ | |
046b6849 | 383 | static final Pattern EVENT_FIELD_PATTERN = Pattern.compile("\\s*(field:)\\s+(.*)\\s+\\((.*)\\)"); //$NON-NLS-1$ |
276c17e7 BH |
384 | /** |
385 | * Pattern to match for UST provider information (lttng list -u) | |
386 | */ | |
046b6849 | 387 | static final Pattern UST_PROVIDER_PATTERN = Pattern.compile("\\s*PID\\:\\s+(\\d+)\\s+-\\s+Name\\:\\s+(.*)"); //$NON-NLS-1$ |
276c17e7 BH |
388 | /** |
389 | * Pattern to match for session information (lttng create <session name>) | |
390 | */ | |
046b6849 | 391 | static final Pattern CREATE_SESSION_NAME_PATTERN = Pattern.compile(".*Session\\s+(.*)\\s+created\\."); //$NON-NLS-1$ |
276c17e7 BH |
392 | /** |
393 | * Pattern to match for session path information (lttng create <session name>) | |
394 | */ | |
046b6849 | 395 | static final Pattern CREATE_SESSION_PATH_PATTERN = Pattern.compile("\\s*Traces\\s+will\\s+be\\s+written\\s+in\\s+(.*).*"); //$NON-NLS-1$ |
276c17e7 BH |
396 | /** |
397 | * Pattern to match for session command output for "session name not found". | |
398 | */ | |
046b6849 | 399 | static final Pattern SESSION_NOT_FOUND_ERROR_PATTERN = Pattern.compile("\\s*Error:\\s+Session\\s+name\\s+not\\s+found"); //$NON-NLS-1$ |
276c17e7 BH |
400 | /** |
401 | * Pattern to match introduction line of context list. | |
402 | */ | |
046b6849 | 403 | static final Pattern ADD_CONTEXT_HELP_CONTEXTS_INTRO = Pattern.compile("\\s*TYPE can\\s+be\\s+one\\s+of\\s+the\\s+strings\\s+below.*"); //$NON-NLS-1$ |
276c17e7 BH |
404 | /** |
405 | * Pattern to match introduction line of context list. | |
406 | */ | |
046b6849 | 407 | static final Pattern ADD_CONTEXT_HELP_CONTEXTS_END_LINE = Pattern.compile("\\s*Example.*"); //$NON-NLS-1$ |
a07c7629 BH |
408 | /** |
409 | * Pattern to match error line if no kernel tracer is available or installed. | |
410 | */ | |
046b6849 | 411 | static final Pattern LIST_KERNEL_NO_KERNEL_PROVIDER_PATTERN = Pattern.compile("\\s*Error:\\s+Unable\\s+to\\s+list\\s+kernel\\s+events.*"); //$NON-NLS-1$; |
f3e2f354 BH |
412 | /** |
413 | * Pattern to match error line if no ust tracer is available or installed. | |
414 | */ | |
046b6849 | 415 | static final Pattern LIST_UST_NO_UST_PROVIDER_PATTERN = Pattern.compile(".*Unable\\s*to\\s*list\\s*UST\\s*event.*"); //$NON-NLS-1$; |
589d0d33 BH |
416 | /** |
417 | * Pattern to match for list snapshot information (lttng snapshot list-output) | |
418 | */ | |
419 | static final Pattern LIST_SNAPSHOT_OUTPUT_PATTERN = Pattern.compile("\\s+\\[(\\d+)\\]\\s+(.*)\\:\\s+(.*)"); //$NON-NLS-1$ | |
420 | /** | |
421 | * Pattern to match snapshot path for network tracing (lttng list <session>) | |
422 | * Note: file for protocol is not considered as network trace since local consumer will be used. | |
423 | */ | |
424 | static final Pattern SNAPSHOT_NETWORK_PATH_PATTERN = Pattern.compile("(net|net4|net6|tcp|tcp6)\\:\\/\\/(.*)(\\:(\\d*)\\/(.*)\\[data\\:\\s+(\\d*)\\]){0,1}"); //$NON-NLS-1$ | |
425 | ||
276c17e7 | 426 | } |