/*******************************************************************************
- * Copyright (c) 2012 Ericsson
+ * Copyright (c) 2012, 2013 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
String result = fixture.toString();
// add additional test code here
- assertEquals("[SessionInfo([TraceInfo(Name=sessionName)],State=INACTIVE,Domains=)]", result);
+ assertEquals("[SessionInfo([TraceInfo(Name=sessionName)],State=INACTIVE,isStreamedTrace=false,Domains=)]", result);
}
/**
String result = fSessionInfo1.toString();
// add additional test code here
- assertEquals("[SessionInfo([TraceInfo(Name=session1)],State=ACTIVE,Domains=[DomainInfo([TraceInfo(Name=test1)],Channels=[ChannelInfo([TraceInfo(Name=channel1)],State=DISABLED,OverwriteMode=true,SubBuffersSize=13,NumberOfSubBuffers=12,SwitchTimer=10,ReadTimer=11,output=splice(),Events=[EventInfo([BaseEventInfo([TraceInfo(Name=event1)],type=TRACEPOINT,level=TRACE_DEBUG)],State=ENABLED)])],isKernel=false)])]", result);
+ assertEquals("[SessionInfo([TraceInfo(Name=session1)],State=ACTIVE,isStreamedTrace=false,Domains=[DomainInfo([TraceInfo(Name=test1)],Channels=[ChannelInfo([TraceInfo(Name=channel1)],State=DISABLED,OverwriteMode=true,SubBuffersSize=13,NumberOfSubBuffers=12,SwitchTimer=10,ReadTimer=11,output=splice(),Events=[EventInfo([BaseEventInfo([TraceInfo(Name=event1)],type=TRACEPOINT,level=TRACE_DEBUG)],State=ENABLED)])],isKernel=false)])]", result);
}
// ------------------------------------------------------------------------
output.append(super.toString());
output.append(",State=");
output.append(fState);
+ output.append(",isStreamedTrace=");
+ output.append(fIsStreamedTrace);
output.append(",Domains=");
for (Iterator<IDomainInfo> iterator = fDomains.iterator(); iterator.hasNext();) {
IDomainInfo domain = iterator.next();
@RunWith(Suite.class)
@Suite.SuiteClasses({
TraceControlComponentTest.class,
+ TraceControlCreateSessionTests.class,
TraceControlKernelProviderTests.class,
TraceControlKernelSessionTests.class,
TraceControlPropertiesTest.class,
// Constants
// ------------------------------------------------------------------------
private static final String TEST_STREAM = "CreateSessionTest.cfg";
- private static final String SCEN_SCENARIO_NO_CONSUMER_TEST = "CreateSessionNoConsumer";
- private static final String SCEN_SCENARIO_DISABLE_CONSUMER_TEST = "CreateSessionDisableConsumer";
private static final String SCEN_SCENARIO_FILE_PROTO_TEST = "CreateSessionFileProto";
private static final String SCEN_SCENARIO_CONTROL_DATA_TEST = "CreateSessionControlData";
private static final String SCEN_SCENARIO_NETWORK_TEST = "CreateSessionNetwork";
+ private static final String SCEN_SCENARIO_NETWORK2_TEST = "CreateSessionNetwork2";
// ------------------------------------------------------------------------
// Test data
@Before
public void setUp() throws Exception {
fFacility = TraceControlTestFacility.getInstance();
+ fFacility.init();
fProxy = new TestRemoteSystemProxy();
URL location = FileLocator.find(FrameworkUtil.getBundle(this.getClass()), new Path(TraceControlTestFacility.DIRECTORY + File.separator + TEST_STREAM), null);
File testfile = new File(FileLocator.toFileURL(location).toURI());
TraceControlDialogFactory.getInstance().setCreateSessionDialog(sessionDialogStub);
TraceControlDialogFactory.getInstance().setConfirmDialog(new DestroyConfirmDialogStub());
- // Initialize session handling scenario
- fProxy.setScenario(SCEN_SCENARIO_NO_CONSUMER_TEST);
-
- // ------------------------------------------------------------------------
- // Create session (--no-consumer) and destroy
- // ------------------------------------------------------------------------
- // Initialize session handling scenario
- fProxy.setScenario(SCEN_SCENARIO_NO_CONSUMER_TEST);
- sessionDialogStub.setNoConsumer(true);
- TraceSessionComponent session = fFacility.createSession(groups[1]);
-
- // Verify that session was created
- assertNotNull(session);
- assertEquals("mysession", session.getName());
- assertEquals("", session.getSessionPath());
- assertEquals(TraceSessionState.INACTIVE, session.getSessionState());
- sessionDialogStub.setNoConsumer(false);
-
- fFacility.destroySession(session);
-
- // Verify that no more session components exist
- assertEquals(0, groups[1].getChildren().length);
-
// ------------------------------------------------------------------------
- // Create session (--disable-consumer) and destroy
+ // Create session (--U file://...) and destroy
// ------------------------------------------------------------------------
// Initialize session handling scenario
- fProxy.setScenario(SCEN_SCENARIO_DISABLE_CONSUMER_TEST);
+ fProxy.setScenario(SCEN_SCENARIO_FILE_PROTO_TEST);
- sessionDialogStub.setDisableConsumer(true);
- session = fFacility.createSession(groups[1]);
+ sessionDialogStub.setNetworkUrl("file:///tmp");
+ sessionDialogStub.setStreamedTrace(true);
+ TraceSessionComponent session = fFacility.createSession(groups[1]);
// Verify that session was created
assertNotNull(session);
assertEquals("mysession", session.getName());
+ assertEquals("file:///tmp", session.getSessionPath());
+ assertTrue(!session.isStreamedTrace());
assertEquals(TraceSessionState.INACTIVE, session.getSessionState());
- sessionDialogStub.setDisableConsumer(false);
+ sessionDialogStub.setNetworkUrl(null);
+ sessionDialogStub.setStreamedTrace(false);
fFacility.destroySession(session);
assertEquals(0, groups[1].getChildren().length);
// ------------------------------------------------------------------------
- // Create session (--U file://...) and destroy
+ // Create session (--U file://,,, and destroy
// ------------------------------------------------------------------------
// Initialize session handling scenario
- fProxy.setScenario(SCEN_SCENARIO_FILE_PROTO_TEST);
+ fProxy.setScenario(SCEN_SCENARIO_CONTROL_DATA_TEST);
- sessionDialogStub.setNetworkUrl("file:///tmp");
+ sessionDialogStub.setControlUrl("tcp://172.0.0.1");
+ sessionDialogStub.setDataUrl("tcp://172.0.0.1:5343");
sessionDialogStub.setStreamedTrace(true);
+
session = fFacility.createSession(groups[1]);
// Verify that session was created
assertNotNull(session);
assertEquals("mysession", session.getName());
- assertEquals("file:///tmp", session.getSessionPath());
+ assertEquals("tcp://172.0.0.1:5342 [data: 5343]", session.getSessionPath());
assertTrue(session.isStreamedTrace());
assertEquals(TraceSessionState.INACTIVE, session.getSessionState());
- sessionDialogStub.setNetworkUrl(null);
+ sessionDialogStub.setControlUrl(null);
+ sessionDialogStub.setDataUrl(null);
sessionDialogStub.setStreamedTrace(false);
fFacility.destroySession(session);
assertEquals(0, groups[1].getChildren().length);
// ------------------------------------------------------------------------
- // Create session (--U file://,,, and destroy
+ // Create session (--U file://... and destroy
// ------------------------------------------------------------------------
// Initialize session handling scenario
- fProxy.setScenario(SCEN_SCENARIO_CONTROL_DATA_TEST);
+ fProxy.setScenario(SCEN_SCENARIO_NETWORK_TEST);
- sessionDialogStub.setControlUrl("tcp://172.0.0.1");
- sessionDialogStub.setDataUrl("tcp://172.0.0.1:5343");
+ sessionDialogStub.setNetworkUrl("net://172.0.0.1:1234:2345");
sessionDialogStub.setStreamedTrace(true);
session = fFacility.createSession(groups[1]);
// Verify that session was created
assertNotNull(session);
assertEquals("mysession", session.getName());
- assertEquals("tcp://172.0.0.1:5342 [data: 5343]", session.getSessionPath());
+ assertEquals("net://172.0.0.1:1234 [data: 2345]", session.getSessionPath());
assertTrue(session.isStreamedTrace());
assertEquals(TraceSessionState.INACTIVE, session.getSessionState());
- sessionDialogStub.setControlUrl(null);
- sessionDialogStub.setDataUrl(null);
- sessionDialogStub.setStreamedTrace(false);
+ sessionDialogStub.setNetworkUrl(null);
fFacility.destroySession(session);
assertEquals(0, groups[1].getChildren().length);
// ------------------------------------------------------------------------
- // Create session (--U file://,,, and destroy
+ // Create session (--U net6://[...] and destroy
// ------------------------------------------------------------------------
// Initialize session handling scenario
- fProxy.setScenario(SCEN_SCENARIO_NETWORK_TEST);
+ fProxy.setScenario(SCEN_SCENARIO_NETWORK2_TEST);
- sessionDialogStub.setNetworkUrl("net://172.0.0.1:1234:2345");
+ sessionDialogStub.setNetworkUrl("net6://[ffff::eeee:dddd:cccc:0]");
sessionDialogStub.setStreamedTrace(true);
session = fFacility.createSession(groups[1]);
// Verify that session was created
assertNotNull(session);
assertEquals("mysession", session.getName());
- assertEquals("net://172.0.0.1:1234 [data: 2345]", session.getSessionPath());
+ assertEquals("net://[ffff::eeee:dddd:cccc:0]:5342/mysession-20130221-144451 [data: 5343]", session.getSessionPath());
assertTrue(session.isStreamedTrace());
assertEquals(TraceSessionState.INACTIVE, session.getSessionState());
sessionDialogStub.setNetworkUrl(null);
// Verify that no more session components exist
assertEquals(0, groups[1].getChildren().length);
+
//-------------------------------------------------------------------------
// Disconnect node
//-------------------------------------------------------------------------
assertEquals(0,fFacility.getControlView().getTraceControlRoot().getChildren().length);
}
-}
\ No newline at end of file
+}
}
}
+ @Test
public void testCreateSession2_1() {
try {
fShell.setScenario(SCEN_CREATE_SESSION_2_1);
- ISessionInfo info = fService.createSession("mysession", null, true, false, new NullProgressMonitor());
- assertNotNull(info);
- assertEquals("mysession", info.getName());
- assertEquals("", info.getSessionPath());
- fService.destroySession("mysession", new NullProgressMonitor());
-
- info = fService.createSession("mysession", "file:///tmp", null, null, true, false, new NullProgressMonitor());
- assertNotNull(info);
- assertEquals("mysession", info.getName());
- assertEquals("", info.getSessionPath());
- assertTrue(info.isStreamedTrace());
- fService.destroySession("mysession", new NullProgressMonitor());
-
- info = fService.createSession("mysession", "net://172.0.0.1", null, null, false, true, new NullProgressMonitor());
+ ISessionInfo info = fService.createSession("mysession", "net://172.0.0.1", null, null, new NullProgressMonitor());
assertNotNull(info);
assertEquals("mysession", info.getName());
assertEquals("net://172.0.0.1", info.getSessionPath());
assertTrue(info.isStreamedTrace());
fService.destroySession("mysession", new NullProgressMonitor());
- info = fService.createSession("mysession", null, false, true, new NullProgressMonitor());
- assertNotNull(info);
- assertEquals("mysession", info.getName());
- // >>> no way to verify provided by tracer!!!
- fService.destroySession("mysession", new NullProgressMonitor());
-
- info = fService.createSession("mysession", "file:///tmp", null, null, false, false, new NullProgressMonitor());
+ info = fService.createSession("mysession", "file:///tmp", null, null, new NullProgressMonitor());
assertNotNull(info);
assertEquals("mysession", info.getName());
assertEquals("file:///tmp", info.getSessionPath());
assertTrue(info.isStreamedTrace());
fService.destroySession("mysession", new NullProgressMonitor());
- info = fService.createSession("mysession", "file:///tmp", null, null, false, false, new NullProgressMonitor());
+ info = fService.createSession("mysession", "file:///tmp", null, null, new NullProgressMonitor());
assertNotNull(info);
assertEquals("mysession", info.getName());
assertEquals("file:///tmp", info.getSessionPath());
assertTrue(info.isStreamedTrace());
fService.destroySession("mysession", new NullProgressMonitor());
- info = fService.createSession("mysession", null, "tcp://172.0.0.1", "tcp://172.0.0.1:5343", false, false, new NullProgressMonitor());
+ info = fService.createSession("mysession", null, "tcp://172.0.0.1", "tcp://172.0.0.1:5343", new NullProgressMonitor());
assertNotNull(info);
assertEquals("mysession", info.getName());
assertEquals("", info.getSessionPath()); // TODO: currently there is a bug in LTTng tracer and it returns string null
assertTrue(info.isStreamedTrace());
fService.destroySession("mysession", new NullProgressMonitor());
- info = fService.createSession("mysession", "net://172.0.0.1:1234:2345", null, null, false, false, new NullProgressMonitor());
+ info = fService.createSession("mysession", "net://172.0.0.1:1234:2345", null, null, new NullProgressMonitor());
assertNotNull(info);
assertEquals("mysession", info.getName());
assertEquals("net://172.0.0.1:1234:2345", info.getSessionPath());
private String fNetworkUrl = null;
private String fControlUrl = null;
private String fDataUrl = null;
- private boolean fIsNoConsumer = false;
- private boolean fIsDisableConsumer = false;
@Override
public String getSessionName() {
this.fDataUrl = fDataUrl;
}
- @Override
- public boolean isNoConsumer() {
- return fIsNoConsumer;
- }
- public void setNoConsumer(boolean isNoConsumer) {
- fIsNoConsumer = isNoConsumer;
- }
-
- @Override
- public boolean isDisableConsumer() {
- return fIsDisableConsumer;
- }
-
- public void setDisableConsumer(boolean isDisableConsumer) {
- fIsDisableConsumer = isDisableConsumer;
- }
}
####################################################################
# Scenario: Test "lttng create <session> with LTTng 2.1 options
####################################################################
-<SCENARIO>
-CreateSessionNoConsumer
-<COMMAND_INPUT>
-lttng create mysession --no-consumer
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Session mysession created.
-Traces will be written in
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng list mysession
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Tracing session mysession: [inactive]
- Trace path:
-
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng destroy mysession
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Session mysession destroyed.
-</COMMAND_OUTPUT>
-</SCENARIO>
##################################################################
<SCENARIO>
-CreateSessionDisableConsumer
+CreateSessionFileProto
<COMMAND_INPUT>
-lttng create mysession --disable-consumer
+lttng create mysession -U file:///tmp
</COMMAND_INPUT>
<COMMAND_RESULT>
0
</COMMAND_RESULT>
<COMMAND_OUTPUT>
Session mysession created.
-Traces will be written in /home/user/lttng-traces/mysession-20120209-095418
+Traces will be written in file:///tmp
</COMMAND_OUTPUT>
<COMMAND_INPUT>
</COMMAND_RESULT>
<COMMAND_OUTPUT>
Tracing session mysession: [inactive]
- Trace path: /home/user/lttng-traces/mysession-20120209-095418
+ Trace path: file:///tmp
</COMMAND_OUTPUT>
##################################################################
<SCENARIO>
-CreateSessionFileProto
+CreateSessionControlData
<COMMAND_INPUT>
-lttng create mysession -U file:///tmp
+lttng create mysession -C tcp://172.0.0.1 -D tcp://172.0.0.1:5343
</COMMAND_INPUT>
<COMMAND_RESULT>
0
</COMMAND_RESULT>
<COMMAND_OUTPUT>
Session mysession created.
-Traces will be written in file:///tmp
+Control URL tcp://172.0.0.1 set for session mysession
+Data URL tcp://172.0.0.1:5343 set for session mysession
</COMMAND_OUTPUT>
<COMMAND_INPUT>
</COMMAND_RESULT>
<COMMAND_OUTPUT>
Tracing session mysession: [inactive]
- Trace path: file:///tmp
+ Trace path: tcp://172.0.0.1:5342 [data: 5343]
</COMMAND_OUTPUT>
##################################################################
<SCENARIO>
-CreateSessionControlData
+CreateSessionNetwork
<COMMAND_INPUT>
-lttng create mysession -C tcp://172.0.0.1 -D tcp://172.0.0.1:5343
+lttng create mysession -U net://172.0.0.1:1234:2345
</COMMAND_INPUT>
<COMMAND_RESULT>
0
</COMMAND_RESULT>
<COMMAND_OUTPUT>
Session mysession created.
-Control URL tcp://172.0.0.1 set for session mysession
-Data URL tcp://172.0.0.1:5343 set for session mysession
+Traces will be written in net://172.0.0.1:1234:2345
</COMMAND_OUTPUT>
<COMMAND_INPUT>
</COMMAND_RESULT>
<COMMAND_OUTPUT>
Tracing session mysession: [inactive]
- Trace path: tcp://172.0.0.1:5342 [data: 5343]
+ Trace path: net://172.0.0.1:1234 [data: 2345]
</COMMAND_OUTPUT>
0
</COMMAND_RESULT>
<COMMAND_OUTPUT>
-Session mysession destroyed.
+Session mysession2 destroyed.
</COMMAND_OUTPUT>
+
</SCENARIO>
##################################################################
<SCENARIO>
-CreateSessionNetwork
+CreateSessionNetwork2
<COMMAND_INPUT>
-lttng create mysession -U net://172.0.0.1:1234:2345
+lttng create mysession -U net6://[ffff::eeee:dddd:cccc:0]
</COMMAND_INPUT>
<COMMAND_RESULT>
0
</COMMAND_RESULT>
<COMMAND_OUTPUT>
Session mysession created.
-Traces will be written in net://172.0.0.1:1234:2345
+Traces will be written in net6://[ffff::eeee:dddd:cccc:0]
</COMMAND_OUTPUT>
<COMMAND_INPUT>
</COMMAND_RESULT>
<COMMAND_OUTPUT>
Tracing session mysession: [inactive]
- Trace path: net://172.0.0.1:1234 [data: 2345]
+ Trace path: net://[ffff::eeee:dddd:cccc:0]:5342/mysession-20130221-144451 [data: 5343]
</COMMAND_OUTPUT>
####################################################################
<SCENARIO>
CreateSessionLttng2.1
-<COMMAND_INPUT>
-lttng create mysession --no-consumer
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Session mysession created.
-Traces will be written in
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng create mysession -U file:///tmp --no-consumer
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Session mysession created.
-Traces will be written in
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng destroy mysession
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Session mysession destroyed.
-</COMMAND_OUTPUT>
<COMMAND_INPUT>
-lttng create mysession --disable-consumer
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Session mysession created.
-Traces will be written in /home/user/lttng-traces/mysession-20120209-095418
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng create mysession -U net://172.0.0.1 --disable-consumer
+lttng create mysession -U net://172.0.0.1
</COMMAND_INPUT>
<COMMAND_RESULT>
0
Traces will be written in net://172.0.0.1:1234:2345
</COMMAND_OUTPUT>
+<COMMAND_INPUT>
+lttng destroy mysession
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Session mysession destroyed.
+</COMMAND_OUTPUT>
+
</SCENARIO>
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.CCombo;
-import org.eclipse.swt.events.KeyAdapter;
-import org.eclipse.swt.events.KeyEvent;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.graphics.Point;
* The text widget for the session name
*/
private Text fSessionNameText = null;
+ /**
+ * The label widget for the session path.
+ */
+ private Label fSessionPathLabel = null;
/**
* The text widget for the session path.
*/
* The composite with streaming configuration parameter.
*/
private Composite fStreamingComposite = null;
+ /**
+ * The text widget for the trace path.
+ */
+ private Text fTracePathText = null;
/**
* The button to link data protocol/Address with control protocol.
*/
* A selection listener that copies the protocol from control to data when being linked.
*/
private ControlProtocolSelectionListener fCopyProtocolSelectionListener;
-
+ /**
+ * A selection listener updates the control port text depending on the control protocol selected.
+ */
private ProtocolComboSelectionListener fControlProtocolSelectionListener;
+ /**
+ * A selection listener updates the data port text depending on the data protocol selected.
+ */
private ProtocolComboSelectionListener fDataProtocolSelectionListener;
-
/**
* The text box for the host/IP address of the control channel.
*/
/**
* A key listener that copies the host address from control to data when being linked.
*/
- private CopyKeyListener fControlUrlKeyListener;
+ private CopyModifyListener fControlUrlKeyListener;
/**
* The text box for the control port.
*/
* The text box for the data port.
*/
private Text fDataPortText = null;
- /**
- * The button to not activate a consumer.
- */
- private Button fNoConsumerButton = null;
- /**
- * The button to disable the consumer.
- */
- private Button fDisableConsumerButton = null;
/**
* The parent where the new node should be added.
*/
*/
private String fDataUrl = null;
/**
- * Flag for not activating a consumer for this session.
- */
- private boolean fIsNoConsumer = false;
- /**
- * Flag for disabling a consumer for this session.
+ * The trace path string.
*/
- private boolean fIsDisableConsumer = false;
+ private String fTracePath = null;
// ------------------------------------------------------------------------
// Constructors
fNetworkUrl = null;
fControlUrl = null;
fDataUrl = null;
- fIsNoConsumer = false;
- fIsDisableConsumer = false;
}
@Override
return fDataUrl;
}
- @Override
- public boolean isNoConsumer() {
- return fIsNoConsumer;
- }
-
- @Override
- public boolean isDisableConsumer() {
- return fIsDisableConsumer;
- }
-
// ------------------------------------------------------------------------
// Operations
// ------------------------------------------------------------------------
fSessionNameText = new Text(sessionGroup, SWT.NONE);
fSessionNameText.setToolTipText(Messages.TraceControl_CreateSessionNameTooltip);
- Label sessionPath = new Label(sessionGroup, SWT.RIGHT);
- sessionPath.setText(Messages.TraceControl_CreateSessionPathLabel);
+ fSessionPathLabel = new Label(sessionGroup, SWT.RIGHT);
+ fSessionPathLabel.setText(Messages.TraceControl_CreateSessionPathLabel);
fSessionPathText = new Text(sessionGroup, SWT.NONE);
fSessionPathText.setToolTipText(Messages.TraceControl_CreateSessionPathTooltip);
fSessionPathText.setLayoutData(data);
if (fParent.isNetworkStreamingSupported()) {
- fNoConsumerButton = new Button(sessionGroup, SWT.CHECK);
- fNoConsumerButton.setText(Messages.TraceControl_CreateSessionNoConsumertText);
- fNoConsumerButton.setToolTipText(Messages.TraceControl_CreateSessionNoConsumertTooltip);
- data = new GridData(GridData.FILL_HORIZONTAL);
- data.horizontalSpan = 2;
- fNoConsumerButton.setLayoutData(data);
-
- fDisableConsumerButton = new Button(sessionGroup, SWT.CHECK);
- fDisableConsumerButton.setText(Messages.TraceControl_CreateSessionDisableConsumertText);
- fDisableConsumerButton.setToolTipText(Messages.TraceControl_CreateSessionDisableConsumertTooltip);
- data = new GridData(GridData.FILL_HORIZONTAL);
- data.horizontalSpan = 2;
- fDisableConsumerButton.setLayoutData(data);
-
- fNoConsumerButton.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- if (fNoConsumerButton.getSelection()) {
- fDisableConsumerButton.setSelection(false);
- }
- }
- });
-
- fDisableConsumerButton.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- if (fDisableConsumerButton.getSelection()) {
- fNoConsumerButton.setSelection(false);
- }
- }
- });
-
createAdvancedOptionsComposite();
}
fMainStreamingGroup.setLayout(new GridLayout(1, true));
fConfigureStreamingButton = new Button(fMainStreamingGroup, SWT.PUSH);
- fConfigureStreamingButton.setText(">>> " + Messages.TraceControl_CreateSessionConfigureStreamingButtonText); //$NON-NLS-1$
+ fConfigureStreamingButton.setText(Messages.TraceControl_CreateSessionConfigureStreamingButtonText + " >>>"); //$NON-NLS-1$
fConfigureStreamingButton.setToolTipText(Messages.TraceControl_CreateSessionConfigureStreamingButtonTooltip);
fConfigureStreamingButton.addSelectionListener(new SelectionAdapter() {
@Override
fIsStreamedTrace = false;
fConfigureStreamingButton.setText(">>> " + Messages.TraceControl_CreateSessionConfigureStreamingButtonText); //$NON-NLS-1$
fConfigureStreamingButton.setToolTipText(Messages.TraceControl_CreateSessionConfigureStreamingButtonTooltip);
+ fSessionPathText.setEnabled(true);
+ fSessionPathLabel.setText(Messages.TraceControl_CreateSessionPathLabel);
disposeConfigureStreamingComposite();
} else {
fIsStreamedTrace = true;
fConfigureStreamingButton.setText("<<< " + Messages.TraceControl_CreateSessionNoStreamingButtonText); //$NON-NLS-1$
fConfigureStreamingButton.setToolTipText(Messages.TraceControl_CreateSessionNoStreamingButtonTooltip);
+ fSessionPathText.setEnabled(false);
+ fSessionPathText.setText(""); //$NON-NLS-1$
+ fSessionPathLabel.setText(""); //$NON-NLS-1$
createConfigureStreamingComposite();
}
urlGroup.setLayout(layout);
urlGroup.setLayoutData(new GridData(GridData.FILL_BOTH));
+ Label tracePathLabel = new Label(urlGroup, SWT.RIGHT);
+ tracePathLabel.setText(Messages.TraceControl_CreateSessionTracePathText);
+ fTracePathText = new Text(urlGroup, SWT.NONE);
+ fTracePathText.setToolTipText(Messages.TraceControl_CreateSessionTracePathTooltip);
+
+ // layout widgets
+ GridData data = new GridData(GridData.FILL_HORIZONTAL);
+ data.horizontalSpan = 6;
+ fTracePathText.setLayoutData(data);
+
fLinkDataWithControlButton = new Button(urlGroup, SWT.CHECK);
fLinkDataWithControlButton.setText(Messages.TraceControl_CreateSessionLinkButtonText);
fLinkDataWithControlButton.setToolTipText(Messages.TraceControl_CreateSessionLinkButtonTooltip);
- GridData data = new GridData(GridData.FILL_HORIZONTAL);
+ data = new GridData(GridData.FILL_HORIZONTAL);
data.horizontalSpan = 7;
fLinkDataWithControlButton.setLayoutData(data);
fLinkDataWithControlButton.setSelection(true);
fControlProtocolCombo.addSelectionListener(fCopyProtocolSelectionListener);
- fControlUrlKeyListener = new CopyKeyListener(fControlHostAddressText, fDataHostAddressText);
- fControlHostAddressText.addKeyListener(fControlUrlKeyListener);
-
-// InetAddress inet = null;
-// try {
-// inet = InetAddress.getLocalHost();
-// inet = InetAddress.getByName(inet.getHostName());
-// } catch (UnknownHostException e1) {
-// }
-// if (inet != null) {
-// fControlUrlAddressText.setText(inet.getHostAddress());
-// fDataUrlAddressText.setText(inet.getHostAddress());
-// }
+ fControlUrlKeyListener = new CopyModifyListener(fControlHostAddressText, fDataHostAddressText);
+ fControlHostAddressText.addModifyListener(fControlUrlKeyListener);
+
fControlProtocolCombo.select(DEFAULT_URL_INDEX);
fDataProtocolCombo.select(DEFAULT_URL_INDEX);
fControlProtocolCombo.removeSelectionListener(fControlProtocolSelectionListener);
fDataProtocolCombo.removeSelectionListener(fDataProtocolSelectionListener);
fControlProtocolCombo.addSelectionListener(fCopyProtocolSelectionListener);
- fControlHostAddressText.addKeyListener(fControlUrlKeyListener);
+ fControlHostAddressText.addModifyListener(fControlUrlKeyListener);
// Get previous selection and validate
int currentSelection = fControlProtocolCombo.getSelectionIndex() <= COMMON_URL_LAST_INDEX ?
fControlProtocolCombo.removeSelectionListener(fCopyProtocolSelectionListener);
fControlProtocolCombo.addSelectionListener(fControlProtocolSelectionListener);
fDataProtocolCombo.addSelectionListener(fDataProtocolSelectionListener);
- fControlHostAddressText.removeKeyListener(fControlUrlKeyListener);
+ fControlHostAddressText.removeModifyListener(fControlUrlKeyListener);
// Update combo box items
int currentSelection = fControlProtocolCombo.getSelectionIndex();
fDataUrl = null;
if (fIsStreamedTrace) {
+ // Validate input data
+ fTracePath = fTracePathText.getText();
+
if (fControlProtocolCombo.getSelectionIndex() < 0) {
MessageDialog.openError(getShell(),
Messages.TraceControl_CreateSessionDialogTitle,
fControlHostAddressText.getText(),
fControlPortText.getText(),
null,
- fSessionPath);
+ fTracePath);
fDataUrl = getUrlString(fControlProtocolCombo.getItem(fDataProtocolCombo.getSelectionIndex()),
fDataHostAddressText.getText(),
null,
fDataPortText.getText(),
- fSessionPath);
+ fTracePath);
} else {
fNetworkUrl = getUrlString(fControlProtocolCombo.getItem(fDataProtocolCombo.getSelectionIndex()),
fControlHostAddressText.getText(),
fControlPortText.getText(),
fDataPortText.getText(),
- fSessionPath);
+ fTracePath);
}
}
return;
}
- if (fParent.isNetworkStreamingSupported()) {
- fIsNoConsumer = fNoConsumerButton.getSelection();
- fIsDisableConsumer = fDisableConsumerButton.getSelection();
- }
-
// validation successful -> call super.okPressed()
super.okPressed();
}
return stringBuilder.toString();
}
- private static class CopyKeyListener extends KeyAdapter {
+ private static class CopyModifyListener implements ModifyListener {
private Text fSource;
private Text fDestination;
- public CopyKeyListener(Text source, Text destination) {
+ public CopyModifyListener(Text source, Text destination) {
fSource = source;
fDestination = destination;
}
@Override
- public void keyReleased(KeyEvent e) {
+ public void modifyText(ModifyEvent e) {
fDestination.setText(fSource.getText());
}
}
*/
public String getDataUrl();
- /**
- * @return for not activating a consumer for this session
- */
- public boolean isNoConsumer();
-
- /**
- * @return for disabling a consumer for this session
- */
- public boolean isDisableConsumer();
-
// ------------------------------------------------------------------------
// Operations
// ------------------------------------------------------------------------
*/
public String getFilterExpression();
-}
\ No newline at end of file
+}
try {
if (dialog.isStreamedTrace()) {
sessionGroup.createSession(dialog.getSessionName(), dialog.getNetworkUrl(), dialog.getControlUrl(),
- dialog.getDataUrl(), dialog.isNoConsumer(), dialog.isDisableConsumer(), monitor);
+ dialog.getDataUrl(), monitor);
} else {
String sessionPath = dialog.isDefaultSessionPath() ? null : dialog.getSessionPath();
- sessionGroup.createSession(dialog.getSessionName(), sessionPath, dialog.isNoConsumer(),
- dialog.isDisableConsumer(), monitor);
+ sessionGroup.createSession(dialog.getSessionName(), sessionPath, monitor);
}
} catch (ExecutionException e) {
return new Status(IStatus.ERROR, Activator.PLUGIN_ID, Messages.TraceControl_CreateSessionFailure, e);
public static String TraceControl_CreateSessionConfigureStreamingButtonTooltip;
public static String TraceControl_CreateSessionNoStreamingButtonText;
public static String TraceControl_CreateSessionNoStreamingButtonTooltip;
+ public static String TraceControl_CreateSessionTracePathText;
+ public static String TraceControl_CreateSessionTracePathTooltip;
public static String TraceControl_CreateSessionLinkButtonText;
public static String TraceControl_CreateSessionLinkButtonTooltip;
public static String TraceControl_CreateSessionProtocolLabelText;
TraceControl_CreateSessionPathLabel=Session Path
TraceControl_CreateSessionPathTooltip=The session path (keep empty for default location)
-TraceControl_CreateSessionConfigureStreamingButtonText=Configure Streaming
-TraceControl_CreateSessionConfigureStreamingButtonTooltip=Configure streaming parameters
-TraceControl_CreateSessionNoStreamingButtonText=Remove Streaming
-TraceControl_CreateSessionNoStreamingButtonTooltip=Remove streaming configuration
+TraceControl_CreateSessionConfigureStreamingButtonText=Advanced
+TraceControl_CreateSessionConfigureStreamingButtonTooltip=Configure advanced options
+TraceControl_CreateSessionNoStreamingButtonText=Basic
+TraceControl_CreateSessionNoStreamingButtonTooltip=Use basic options
+TraceControl_CreateSessionTracePathText=Trace Path
+TraceControl_CreateSessionTracePathTooltip=The trace path (keep empty for default location)
TraceControl_CreateSessionLinkButtonText=Synchronize data with control configuration
TraceControl_CreateSessionLinkButtonTooltip=Synchronize data protocol and host address with control channel configuration
TraceControl_CreateSessionProtocolLabelText=Protocol
/**********************************************************************
- * Copyright (c) 2012 Ericsson
+ * Copyright (c) 2012, 2013 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
*
* Contributors:
* Bernd Hufmann - Initial API and implementation
+ * Bernd Hufmann - Updated for support of LTTng Tools 2.1
**********************************************************************/
package org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.impl;
* - a session name to create
* @param sessionPath
* - a path for storing the traces (use null for default)
- * @param noConsumer
- * - a flag to indicate no consumer
- * @param disableConsumer
- * - a flag to disable consumer
* @throws ExecutionException
* If the command fails
*/
- public void createSession(String sessionName, String sessionPath, boolean noConsumer, boolean disableConsumer) throws ExecutionException {
- createSession(sessionName, sessionPath, noConsumer, disableConsumer, new NullProgressMonitor());
+ public void createSession(String sessionName, String sessionPath) throws ExecutionException {
+ createSession(sessionName, sessionPath, new NullProgressMonitor());
}
/**
* - a session name to create
* @param sessionPath
* - a path for storing the traces (use null for default)
- * @param noConsumer
- * - a flag to indicate no consumer
- * @param disableConsumer
- * - a flag to disable consumer
* @param monitor
* - a progress monitor
* @throws ExecutionException
* If the command fails
*/
- public void createSession(String sessionName, String sessionPath, boolean noConsumer, boolean disableConsumer, IProgressMonitor monitor) throws ExecutionException {
- ISessionInfo sessionInfo = getControlService().createSession(sessionName, sessionPath, noConsumer, disableConsumer, monitor);
+ public void createSession(String sessionName, String sessionPath, IProgressMonitor monitor) throws ExecutionException {
+ ISessionInfo sessionInfo = getControlService().createSession(sessionName, sessionPath, monitor);
if (sessionInfo != null) {
TraceSessionComponent session = new TraceSessionComponent(
* - a URL for control channel (networkUrl has to be null, dataUrl has to be set)
* @param dataUrl
* - a URL for data channel (networkUrl has to be null, controlUrl has to be set)
- * @param noConsumer
- * - a flag to indicate no consumer
- * @param disableConsumer
- * - a flag to disable consumer
* @throws ExecutionException
* If the command fails
*/
- public void createSession(String sessionName, String networkUrl, String controlUrl, String dataUrl, boolean noConsumer, boolean disableConsumer) throws ExecutionException {
- createSession(sessionName, networkUrl, controlUrl, dataUrl, noConsumer, disableConsumer, new NullProgressMonitor());
+ public void createSession(String sessionName, String networkUrl, String controlUrl, String dataUrl) throws ExecutionException {
+ createSession(sessionName, networkUrl, controlUrl, dataUrl, new NullProgressMonitor());
}
/**
* - a URL for control channel (networkUrl has to be null, dataUrl has to be set)
* @param dataUrl
* - a URL for data channel (networkUrl has to be null, controlUrl has to be set)
- * @param noConsumer
- * - a flag to indicate no consumer
- * @param disableConsumer
- * - a flag to disable consumer
* @param monitor
* - a progress monitor
* @throws ExecutionException
* If the command fails
*/
- public void createSession(String sessionName, String networkUrl, String controlUrl, String dataUrl, boolean noConsumer, boolean disableConsumer, IProgressMonitor monitor) throws ExecutionException {
- ISessionInfo sessionInfo = getControlService().createSession(sessionName, networkUrl, controlUrl, dataUrl, noConsumer, disableConsumer, monitor);
+ public void createSession(String sessionName, String networkUrl, String controlUrl, String dataUrl, IProgressMonitor monitor) throws ExecutionException {
+ ISessionInfo sessionInfo = getControlService().createSession(sessionName, networkUrl, controlUrl, dataUrl, monitor);
if (sessionInfo != null) {
TraceSessionComponent session = new TraceSessionComponent(sessionInfo.getName(), TraceSessionGroup.this);
* @throws ExecutionException
* If the command fails
*/
- public ISessionInfo createSession(String sessionName, String sessionPath,
- IProgressMonitor monitor) throws ExecutionException;
-
- /**
- * Creates a session with given session name and location.
- *
- * @param sessionName
- * - a session name to create
- * @param sessionPath
- * - a path for storing the traces (use null for default)
- * @param noConsumer
- * - a flag to indicate no consumer
- * @param disableConsumer
- * - a flag to disable consumer
- * @param monitor
- * - a progress monitor
- * @return the session information
- * @throws ExecutionException
- * If the command fails
- */
- public ISessionInfo createSession(String sessionName, String sessionPath, boolean noConsumer, boolean disableConsumer,
- IProgressMonitor monitor) throws ExecutionException;
-
+ public ISessionInfo createSession(String sessionName, String sessionPath, IProgressMonitor monitor) throws ExecutionException;
/**
* Creates a session with given session name and location.
* - a URL for control channel (networkUrl has to be null, dataUrl has to be set)
* @param dataUrl
* - a URL for data channel (networkUrl has to be null, controlUrl has to be set)
- * @param noConsumer
- * - a flag to indicate no consumer
- * @param disableConsumer
- * - a flag to disable consumer
* @param monitor
* - a progress monitor
* @return the session information
* @throws ExecutionException
* If the command fails
*/
- public ISessionInfo createSession(String sessionName, String networkUrl, String controlUrl, String dataUrl, boolean noConsumer, boolean disableConsumer,
- IProgressMonitor monitor) throws ExecutionException;
+ public ISessionInfo createSession(String sessionName, String networkUrl, String controlUrl, String dataUrl, IProgressMonitor monitor) throws ExecutionException;
/**
* Destroys a session with given session name.
if (matcher.matches()) {
// Create Domain
IDomainInfo domainInfo = new DomainInfo(Messages.TraceControl_KernelDomainDisplayName);
- sessionInfo.addDomain(domainInfo);
// in domain kernel
ArrayList<IChannelInfo> channels = new ArrayList<IChannelInfo>();
index = parseDomain(result.getOutput(), index, channels);
- // set channels
- domainInfo.setChannels(channels);
+ if (channels.size() > 0) {
+ // add domain
+ sessionInfo.addDomain(domainInfo);
- // set kernel flag
- domainInfo.setIsKernel(true);
+ // set channels
+ domainInfo.setChannels(channels);
+
+ // set kernel flag
+ domainInfo.setIsKernel(true);
+ }
continue;
}
matcher = LTTngControlServiceConstants.DOMAIN_UST_GLOBAL_PATTERN.matcher(line);
if (matcher.matches()) {
IDomainInfo domainInfo = new DomainInfo(Messages.TraceControl_UstGlobalDomainDisplayName);
- sessionInfo.addDomain(domainInfo);
// in domain UST
ArrayList<IChannelInfo> channels = new ArrayList<IChannelInfo>();
index = parseDomain(result.getOutput(), index, channels);
- // set channels
- domainInfo.setChannels(channels);
+ if (channels.size() > 0) {
+ // add domain
+ sessionInfo.addDomain(domainInfo);
+
+ // set channels
+ domainInfo.setChannels(channels);
- // set kernel flag
- domainInfo.setIsKernel(false);
+ // set kernel flag
+ domainInfo.setIsKernel(false);
+ }
continue;
}
index++;
*/
@Override
public ISessionInfo createSession(String sessionName, String sessionPath, IProgressMonitor monitor) throws ExecutionException {
- return createSession(sessionName, sessionPath, false, false, monitor);
- }
-
- @Override
- public ISessionInfo createSession(String sessionName, String sessionPath, boolean noConsumer, boolean disableConsumer,
- IProgressMonitor monitor) throws ExecutionException {
String newName = formatParameter(sessionName);
String newPath = formatParameter(sessionPath);
command.append(newPath);
}
- if (noConsumer) {
- command.append(LTTngControlServiceConstants.OPTION_NO_CONSUMER);
- } else if (disableConsumer) {
- command.append(LTTngControlServiceConstants.OPTION_DISABLE_CONSUMER);
- }
-
ICommandResult result = executeCommand(command.toString(), monitor);
//Session myssession2 created.
SessionInfo sessionInfo = new SessionInfo(name);
- if (!noConsumer) {
- // Get and verify session path
- matcher = LTTngControlServiceConstants.CREATE_SESSION_PATH_PATTERN.matcher(output[1]);
- String path = null;
+ // Get and verify session path
+ matcher = LTTngControlServiceConstants.CREATE_SESSION_PATH_PATTERN.matcher(output[1]);
+ String path = null;
- if (matcher.matches()) {
- path = String.valueOf(matcher.group(1).trim());
- } else {
- // Output format not expected
- throw new ExecutionException(Messages.TraceControl_CommandError + " " + command + "\n" + //$NON-NLS-1$ //$NON-NLS-2$
- Messages.TraceControl_UnexpectedCommandOutputFormat + ":\n" + //$NON-NLS-1$
- formatOutput(result));
- }
+ if (matcher.matches()) {
+ path = String.valueOf(matcher.group(1).trim());
+ } else {
+ // Output format not expected
+ throw new ExecutionException(Messages.TraceControl_CommandError + " " + command + "\n" + //$NON-NLS-1$ //$NON-NLS-2$
+ Messages.TraceControl_UnexpectedCommandOutputFormat + ":\n" + //$NON-NLS-1$
+ formatOutput(result));
+ }
- if ((path == null) || ((sessionPath != null) && (!path.contains(sessionPath)))) {
- // Unexpected path
- throw new ExecutionException(Messages.TraceControl_CommandError + " " + command + "\n" + //$NON-NLS-1$ //$NON-NLS-2$
- Messages.TraceControl_UnexpectedPathError + ": " + name); //$NON-NLS-1$
- }
- sessionInfo.setSessionPath(path);
+ if ((path == null) || ((sessionPath != null) && (!path.contains(sessionPath)))) {
+ // Unexpected path
+ throw new ExecutionException(Messages.TraceControl_CommandError + " " + command + "\n" + //$NON-NLS-1$ //$NON-NLS-2$
+ Messages.TraceControl_UnexpectedPathError + ": " + name); //$NON-NLS-1$
}
+ sessionInfo.setSessionPath(path);
return sessionInfo;
/*
* (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.service.ILttngControlService#createSession(java.lang.String, java.lang.String, java.lang.String, java.lang.String, boolean, boolean, org.eclipse.core.runtime.IProgressMonitor)
+ * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.service.ILttngControlService#createSession(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.eclipse.core.runtime.IProgressMonitor)
*/
@Override
- public ISessionInfo createSession(String sessionName, String networkUrl, String controlUrl,
- String dataUrl, boolean noConsumer, boolean disableConsumer, IProgressMonitor monitor) throws ExecutionException {
+ public ISessionInfo createSession(String sessionName, String networkUrl, String controlUrl, String dataUrl, IProgressMonitor monitor) throws ExecutionException {
String newName = formatParameter(sessionName);
StringBuffer command = createCommand(LTTngControlServiceConstants.COMMAND_CREATE_SESSION, newName);
command.append(dataUrl);
}
- if (noConsumer) {
- command.append(LTTngControlServiceConstants.OPTION_NO_CONSUMER);
- } else if (disableConsumer) {
- command.append(LTTngControlServiceConstants.OPTION_DISABLE_CONSUMER);
- }
-
ICommandResult result = executeCommand(command.toString(), monitor);
//Session myssession2 created.
String path = null;
SessionInfo sessionInfo = new SessionInfo(name);
- if (!noConsumer && (networkUrl != null)) {
+ if (networkUrl != null) {
if (matcher.matches()) {
path = String.valueOf(matcher.group(1).trim());
} else {
String line = output[index];
Matcher outerMatcher = LTTngControlServiceConstants.CHANNELS_SECTION_PATTERN.matcher(line);
+ Matcher noKernelChannelMatcher = LTTngControlServiceConstants.DOMAIN_NO_KERNEL_CHANNEL_PATTERN.matcher(line);
+ Matcher noUstChannelMatcher = LTTngControlServiceConstants.DOMAIN_NO_UST_CHANNEL_PATTERN.matcher(line);
if (outerMatcher.matches()) {
IChannelInfo channelInfo = null;
while (index < output.length) {
}
index++;
}
+ } else if (noKernelChannelMatcher.matches() || noUstChannelMatcher.matches()) {
+ // domain indicates that no channels were found -> return
+ index++;
+ return index;
}
index++;
}
* Command line option for configuring the streaming data URL.
*/
public final static String OPTION_DATA_URL = " -D "; //$NON-NLS-1$
- /**
- * Command line option for configuring of no consumer.
- */
- public final static String OPTION_NO_CONSUMER = " --no-consumer "; //$NON-NLS-1$
- /**
- * Command line option for disabling the consumer.
- */
- public final static String OPTION_DISABLE_CONSUMER = " --disable-consumer "; //$NON-NLS-1$
// ------------------------------------------------------------------------
// Parsing constants
*/
public final static Pattern TRACE_SESSION_PATH_PATTERN = Pattern.compile("\\s*Trace\\s+path\\:\\s+(.*)"); //$NON-NLS-1$
/**
- * Patter to match session path for network tracing (lttng list <session>)
+ * 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.
*/
- public final static Pattern TRACE_NETWORK_PATH_PATTERN = Pattern.compile("\\s*Trace\\s+path\\:\\s+(net|net6|file|tcp|tcp6|)\\:\\/\\/(.*)(\\:(\\d*)\\/(.*)\\[data\\:\\s+(\\d*)\\]){0,1}"); //$NON-NLS-1$
+ public final static 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$
/**
* Pattern to match for kernel domain information (lttng list <session>)
*/
* Pattern to match for ust domain information (lttng list <session>)
*/
public final static Pattern DOMAIN_UST_GLOBAL_PATTERN = Pattern.compile("=== Domain: UST global ==="); //$NON-NLS-1$
+ /**
+ * Pattern to match for matching warning about no kernel channel
+ */
+ public final static Pattern DOMAIN_NO_KERNEL_CHANNEL_PATTERN = Pattern.compile("\\s*Warning\\:\\s+No kernel\\s+channel.*"); //$NON-NLS-1$
+ /**
+ * Pattern to match for matching warning about no UST channel
+ */
+ public final static 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 channels section (lttng list <session>)
*/
/**
* Pattern to match event fields
*/
- // field: content (string)
public final static Pattern EVENT_FIELD_PATTERN = Pattern.compile("\\s*(field:)\\s+(.*)\\s+\\((.*)\\)"); //$NON-NLS-1$
/**
* Pattern to match for UST provider information (lttng list -u)