lttng: Add snapshot support - LTTng Tools v2.3
[deliverable/tracecompass.git] / org.eclipse.linuxtools.lttng2.ui / src / org / eclipse / linuxtools / internal / lttng2 / ui / views / control / service / LTTngControlServiceConstants.java
index bc3216fa2d17053d10a486fcf7ca2702773bd2b2..7e844f1fb5beb7a65dadbd353997f3e8f7d7ced4 100644 (file)
@@ -9,6 +9,7 @@
  * Contributors:
  *   Bernd Hufmann - Initial API and implementation
  *   Bernd Hufmann - Updated for support of LTTng Tools 2.1
+ *   Simon Delisle - Updated for support of LTTng Tools 2.2
  **********************************************************************/
 package org.eclipse.linuxtools.internal.lttng2.ui.views.control.service;
 
@@ -31,6 +32,14 @@ public interface LTTngControlServiceConstants {
      */
     static final Pattern VERSION_2_PATTERN = Pattern.compile("(2\\.\\d+\\.\\d+).*"); //$NON-NLS-1$
 
+    // ------------------------------------------------------------------------
+    // Constants
+    // ------------------------------------------------------------------------
+    /**
+     * Unused value
+     */
+    static final int UNUSED_VALUE = -1;
+
     // ------------------------------------------------------------------------
     // Command constants
     // ------------------------------------------------------------------------
@@ -94,6 +103,14 @@ public interface LTTngControlServiceConstants {
      * Command to execute calibrate command to quantify LTTng overhead
      */
     static final String COMMAND_CALIBRATE = " calibrate "; //$NON-NLS-1$
+    /**
+     * Command to execute calibrate command to quantify LTTng overhead
+     */
+    static final String COMMAND_LIST_SNAPSHOT_OUTPUT = " snapshot list-output "; //$NON-NLS-1$
+    /**
+     * Command to execute calibrate command to quantify LTTng overhead
+     */
+    static final String COMMAND_RECORD_SNAPSHOT = " snapshot record "; //$NON-NLS-1$
 
     // ------------------------------------------------------------------------
     // Command line options constants
@@ -118,6 +135,10 @@ public interface LTTngControlServiceConstants {
      * Command line option for output path.
      */
     static final String OPTION_OUTPUT_PATH = " -o "; //$NON-NLS-1$
+    /**
+     * Command line option for output path.
+     */
+    static final String OPTION_SNAPSHOT = " --snapshot "; //$NON-NLS-1$
     /**
      * Command line option for kernel tracer.
      */
@@ -214,6 +235,22 @@ public interface LTTngControlServiceConstants {
      * Command line option for configuring the streaming data URL.
      */
     static final String OPTION_DATA_URL = " -D "; //$NON-NLS-1$
+    /**
+     * Command line option for per UID buffers
+     */
+    static final String OPTION_PER_UID_BUFFERS = " --buffers-uid "; //$NON-NLS-1$
+    /**
+     * Command line option for per PID buffers
+     */
+    static final String OPTION_PER_PID_BUFFERS = " --buffers-pid "; //$NON-NLS-1$
+    /**
+     * Command line option for maximum size of trace files
+     */
+    static final String OPTION_MAX_SIZE_TRACE_FILES = " -C "; //$NON-NLS-1$
+    /**
+     * Command line option for maximum trace files
+     */
+    static final String OPTION_MAX_TRACE_FILES = " -W "; //$NON-NLS-1$
 
     // ------------------------------------------------------------------------
     // Parsing constants
@@ -229,11 +266,15 @@ public interface LTTngControlServiceConstants {
     /**
      * Pattern to match for session information (lttng list)
      */
-    static final Pattern SESSION_PATTERN = Pattern.compile("\\s+(\\d+)\\)\\s+(.*)\\s+\\((.*)\\)\\s+\\[(active|inactive)\\].*"); //$NON-NLS-1$
+    static final Pattern SESSION_PATTERN = Pattern.compile("\\s+(\\d+)\\)\\s+(.*)\\s+\\((.*)\\)\\s+\\[(active|inactive).*\\].*"); //$NON-NLS-1$
     /**
      * Pattern to match for session information (lttng list <session>)
      */
     static final Pattern TRACE_SESSION_PATTERN = Pattern.compile("\\s*Tracing\\s+session\\s+(.*)\\:\\s+\\[(active|inactive)\\].*"); //$NON-NLS-1$
+    /**
+     * Pattern to match for snapshot session information (lttng list <session>)
+     */
+    static final Pattern TRACE_SNAPSHOT_SESSION_PATTERN = Pattern.compile("\\s*Tracing\\s+session\\s+(.*)\\:\\s+\\[(active|inactive)\\s*snapshot\\].*"); //$NON-NLS-1$
     /**
      * Pattern to match for session path information (lttng list <session>)
      */
@@ -242,7 +283,7 @@ public interface LTTngControlServiceConstants {
      * Pattern to match session path for network tracing (lttng list <session>)
      * Note: file for protocol is not considered as network trace since local consumer will be used.
      */
-    static final Pattern TRACE_NETWORK_PATH_PATTERN = Pattern.compile("\\s*Trace\\s+path\\:\\s+(net|net6|tcp|tcp6)\\:\\/\\/(.*)(\\:(\\d*)\\/(.*)\\[data\\:\\s+(\\d*)\\]){0,1}"); //$NON-NLS-1$
+    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$
     /**
      * Sub-pattern to pattern TRACE_NETWORK_PATH_PATTERN to match file protocol
      */
@@ -263,6 +304,10 @@ public interface LTTngControlServiceConstants {
      * Pattern to match for matching warning about no UST channel
      */
     static final Pattern DOMAIN_NO_UST_CHANNEL_PATTERN = Pattern.compile("\\s*Error\\:\\s+UST\\s+channel\\s+not\\s+found.*"); //$NON-NLS-1$
+    /**
+     * Pattern to match for buffer type (lttng list <session>)
+     */
+    static final Pattern BUFFER_TYPE_PATTERN = Pattern.compile("\\s*Buffer\\s+type\\:.*"); //$NON-NLS-1$
     /**
      * Pattern to match for channels section (lttng list <session>)
      */
@@ -363,4 +408,14 @@ public interface LTTngControlServiceConstants {
      * Pattern to match error line if no ust tracer is available or installed.
      */
     static final Pattern LIST_UST_NO_UST_PROVIDER_PATTERN = Pattern.compile(".*Unable\\s*to\\s*list\\s*UST\\s*event.*"); //$NON-NLS-1$;
+    /**
+     * Pattern to match for list snapshot information (lttng snapshot list-output)
+     */
+    static final Pattern LIST_SNAPSHOT_OUTPUT_PATTERN = Pattern.compile("\\s+\\[(\\d+)\\]\\s+(.*)\\:\\s+(.*)"); //$NON-NLS-1$
+    /**
+     * Pattern to match snapshot path for network tracing (lttng list <session>)
+     * Note: file for protocol is not considered as network trace since local consumer will be used.
+     */
+    static final Pattern SNAPSHOT_NETWORK_PATH_PATTERN = Pattern.compile("(net|net4|net6|tcp|tcp6)\\:\\/\\/(.*)(\\:(\\d*)\\/(.*)\\[data\\:\\s+(\\d*)\\]){0,1}"); //$NON-NLS-1$
+
 }
This page took 0.024922 seconds and 5 git commands to generate.