Source:
public void enableChannels(String sessionName, List<String> channelNames, boolean isKernel, IChannelInfo info, IProgressMonitor monitor) throws ExecutionException { if (channelNames.isEmpty()) { return; } StringBuffer command = createCommand(LTTngControlServiceConstants.COMMAND_ENABLE_CHANNEL); for (Iterator<String> iterator = channelNames.iterator(); iterator.hasNext();) { String channel = iterator.next(); command.append(channel); if (iterator.hasNext()) { command.append(','); } } if (isKernel) { command.append(LTTngControlServiceConstants.OPTION_KERNEL); } else { command.append(LTTngControlServiceConstants.OPTION_UST); } String newSessionName = formatParameter(sessionName); command.append(LTTngControlServiceConstants.OPTION_SESSION); command.append(newSessionName); if (info != null) { if (info.isOverwriteMode()) { command.append(LTTngControlServiceConstants.OPTION_OVERWRITE); } command.append(LTTngControlServiceConstants.OPTION_SUB_BUFFER_SIZE); command.append(String.valueOf(info.getSubBufferSize())); command.append(LTTngControlServiceConstants.OPTION_NUM_SUB_BUFFERS); command.append(String.valueOf(info.getNumberOfSubBuffers())); command.append(LTTngControlServiceConstants.OPTION_SWITCH_TIMER); command.append(String.valueOf(info.getSwitchTimer())); command.append(LTTngControlServiceConstants.OPTION_READ_TIMER); command.append(String.valueOf(info.getReadTimer())); if(!isKernel && info.isBuffersUID()){ command.append(LTTngControlServiceConstants.OPTION_PER_UID_BUFFERS); } command.append(LTTngControlServiceConstants.OPTION_MAX_SIZE_TRACE_FILES); command.append(String.valueOf(info.getMaxSizeTraceFiles())); command.append(LTTngControlServiceConstants.OPTION_MAX_TRACE_FILES); command.append(String.valueOf(info.getMaxNumberTraceFiles())); } executeCommand(command.toString(), monitor); }

Target:
public void enableChannels(String sessionName, List<String> channelNames, boolean isKernel, IChannelInfo info, IProgressMonitor monitor) throws ExecutionException { if (channelNames.isEmpty()) { return; } StringBuffer command = createCommand(LTTngControlServiceConstants.COMMAND_ENABLE_CHANNEL); for (Iterator<String> iterator = channelNames.iterator(); iterator.hasNext();) { String channel = iterator.next(); command.append(channel); if (iterator.hasNext()) { command.append(','); } } if (isKernel) { command.append(LTTngControlServiceConstants.OPTION_KERNEL); } else { command.append(LTTngControlServiceConstants.OPTION_UST); } String newSessionName = formatParameter(sessionName); command.append(LTTngControlServiceConstants.OPTION_SESSION); command.append(newSessionName); if (info != null) { if (info.isOverwriteMode()) { command.append(LTTngControlServiceConstants.OPTION_OVERWRITE); } command.append(LTTngControlServiceConstants.OPTION_SUB_BUFFER_SIZE); command.append(String.valueOf(info.getSubBufferSize())); command.append(LTTngControlServiceConstants.OPTION_NUM_SUB_BUFFERS); command.append(String.valueOf(info.getNumberOfSubBuffers())); command.append(LTTngControlServiceConstants.OPTION_SWITCH_TIMER); command.append(String.valueOf(info.getSwitchTimer())); command.append(LTTngControlServiceConstants.OPTION_READ_TIMER); command.append(String.valueOf(info.getReadTimer())); if (isVersionSupported("2.2.0")) { if (!isKernel && info.isBuffersUID()) { command.append(LTTngControlServiceConstants.OPTION_PER_UID_BUFFERS); } command.append(LTTngControlServiceConstants.OPTION_MAX_SIZE_TRACE_FILES); command.append(String.valueOf(info.getMaxSizeTraceFiles())); command.append(LTTngControlServiceConstants.OPTION_MAX_TRACE_FILES); command.append(String.valueOf(info.getMaxNumberTraceFiles())); } } executeCommand(command.toString(), monitor); }