control: command support for enabling all tracepoints/syscalls
[deliverable/tracecompass.git] / lttng / org.eclipse.tracecompass.lttng2.control.ui / src / org / eclipse / tracecompass / internal / lttng2 / control / ui / views / service / LTTngControlService.java
index 133c171e2fd20f698f839d51e9f13f93a48d6434..998db7eddfb8928f81a9c941eaa083fe51cef579 100644 (file)
@@ -68,7 +68,6 @@ import org.eclipse.tracecompass.tmf.remote.core.shell.ICommandShell;
  */
 public class LTTngControlService implements ILttngControlService {
 
-
     // ------------------------------------------------------------------------
     // Attributes
     // ------------------------------------------------------------------------
@@ -779,8 +778,9 @@ public class LTTngControlService implements ILttngControlService {
     public void enableEvents(String sessionName, String channelName, List<String> eventNames, boolean isKernel, String filterExpression, IProgressMonitor monitor) throws ExecutionException {
 
         ICommandInput command = createCommand(LTTngControlServiceConstants.COMMAND_ENABLE_EVENT);
+        boolean isAllEvents = ALL_EVENTS.equals(eventNames);
 
-        if (eventNames == null || eventNames.isEmpty()) {
+        if (isAllEvents || (eventNames == null) || (eventNames.isEmpty())) {
             command.add(LTTngControlServiceConstants.OPTION_ALL);
         } else {
             command.add(toCsv(eventNames));
@@ -800,7 +800,9 @@ public class LTTngControlService implements ILttngControlService {
             command.add(channelName);
         }
 
-        command.add(LTTngControlServiceConstants.OPTION_TRACEPOINT);
+        if (!isAllEvents) {
+            command.add(LTTngControlServiceConstants.OPTION_TRACEPOINT);
+        }
 
         if (filterExpression != null) {
             command.add(LTTngControlServiceConstants.OPTION_FILTER);
This page took 0.02456 seconds and 5 git commands to generate.