1 /**********************************************************************
2 * Copyright (c) 2012 Ericsson
4 * All rights reserved. This program and the accompanying materials are
5 * made available under the terms of the Eclipse Public License v1.0 which
6 * accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
10 * Bernd Hufmann - Initial API and implementation
11 **********************************************************************/
12 package org
.eclipse
.linuxtools
.internal
.lttng2
.ui
.views
.control
.service
;
14 import java
.util
.List
;
16 import org
.eclipse
.core
.commands
.ExecutionException
;
17 import org
.eclipse
.core
.runtime
.IProgressMonitor
;
18 import org
.eclipse
.linuxtools
.internal
.lttng2
.core
.control
.model
.IBaseEventInfo
;
19 import org
.eclipse
.linuxtools
.internal
.lttng2
.core
.control
.model
.IChannelInfo
;
20 import org
.eclipse
.linuxtools
.internal
.lttng2
.core
.control
.model
.ISessionInfo
;
21 import org
.eclipse
.linuxtools
.internal
.lttng2
.core
.control
.model
.IUstProviderInfo
;
22 import org
.eclipse
.linuxtools
.internal
.lttng2
.core
.control
.model
.LogLevelType
;
23 import org
.eclipse
.linuxtools
.internal
.lttng2
.core
.control
.model
.TraceLogLevel
;
28 * Interface for LTTng trace control command service.
31 * @author Bernd Hufmann
33 public interface ILttngControlService
{
36 * @return the version string.
38 public String
getVersion();
41 * Retrieves the existing sessions names from the node.
42 * @param monitor - a progress monitor
43 * @return an array with session names.
44 * @throws ExecutionException
46 public String
[] getSessionNames(IProgressMonitor monitor
) throws ExecutionException
;
49 * Retrieves the session information with the given name the node.
50 * @param sessionName - the session name
51 * @param monitor - a progress monitor
52 * @return session information
53 * @throws ExecutionException
55 public ISessionInfo
getSession(String sessionName
, IProgressMonitor monitor
) throws ExecutionException
;
58 * Retrieves the kernel provider information (i.e. the kernel events)
59 * @param monitor - a progress monitor
60 * @return the list of existing kernel events.
61 * @throws ExecutionException
63 public List
<IBaseEventInfo
> getKernelProvider(IProgressMonitor monitor
) throws ExecutionException
;
66 * Retrieves the UST provider information from the node.
67 * @return - the UST provider information.
68 * @throws ExecutionException
70 public List
<IUstProviderInfo
> getUstProvider() throws ExecutionException
;
72 * Retrieves the UST provider information from the node.
73 * @param monitor - a progress monitor
74 * @return the UST provider information.
75 * @throws ExecutionException
77 public List
<IUstProviderInfo
> getUstProvider(IProgressMonitor monitor
) throws ExecutionException
;
80 * Creates a session with given session name and location.
81 * @param sessionName - a session name to create
82 * @param sessionPath - a path for storing the traces (use null for default)
83 * @param monitor - a progress monitor
84 * @return the session information
85 * @throws ExecutionException
87 public ISessionInfo
createSession(String sessionName
, String sessionPath
, IProgressMonitor monitor
) throws ExecutionException
;
90 * Destroys a session with given session name.
91 * @param sessionName - a session name to destroy
92 * @param monitor - a progress monitor
93 * @throws ExecutionException
95 public void destroySession(String sessionName
, IProgressMonitor monitor
) throws ExecutionException
;
98 * Starts a session with given session name.
99 * @param sessionName - a session name to start
100 * @param monitor - a progress monitor
101 * @throws ExecutionException
103 public void startSession(String sessionName
, IProgressMonitor monitor
) throws ExecutionException
;
106 * Stops a session with given session name.
107 * @param sessionName - a session name to stop
108 * @param monitor - a progress monitor
109 * @throws ExecutionException
111 public void stopSession(String sessionName
, IProgressMonitor monitor
) throws ExecutionException
;
115 * Enables a list of channels for given session and given channel information (configuration).
116 * @param sessionName - a session name to create
117 * @param channelNames - a list of channel names to be enabled
118 * @param isKernel - a flag to indicate Kernel or UST (true for Kernel, false for UST)
119 * @param info - channel information used for creation of a channel (or null for default)
120 * @param monitor - a progress monitor
121 * @throws ExecutionException
123 public void enableChannels(String sessionName
, List
<String
> channelNames
, boolean isKernel
, IChannelInfo info
, IProgressMonitor monitor
) throws ExecutionException
;
126 * Disables a list of channels for given session and given channel information (configuration).
127 * @param sessionName - a session name to create
128 * @param channelNames - a list of channel names to be enabled
129 * @param isKernel - a flag to indicate Kernel or UST (true for Kernel, false for UST)
130 * @param monitor - a progress monitor
131 * @throws ExecutionException
133 public void disableChannels(String sessionName
, List
<String
> channelNames
, boolean isKernel
, IProgressMonitor monitor
) throws ExecutionException
;
136 * Enables a list of events with no additional parameters.
137 * @param sessionName - a session name
138 * @param channelName - a channel name or null for default channel
139 * @param eventNames - a list of event names to be enabled, or null (list of size = 0)for all events .
140 * @param isKernel - a flag for indicating kernel or UST.
141 * @param monitor - a progress monitor
142 * @throws ExecutionException
144 public void enableEvents(String sessionName
, String channelName
, List
<String
> eventNames
, boolean isKernel
, IProgressMonitor monitor
) throws ExecutionException
;
147 * Enables all syscall events.
148 * @param sessionName - a session name
149 * @param channelName - a channel name or null for default channel
150 * @param monitor - a progress monitor
151 * @throws ExecutionException
153 public void enableSyscalls(String sessionName
, String channelName
, IProgressMonitor monitor
) throws ExecutionException
;
156 * Enables a dynamic probe or dynamic function entry/return probe.
157 * @param sessionName - a session name
158 * @param channelName - a channel name or null for default channel
159 * @param eventName - a event name
160 * @param isFunction - true for dynamic function entry/return probe else false
161 * @param probe - a dynamic probe information
162 * @param monitor - a progress monitor
163 * @throws ExecutionException
165 public void enableProbe(String sessionName
, String channelName
, String eventName
, boolean isFunction
, String probe
, IProgressMonitor monitor
) throws ExecutionException
;
168 * Enables events using log level
169 * @param sessionName - a session name
170 * @param channelName - a channel name (null for default channel)
171 * @param eventName - a event name
172 * @param logLevelType - a log level type
173 * @param level - a log level
174 * @param monitor - a progress monitor
175 * @throws ExecutionException
177 public void enableLogLevel(String sessionName
, String channelName
, String eventName
, LogLevelType logLevelType
, TraceLogLevel level
, IProgressMonitor monitor
) throws ExecutionException
;
180 * Disables a list of events with no additional parameters.
181 * @param sessionName - a session name
182 * @param channelName - a channel name (null for default channel)
183 * @param eventNames - a list of event names to enabled.
184 * @param isKernel - a flag for indicating kernel or UST.
185 * @param monitor - a progress monitor
186 * @throws ExecutionException
188 public void disableEvent(String sessionName
, String channelName
, List
<String
> eventNames
, boolean isKernel
, IProgressMonitor monitor
) throws ExecutionException
;
191 * Gets all available context names to be added to channels/events.
193 * @return the list of available contexts
195 public List
<String
> getContextList(IProgressMonitor monitor
) throws ExecutionException
;
198 * Add contexts to given channels and or events
199 * @param sessionName - a session name
200 * @param channelName - a channel name (null for all channels)
201 * @param eventName - a event name (null for all events)
202 * @param isKernel - a flag for indicating kernel or UST.
203 * @param contexts - a list of name of contexts to add
204 * @param monitor - a progress monitor
205 * @throws ExecutionException
207 public void addContexts(String sessionName
, String channelName
, String eventName
, boolean isKernel
, List
<String
> contexts
, IProgressMonitor monitor
) throws ExecutionException
;
210 * Executes calibrate command to quantify LTTng overhead.
211 * @param isKernel - a flag for indicating kernel or UST.
212 * @param monitor - a progress monitor
213 * @throws ExecutionException
215 public void calibrate(boolean isKernel
, IProgressMonitor monitor
) throws ExecutionException
;