import org.eclipse.tracecompass.internal.lttng2.control.core.model.IDomainInfo;
import org.eclipse.tracecompass.internal.lttng2.control.core.model.ISessionInfo;
import org.eclipse.tracecompass.internal.lttng2.control.core.model.ISnapshotInfo;
+import org.eclipse.tracecompass.internal.lttng2.control.core.model.ITraceLogLevel;
import org.eclipse.tracecompass.internal.lttng2.control.core.model.LogLevelType;
-import org.eclipse.tracecompass.internal.lttng2.control.core.model.TraceLogLevel;
+import org.eclipse.tracecompass.internal.lttng2.control.core.model.TraceDomainType;
import org.eclipse.tracecompass.internal.lttng2.control.core.model.TraceSessionState;
import org.eclipse.tracecompass.internal.lttng2.control.core.model.impl.SessionInfo;
import org.eclipse.tracecompass.internal.lttng2.control.ui.Activator;
}
private void copyLiveInfo(ISessionInfo sessionInfo) {
- // Since we can't retrieve this information from the node, we copy it over
+ /*
+ * Since we can't retrieve this live port and URL from the node, we
+ * copy it over. Note that this information gets lost when the user
+ * presses the refresh button or restarts or Trace Compass.
+ */
if (sessionInfo.getLivePort() != null) {
fSessionInfo.setLivePort(sessionInfo.getLivePort());
}
if (sessionInfo.getLiveUrl() != null) {
fSessionInfo.setLiveUrl(sessionInfo.getLiveUrl());
}
+
+ /*
+ * Live streaming has been added in 2.4.x. Since we can't retrieve
+ * whether a session is live or not from a 2.4.x node, we copy it over.
+ * Note that this information gets lost when the user presses the
+ * refresh button or restarts or Trace Compass.
+ *
+ * For LTTng 2.5.0 and later it's possible to retrieve this information.
+ * So we don't need to copy this over be set here. This will make sure
+ * that the session is recognized as live after a Trace Compass restart
+ * or a refresh.
+ */
+ if (!getTargetNode().isVersionSupported("2.5.0")) { //$NON-NLS-1$
+ fSessionInfo.setLive(sessionInfo.isLive());
+ }
}
// ------------------------------------------------------------------------
/**
* Returns if node supports filtering of events
- * @param isKernel - <code>true</code> for kernel provider else <code>false</code>
+ * @param domain - the domain type ({@link TraceDomainType})
* @return <code>true</code> if node supports filtering else <code>false</code>
*/
- public boolean isEventFilteringSupported(boolean isKernel) {
- return ((TargetNodeComponent)getParent().getParent()).isEventFilteringSupported(isKernel);
+ public boolean isEventFilteringSupported(TraceDomainType domain) {
+ return ((TargetNodeComponent)getParent().getParent()).isEventFilteringSupported(domain);
}
/**
IDomainInfo[] domains = fSessionInfo.getDomains();
for (int i = 0; i < domains.length; i++) {
- TraceDomainComponent domainComponent = new TraceDomainComponent(
- domains[i].getName(), this);
+ TraceDomainComponent domainComponent = new TraceDomainComponent(domains[i].getName(), this);
addChild(domainComponent);
domainComponent.setDomainInfo(domains[i]);
}
* @param info
* - channel information to set for the channel (use null for
* default)
- * @param isKernel
- * - a flag for indicating kernel or UST.
+ * @param domain
+ * - indicate the domain type ({@link TraceDomainType})
* @param monitor
* - a progress monitor
* @throws ExecutionException
* If the command fails
*/
public void enableChannels(List<String> channelNames, IChannelInfo info,
- boolean isKernel, IProgressMonitor monitor)
+ TraceDomainType domain, IProgressMonitor monitor)
throws ExecutionException {
- getControlService().enableChannels(getName(), channelNames, isKernel,
+ getControlService().enableChannels(getName(), channelNames, domain,
info, monitor);
}
*
* @param eventNames
* - a list of event names to enabled.
- * @param isKernel
- * - a flag for indicating kernel or UST.
+ * @param domain
+ * - the type of the domain type ({@link TraceDomainType})
* @param filterExpression
* - a filter expression
+ * @param excludedEvents
+ * - a list of events to exclude.
* @param monitor
* - a progress monitor
* @throws ExecutionException
* If the command fails
*/
- public void enableEvents(List<String> eventNames, boolean isKernel,
- String filterExpression, IProgressMonitor monitor) throws ExecutionException {
- getControlService().enableEvents(getName(), null, eventNames, isKernel,
- filterExpression, monitor);
+ public void enableEvents(List<String> eventNames, TraceDomainType domain,
+ String filterExpression, List<String> excludedEvents, IProgressMonitor monitor) throws ExecutionException {
+ getControlService().enableEvents(getName(), null, eventNames, domain,
+ filterExpression, excludedEvents, monitor);
}
/**
* Enables all syscalls (for kernel domain)
*
+ * @param syscallNames
+ * - a list of syscall names to be enabled
* @param monitor
* - a progress monitor
* @throws ExecutionException
* If the command fails
*/
- public void enableSyscalls(IProgressMonitor monitor)
+ public void enableSyscalls(List<String> syscallNames, IProgressMonitor monitor)
throws ExecutionException {
- getControlService().enableSyscalls(getName(), null, monitor);
+ getControlService().enableSyscalls(getName(), null, syscallNames, monitor);
}
/**
/**
* Enables events using log level.
*
- * @param eventName
- * - a event name
+ * @param eventNames
+ * - a list of event names
* @param logLevelType
* - a log level type
* @param level
* - a log level
* @param filterExpression
* - a filter expression
+ * @param domain
+ * - the domain type ({@link TraceDomainType})
* @param monitor
* - a progress monitor
* @throws ExecutionException
* If the command fails
*/
- public void enableLogLevel(String eventName, LogLevelType logLevelType,
- TraceLogLevel level, String filterExpression, IProgressMonitor monitor)
+ public void enableLogLevel(List<String> eventNames, LogLevelType logLevelType,
+ ITraceLogLevel level, String filterExpression,
+ TraceDomainType domain, IProgressMonitor monitor)
throws ExecutionException {
- getControlService().enableLogLevel(getName(), null, eventName,
- logLevelType, level, null, monitor);
+ getControlService().enableLogLevel(getName(), null, eventNames,
+ logLevelType, level, null, domain, monitor);
}
/**