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