control: Add enhanced support for loading of sessions
[deliverable/tracecompass.git] / lttng / org.eclipse.tracecompass.lttng2.control.ui / src / org / eclipse / tracecompass / internal / lttng2 / control / ui / views / service / LTTngControlServiceConstants.java
CommitLineData
276c17e7 1/**********************************************************************
ed902a2b 2 * Copyright (c) 2012, 2015 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 **********************************************************************/
9bc60be7 15package org.eclipse.tracecompass.internal.lttng2.control.ui.views.service;
276c17e7 16
364dcfaf
BH
17import static org.eclipse.tracecompass.common.core.NonNullUtils.checkNotNull;
18
276c17e7
BH
19import java.util.regex.Pattern;
20
364dcfaf
BH
21import org.eclipse.jdt.annotation.NonNullByDefault;
22
276c17e7 23/**
276c17e7
BH
24 * <p>
25 * Constants for LTTng Control Service.
26 * </p>
cfdb727a 27 *
dbd4432d 28 * @author Bernd Hufmann
276c17e7 29 */
364dcfaf 30@NonNullByDefault
046b6849 31public interface LTTngControlServiceConstants {
276c17e7
BH
32
33 // ------------------------------------------------------------------------
34 // Version constants
35 // ------------------------------------------------------------------------
cfdb727a 36 /**
cfe737e4 37 * Pattern to match the LTTng toolchain version 2.x.y.
cfdb727a 38 */
364dcfaf 39 Pattern VERSION_2_PATTERN = checkNotNull(Pattern.compile("(2\\.\\d+\\.\\d+).*")); //$NON-NLS-1$
276c17e7 40
e799e5f3
SD
41 // ------------------------------------------------------------------------
42 // Constants
43 // ------------------------------------------------------------------------
44 /**
45 * Unused value
46 */
fe2a6557 47 int UNUSED_VALUE = -1;
0df4af5f
JRJ
48 /**
49 * String representation of numerical true element
50 */
304712fe 51 String TRUE_NUMERICAL = "1"; //$NON-NLS-1$
e799e5f3 52
f4da4c59
BH
53 /** The default directory for session */
54 public static final String DEFAULT_PATH = ".lttng/sessions"; //$NON-NLS-1$
55
0df4af5f
JRJ
56 // ------------------------------------------------------------------------
57 // LTTng Machine Interface constants
58 // ------------------------------------------------------------------------
59
60 /**
61 * Name of the XSD to validate against the xml machine interface
62 * output from LTTng
63 */
304712fe 64 String MI_XSD_FILENAME = "mi_lttng.xsd"; //$NON-NLS-1$
276c17e7
BH
65 // ------------------------------------------------------------------------
66 // Command constants
67 // ------------------------------------------------------------------------
68 /**
69 * The lttng tools command.
70 */
304712fe 71 String CONTROL_COMMAND = "lttng"; //$NON-NLS-1$
0df4af5f
JRJ
72 /**
73 * The lttng tools machine interface command.
74 */
fe2a6557 75 String CONTROL_COMMAND_MI_OPTION = "--mi"; //$NON-NLS-1$
0df4af5f
JRJ
76 /**
77 * The lttng tools XML machine interface command.
78 */
fe2a6557 79 String CONTROL_COMMAND_MI_XML = "xml"; //$NON-NLS-1$
276c17e7
BH
80 /**
81 * Command: lttng version.
82 */
fe2a6557 83 String COMMAND_VERSION = "version"; //$NON-NLS-1$
276c17e7
BH
84 /**
85 * Command: lttng list.
86 */
fe2a6557 87 String COMMAND_LIST = "list"; //$NON-NLS-1$
276c17e7 88 /**
cfdb727a 89 * Command to create a session.
276c17e7 90 */
fe2a6557 91 String COMMAND_CREATE_SESSION = "create"; //$NON-NLS-1$
276c17e7 92 /**
cfdb727a 93 * Command to destroy a session.
276c17e7 94 */
fe2a6557 95 String COMMAND_DESTROY_SESSION = "destroy"; //$NON-NLS-1$
276c17e7 96 /**
cfdb727a 97 * Command to destroy a session.
276c17e7 98 */
fe2a6557 99 String COMMAND_START_SESSION = "start"; //$NON-NLS-1$
ad9972cc
PJPG
100 /**
101 * Command to load a session.
102 */
103 String COMMAND_LOAD_SESSION = "load"; //$NON-NLS-1$
276c17e7 104 /**
cfdb727a 105 * Command to destroy a session.
276c17e7 106 */
fe2a6557 107 String COMMAND_STOP_SESSION = "stop"; //$NON-NLS-1$
276c17e7 108 /**
cfdb727a 109 * Command to enable a channel.
276c17e7 110 */
fe2a6557 111 String COMMAND_ENABLE_CHANNEL = "enable-channel"; //$NON-NLS-1$
276c17e7 112 /**
cfdb727a 113 * Command to disable a channel.
276c17e7 114 */
fe2a6557 115 String COMMAND_DISABLE_CHANNEL = "disable-channel"; //$NON-NLS-1$
276c17e7 116 /**
cfdb727a 117 * Command to enable a event.
276c17e7 118 */
fe2a6557 119 String COMMAND_ENABLE_EVENT = "enable-event"; //$NON-NLS-1$
276c17e7 120 /**
cfdb727a 121 * Command to disable a event.
276c17e7 122 */
fe2a6557 123 String COMMAND_DISABLE_EVENT = "disable-event"; //$NON-NLS-1$
276c17e7
BH
124 /**
125 * Command to add a context to channels and/or events
126 */
fe2a6557 127 String COMMAND_ADD_CONTEXT = "add-context"; //$NON-NLS-1$
276c17e7
BH
128 /**
129 * Command to execute calibrate command to quantify LTTng overhead
130 */
fe2a6557 131 String COMMAND_CALIBRATE = "calibrate"; //$NON-NLS-1$
589d0d33 132 /**
774a7993 133 * Command to execute sub-command snapshot
589d0d33 134 */
fe2a6557 135 String COMMAND_SNAPSHOT = "snapshot"; //$NON-NLS-1$
589d0d33 136 /**
774a7993
BH
137 * Command to list the snapshot outputs
138 */
fe2a6557 139 String COMMAND_LIST_SNAPSHOT_OUTPUT = "list-output"; //$NON-NLS-1$
774a7993
BH
140 /**
141 * Command to record a snapshot
589d0d33 142 */
fe2a6557 143 String COMMAND_RECORD_SNAPSHOT = "record"; //$NON-NLS-1$
276c17e7
BH
144
145 // ------------------------------------------------------------------------
146 // Command line options constants
147 // ------------------------------------------------------------------------
148 /**
149 * Command line option to add tracing group of user.
150 */
fe2a6557 151 String OPTION_TRACING_GROUP = "-g"; //$NON-NLS-1$
276c17e7
BH
152 /**
153 * Command line option for verbose output.
154 */
fe2a6557 155 String OPTION_VERBOSE = "-v"; //$NON-NLS-1$
276c17e7
BH
156 /**
157 * Command line option for verbose output.
158 */
fe2a6557 159 String OPTION_VERY_VERBOSE = "-vv"; //$NON-NLS-1$
276c17e7
BH
160 /**
161 * Command line option for verbose output.
162 */
fe2a6557 163 String OPTION_VERY_VERY_VERBOSE = "-vvv"; //$NON-NLS-1$
276c17e7
BH
164 /**
165 * Command line option for output path.
166 */
fe2a6557 167 String OPTION_OUTPUT_PATH = "-o"; //$NON-NLS-1$
589d0d33
BH
168 /**
169 * Command line option for output path.
170 */
fe2a6557 171 String OPTION_SNAPSHOT = "--snapshot"; //$NON-NLS-1$
81d5dc3a
MAL
172 /**
173 * Command line option for live
174 */
fe2a6557 175 String OPTION_LIVE = "--live"; //$NON-NLS-1$
276c17e7
BH
176 /**
177 * Command line option for kernel tracer.
178 */
fe2a6557 179 String OPTION_KERNEL = "-k"; //$NON-NLS-1$
276c17e7
BH
180 /**
181 * Command line option for UST tracer.
182 */
fe2a6557 183 String OPTION_UST = "-u"; //$NON-NLS-1$
276c17e7
BH
184 /**
185 * Command line option for specifying a session.
186 */
fe2a6557 187 String OPTION_SESSION = "-s"; //$NON-NLS-1$
276c17e7
BH
188 /**
189 * Command line option for specifying a channel.
190 */
fe2a6557 191 String OPTION_CHANNEL = "-c"; //$NON-NLS-1$
276c17e7
BH
192 /**
193 * Command line option for specifying a event.
194 */
fe2a6557 195 String OPTION_EVENT = "-e"; //$NON-NLS-1$
276c17e7
BH
196 /**
197 * Command line option for specifying all events.
198 */
fe2a6557 199 String OPTION_ALL = "-a"; //$NON-NLS-1$
276c17e7
BH
200 /**
201 * Command line option for specifying a context.
202 */
fe2a6557 203 String OPTION_CONTEXT_TYPE = "-t"; //$NON-NLS-1$
276c17e7
BH
204 /**
205 * Command line option for specifying tracepoint events.
206 */
fe2a6557 207 String OPTION_TRACEPOINT = "--tracepoint"; //$NON-NLS-1$
276c17e7
BH
208 /**
209 * Command line option for specifying syscall events.
210 */
fe2a6557 211 String OPTION_SYSCALL = "--syscall"; //$NON-NLS-1$
276c17e7
BH
212 /**
213 * Command line option for specifying a dynamic probe.
214 */
fe2a6557 215 String OPTION_PROBE = "--probe"; //$NON-NLS-1$
276c17e7
BH
216 /**
217 * Command line option for specifying a dynamic function entry/return probe.
218 */
fe2a6557 219 String OPTION_FUNCTION_PROBE = "--function"; //$NON-NLS-1$
276c17e7
BH
220 /**
221 * Command line option for specifying a log level range.
222 */
fe2a6557 223 String OPTION_LOGLEVEL = "--loglevel"; //$NON-NLS-1$
276c17e7
BH
224 /**
225 * Command line option for specifying a specific log level.
226 */
fe2a6557 227 String OPTION_LOGLEVEL_ONLY = "--loglevel-only"; //$NON-NLS-1$
276c17e7
BH
228 /**
229 * Optional command line option for configuring a channel's overwrite mode.
230 */
fe2a6557 231 String OPTION_OVERWRITE = "--overwrite"; //$NON-NLS-1$
276c17e7
BH
232 /**
233 * Optional command line option for configuring a channel's number of sub buffers.
234 */
fe2a6557 235 String OPTION_NUM_SUB_BUFFERS = "--num-subbuf"; //$NON-NLS-1$
276c17e7
BH
236 /**
237 * Optional command line option for configuring a channel's sub buffer size.
238 */
fe2a6557 239 String OPTION_SUB_BUFFER_SIZE = "--subbuf-size"; //$NON-NLS-1$
276c17e7
BH
240 /**
241 * Optional command line option for configuring a channel's switch timer interval.
242 */
fe2a6557 243 String OPTION_SWITCH_TIMER = "--switch-timer"; //$NON-NLS-1$
276c17e7
BH
244 /**
245 * Optional command line option for configuring a channel's read timer interval.
246 */
fe2a6557 247 String OPTION_READ_TIMER = "--read-timer"; //$NON-NLS-1$
276c17e7 248 /**
cfdb727a 249 * Command line option for printing the help of a specif command
276c17e7 250 */
fe2a6557 251 String OPTION_HELP = "-h"; //$NON-NLS-1$
d4514365
BH
252 /**
253 * Command line option for listing the fields of UST tracepoints
254 */
fe2a6557 255 String OPTION_FIELDS = "-f"; //$NON-NLS-1$
d4514365
BH
256 /**
257 * Command line option for configuring event's filter
258 */
fe2a6557 259 String OPTION_FILTER = "--filter"; //$NON-NLS-1$
f3b33d40
BH
260 /**
261 * Command line option for configuring the streaming network URL (common for control and data channel).
262 */
fe2a6557 263 String OPTION_NETWORK_URL = "-U"; //$NON-NLS-1$
f3b33d40
BH
264 /**
265 * Command line option for configuring the streaming control URL.
266 */
fe2a6557 267 String OPTION_CONTROL_URL = "-C"; //$NON-NLS-1$
f3b33d40
BH
268 /**
269 * Command line option for configuring the streaming data URL.
270 */
fe2a6557 271 String OPTION_DATA_URL = "-D"; //$NON-NLS-1$
e799e5f3
SD
272 /**
273 * Command line option for per UID buffers
274 */
fe2a6557 275 String OPTION_PER_UID_BUFFERS = "--buffers-uid"; //$NON-NLS-1$
83051fc3
BH
276 /**
277 * Command line option for per PID buffers
278 */
fe2a6557 279 String OPTION_PER_PID_BUFFERS = "--buffers-pid"; //$NON-NLS-1$
e799e5f3
SD
280 /**
281 * Command line option for maximum size of trace files
282 */
fe2a6557 283 String OPTION_MAX_SIZE_TRACE_FILES = "-C"; //$NON-NLS-1$
e799e5f3
SD
284 /**
285 * Command line option for maximum trace files
286 */
fe2a6557 287 String OPTION_MAX_TRACE_FILES = "-W"; //$NON-NLS-1$
f4da4c59
BH
288 /**
289 * Command line option for force overwrite
290 */
291 String OPTION_FORCE = "-f"; //$NON-NLS-1$
292 /**
293 * Command line option for specifying input path
294 */
295 String OPTION_INPUT_PATH = "-i"; //$NON-NLS-1$
276c17e7 296
e5237dc5
BH
297 /**
298 * Maximum live timer interval value
299 */
300 Long MAX_LIVE_TIMER_INTERVAL = 0xFFFFFFFEL;
301
276c17e7
BH
302 // ------------------------------------------------------------------------
303 // Parsing constants
304 // ------------------------------------------------------------------------
305 /**
306 * Pattern to match the version.
307 */
364dcfaf 308 Pattern VERSION_PATTERN = checkNotNull(Pattern.compile(".*lttng\\s+version\\s+.*(\\d+\\.\\d+\\.\\d+).*")); //$NON-NLS-1$
276c17e7
BH
309 /**
310 * Pattern to match for error output
311 */
364dcfaf 312 Pattern ERROR_PATTERN = checkNotNull(Pattern.compile("\\s*Error\\:.*")); //$NON-NLS-1$
276c17e7
BH
313 /**
314 * Pattern to match for session information (lttng list)
315 */
364dcfaf 316 Pattern SESSION_PATTERN = checkNotNull(Pattern.compile("\\s+(\\d+)\\)\\s+(.*)\\s+\\((.*)\\)\\s+\\[(active|inactive).*\\].*")); //$NON-NLS-1$
276c17e7
BH
317 /**
318 * Pattern to match for session information (lttng list <session>)
319 */
364dcfaf 320 Pattern TRACE_SESSION_PATTERN = checkNotNull(Pattern.compile("\\s*Tracing\\s+session\\s+(.*)\\:\\s+\\[(active|inactive)\\].*")); //$NON-NLS-1$
589d0d33
BH
321 /**
322 * Pattern to match for snapshot session information (lttng list <session>)
323 */
364dcfaf 324 Pattern TRACE_SNAPSHOT_SESSION_PATTERN = checkNotNull(Pattern.compile("\\s*Tracing\\s+session\\s+(.*)\\:\\s+\\[(active|inactive)\\s*snapshot\\].*")); //$NON-NLS-1$
276c17e7
BH
325 /**
326 * Pattern to match for session path information (lttng list <session>)
327 */
364dcfaf 328 Pattern TRACE_SESSION_PATH_PATTERN = checkNotNull(Pattern.compile("\\s*Trace\\s+path\\:\\s+(.*)")); //$NON-NLS-1$
f3b33d40 329 /**
a30e79fe
BH
330 * Pattern to match session path for network tracing (lttng list <session>)
331 * Note: file for protocol is not considered as network trace since local consumer will be used.
f3b33d40 332 */
364dcfaf 333 Pattern TRACE_NETWORK_PATH_PATTERN = checkNotNull(Pattern.compile("\\s*Trace\\s+path\\:\\s+(net|net4|net6|tcp|tcp4|tcp6)\\:\\/\\/(.*)(\\:(\\d*)\\/(.*)\\[data\\:\\s+(\\d*)\\]){0,1}")); //$NON-NLS-1$
0df4af5f
JRJ
334 /**
335 * Pattern to match session path for network tracing
336 * Note: file for protocol is not considered as network trace since local consumer will be used.
337 */
364dcfaf 338 Pattern TRACE_NETWORK_PATTERN = checkNotNull(Pattern.compile("\\s*(net|net4|net6|tcp|tcp4|tcp6)\\:\\/\\/(.*)(\\:(\\d*)\\/(.*)\\[data\\:\\s+(\\d*)\\]){0,1}")); //$NON-NLS-1$
d128c979
BH
339 /**
340 * Sub-pattern to pattern TRACE_NETWORK_PATH_PATTERN to match file protocol
341 */
364dcfaf 342 Pattern TRACE_FILE_PROTOCOL_PATTERN = checkNotNull(Pattern.compile("(file)\\:\\/\\/(.*)")); //$NON-NLS-1$
276c17e7
BH
343 /**
344 * Pattern to match for kernel domain information (lttng list <session>)
345 */
364dcfaf 346 Pattern DOMAIN_KERNEL_PATTERN = checkNotNull(Pattern.compile("=== Domain: Kernel ===")); //$NON-NLS-1$
276c17e7
BH
347 /**
348 * Pattern to match for ust domain information (lttng list <session>)
349 */
364dcfaf 350 Pattern DOMAIN_UST_GLOBAL_PATTERN = checkNotNull(Pattern.compile("=== Domain: UST global ===")); //$NON-NLS-1$
a30e79fe
BH
351 /**
352 * Pattern to match for matching warning about no kernel channel
353 */
364dcfaf 354 Pattern DOMAIN_NO_KERNEL_CHANNEL_PATTERN = checkNotNull(Pattern.compile("\\s*Warning\\:\\s+No kernel\\s+channel.*")); //$NON-NLS-1$
a30e79fe
BH
355 /**
356 * Pattern to match for matching warning about no UST channel
357 */
364dcfaf 358 Pattern DOMAIN_NO_UST_CHANNEL_PATTERN = checkNotNull(Pattern.compile("\\s*Error\\:\\s+UST\\s+channel\\s+not\\s+found.*")); //$NON-NLS-1$
ca8c54b3
SD
359 /**
360 * Pattern to match for buffer type (lttng list <session>)
361 */
364dcfaf 362 Pattern BUFFER_TYPE_PATTERN = checkNotNull(Pattern.compile("\\s*Buffer\\s+type\\:.*")); //$NON-NLS-1$
276c17e7
BH
363 /**
364 * Pattern to match for channels section (lttng list <session>)
365 */
364dcfaf 366 Pattern CHANNELS_SECTION_PATTERN = checkNotNull(Pattern.compile("\\s*Channels\\:")); //$NON-NLS-1$
276c17e7
BH
367 /**
368 * Pattern to match for channel information (lttng list <session>)
369 */
364dcfaf 370 Pattern CHANNEL_PATTERN = checkNotNull(Pattern.compile("\\s*-\\s+(.*)\\:\\s+\\[(enabled|disabled)\\]")); //$NON-NLS-1$
276c17e7
BH
371 /**
372 * Pattern to match for events section information (lttng list <session>)
373 */
364dcfaf 374 Pattern EVENT_SECTION_PATTERN = checkNotNull(Pattern.compile("\\s*Events\\:")); //$NON-NLS-1$
276c17e7
BH
375 /**
376 * Pattern to match for event information (lttng list <session>)
377 */
364dcfaf 378 Pattern EVENT_PATTERN = checkNotNull(Pattern.compile("\\s+(.*)\\s+\\(loglevel\\s*(:|<=|==)\\s+(.*)\\s+\\(\\d*\\)\\)\\s+\\(type:\\s+(.*)\\)\\s+\\[(enabled|disabled)\\]\\s*(\\[.*\\]){0,1}.*")); //$NON-NLS-1$
276c17e7
BH
379 /**
380 * Pattern to match a wildcarded event information (lttng list <session>)
381 */
364dcfaf 382 Pattern WILDCARD_EVENT_PATTERN = checkNotNull(Pattern.compile("\\s+(.*)\\s+\\(type:\\s+(.*)\\)\\s+\\[(enabled|disabled)\\]\\s*(\\[.*\\]){0,1}.*")); //$NON-NLS-1$
276c17e7
BH
383 /**
384 * Pattern to match a probe address information (lttng list <session>)
385 */
364dcfaf 386 Pattern PROBE_ADDRESS_PATTERN = checkNotNull(Pattern.compile("\\s+(addr)\\:\\s+(0x[0-9a-fA-F]{1,16})")); //$NON-NLS-1$
276c17e7
BH
387 /**
388 * Pattern to match a probe OFFSET information (lttng list <session>)
389 */
364dcfaf 390 Pattern PROBE_OFFSET_PATTERN = checkNotNull(Pattern.compile("\\s+(offset)\\:\\s+(0x[0-9a-fA-F]{1,16})")); //$NON-NLS-1$
276c17e7
BH
391 /**
392 * Pattern to match a probe SYMBOL information (lttng list <session>)
393 */
364dcfaf 394 Pattern PROBE_SYMBOL_PATTERN = checkNotNull(Pattern.compile("\\s+(symbol)\\:\\s+(.+)")); //$NON-NLS-1$
276c17e7
BH
395 /**
396 * Pattern to match for channel (overwite mode) information (lttng list <session>)
397 */
364dcfaf 398 Pattern OVERWRITE_MODE_ATTRIBUTE = checkNotNull(Pattern.compile("\\s+overwrite\\s+mode\\:.*")); //$NON-NLS-1$
276c17e7
BH
399 /**
400 * Pattern to match indicating false for overwrite mode
401 */
304712fe 402 String OVERWRITE_MODE_ATTRIBUTE_FALSE = "0"; //$NON-NLS-1$
f4401569
JRJ
403 /**
404 * Pattern to match indicating false for overwrite mode in machine interface mode
405 */
304712fe 406 String OVERWRITE_MODE_ATTRIBUTE_FALSE_MI = "DISCARD"; //$NON-NLS-1$
276c17e7
BH
407 /**
408 * Pattern to match for channel (sub-buffer size) information (lttng list <session>)
409 */
364dcfaf 410 Pattern SUBBUFFER_SIZE_ATTRIBUTE = checkNotNull(Pattern.compile("\\s+subbufers\\s+size\\:.*")); //$NON-NLS-1$
276c17e7
BH
411 /**
412 * Pattern to match for channel (number of sub-buffers) information (lttng list <session>)
413 */
364dcfaf 414 Pattern NUM_SUBBUFFERS_ATTRIBUTE = checkNotNull(Pattern.compile("\\s+number\\s+of\\s+subbufers\\:.*")); //$NON-NLS-1$
276c17e7
BH
415 /**
416 * Pattern to match for channel (switch timer) information (lttng list <session>)
417 */
364dcfaf 418 Pattern SWITCH_TIMER_ATTRIBUTE = checkNotNull(Pattern.compile("\\s+switch\\s+timer\\s+interval\\:.*")); //$NON-NLS-1$
276c17e7
BH
419 /**
420 * Pattern to match for channel (read timer) information (lttng list <session>)
421 */
364dcfaf 422 Pattern READ_TIMER_ATTRIBUTE = checkNotNull(Pattern.compile("\\s+read\\s+timer\\s+interval\\:.*")); //$NON-NLS-1$
276c17e7
BH
423 /**
424 * Pattern to match for channel (output type) information (lttng list <session>)
425 */
364dcfaf 426 Pattern OUTPUT_ATTRIBUTE = checkNotNull(Pattern.compile("\\s+output\\:.*")); //$NON-NLS-1$
276c17e7 427 /**
6f40b641
BH
428 * Pattern to match for channel (trace file size) information (lttng list <session>)
429 */
2f4235bb 430 Pattern TRACE_FILE_COUNT_ATTRIBUTE = checkNotNull(Pattern.compile("\\s+trace\\s+file\\s+count\\:.*")); //$NON-NLS-1$
6f40b641
BH
431 /**
432 * Pattern to match for channel (trace file size) information (lttng list <session>)
433 */
2f4235bb 434 Pattern TRACE_FILE_SIZE_ATTRIBUTE = checkNotNull(Pattern.compile("\\s+trace\\s+file\\s+size\\s+\\(bytes\\)\\:.*")); //$NON-NLS-1$
6f40b641 435 /**
276c17e7
BH
436 * Pattern to match for provider information (lttng list -k/-u)
437 */
364dcfaf 438 Pattern PROVIDER_EVENT_PATTERN = checkNotNull(Pattern.compile("\\s*(.*)\\s+\\(loglevel:\\s+(.*)\\s+\\(\\d*\\)\\)\\s+\\(type:\\s+(.*)\\)")); //$NON-NLS-1$
d4514365
BH
439 /**
440 * Pattern to match event fields
441 */
364dcfaf 442 Pattern EVENT_FIELD_PATTERN = checkNotNull(Pattern.compile("\\s*(field:)\\s+(.*)\\s+\\((.*)\\)")); //$NON-NLS-1$
276c17e7
BH
443 /**
444 * Pattern to match for UST provider information (lttng list -u)
445 */
364dcfaf 446 Pattern UST_PROVIDER_PATTERN = checkNotNull(Pattern.compile("\\s*PID\\:\\s+(\\d+)\\s+-\\s+Name\\:\\s+(.*)")); //$NON-NLS-1$
276c17e7
BH
447 /**
448 * Pattern to match for session information (lttng create <session name>)
449 */
364dcfaf 450 Pattern CREATE_SESSION_NAME_PATTERN = checkNotNull(Pattern.compile(".*Session\\s+(.*)\\s+created\\.")); //$NON-NLS-1$
276c17e7
BH
451 /**
452 * Pattern to match for session path information (lttng create <session name>)
453 */
364dcfaf 454 Pattern CREATE_SESSION_PATH_PATTERN = checkNotNull(Pattern.compile("\\s*Traces\\s+will\\s+be\\s+written\\s+in\\s+(.*).*")); //$NON-NLS-1$
276c17e7
BH
455 /**
456 * Pattern to match for session command output for "session name not found".
457 */
364dcfaf 458 Pattern SESSION_NOT_FOUND_ERROR_PATTERN = checkNotNull(Pattern.compile("\\s*Error:\\s+Session\\s+name\\s.*not\\s+found")); //$NON-NLS-1$
276c17e7
BH
459 /**
460 * Pattern to match introduction line of context list.
461 */
364dcfaf 462 Pattern ADD_CONTEXT_HELP_CONTEXTS_INTRO = checkNotNull(Pattern.compile("\\s*TYPE can\\s+be\\s+one\\s+of\\s+the\\s+strings\\s+below.*")); //$NON-NLS-1$
276c17e7
BH
463 /**
464 * Pattern to match introduction line of context list.
465 */
364dcfaf 466 Pattern ADD_CONTEXT_HELP_CONTEXTS_END_LINE = checkNotNull(Pattern.compile("\\s*Example.*")); //$NON-NLS-1$
a07c7629
BH
467 /**
468 * Pattern to match error line if no kernel tracer is available or installed.
469 */
364dcfaf 470 Pattern LIST_KERNEL_NO_KERNEL_PROVIDER_PATTERN = checkNotNull(Pattern.compile("\\s*Error:\\s+Unable\\s+to\\s+list\\s+kernel\\s+events.*")); //$NON-NLS-1$;
f3e2f354
BH
471 /**
472 * Pattern to match error line if no ust tracer is available or installed.
473 */
364dcfaf 474 Pattern LIST_UST_NO_UST_PROVIDER_PATTERN = checkNotNull(Pattern.compile(".*Unable\\s*to\\s*list\\s*UST\\s*event.*")); //$NON-NLS-1$;
589d0d33
BH
475 /**
476 * Pattern to match for list snapshot information (lttng snapshot list-output)
477 */
364dcfaf 478 Pattern LIST_SNAPSHOT_OUTPUT_PATTERN = checkNotNull(Pattern.compile("\\s+\\[(\\d+)\\]\\s+(\\S*)\\:\\s+(\\S*)(.*)")); //$NON-NLS-1$
92fe6900
MAL
479 /**
480 * Pattern to match the live timer interval line of session list.
481 */
364dcfaf 482 Pattern LIST_LIVE_TIMER_INTERVAL_PATTERN = checkNotNull(Pattern.compile("\\s*Live\\stimer\\sinterval\\s\\(usec\\):\\s(\\d+)")); //$NON-NLS-1$
589d0d33
BH
483 /**
484 * Pattern to match snapshot path for network tracing (lttng list <session>)
485 * Note: file for protocol is not considered as network trace since local consumer will be used.
486 */
364dcfaf 487 Pattern SNAPSHOT_NETWORK_PATH_PATTERN = checkNotNull(Pattern.compile("(net|net4|net6|tcp|tcp4|tcp6)\\:\\/\\/(.*)(\\:(\\d*)\\/(.*)\\[data\\:\\s+(\\d*)\\]){0,1}")); //$NON-NLS-1$
589d0d33 488
276c17e7 489}
This page took 0.124454 seconds and 5 git commands to generate.