Add support for filter feature of LTTng Tools 2.1
[deliverable/tracecompass.git] / org.eclipse.linuxtools.lttng2.ui / src / org / eclipse / linuxtools / internal / lttng2 / ui / views / control / service / ILttngControlService.java
CommitLineData
eb1bab5b
BH
1/**********************************************************************
2 * Copyright (c) 2012 Ericsson
cfdb727a 3 *
eb1bab5b
BH
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
cfdb727a
AM
8 *
9 * Contributors:
eb1bab5b
BH
10 * Bernd Hufmann - Initial API and implementation
11 **********************************************************************/
115b4a01 12package org.eclipse.linuxtools.internal.lttng2.ui.views.control.service;
eb1bab5b
BH
13
14import java.util.List;
15
16import org.eclipse.core.commands.ExecutionException;
17import org.eclipse.core.runtime.IProgressMonitor;
9315aeee
BH
18import org.eclipse.linuxtools.internal.lttng2.core.control.model.IBaseEventInfo;
19import org.eclipse.linuxtools.internal.lttng2.core.control.model.IChannelInfo;
20import org.eclipse.linuxtools.internal.lttng2.core.control.model.ISessionInfo;
21import org.eclipse.linuxtools.internal.lttng2.core.control.model.IUstProviderInfo;
22import org.eclipse.linuxtools.internal.lttng2.core.control.model.LogLevelType;
23import org.eclipse.linuxtools.internal.lttng2.core.control.model.TraceLogLevel;
eb1bab5b
BH
24
25
dbd4432d 26/**
eb1bab5b 27* <p>
cfdb727a 28* Interface for LTTng trace control command service.
eb1bab5b 29* </p>
cfdb727a 30*
dbd4432d 31* @author Bernd Hufmann
eb1bab5b
BH
32*/
33public interface ILttngControlService {
276c17e7
BH
34
35 /**
36 * @return the version string.
37 */
38 public String getVersion();
39
d4514365
BH
40 /**
41 * Checks if given version is supported by this ILTTngControlService implementation.
42 *
43 * @param version The version to check
44 * @return <code>true</code> if version is supported else <code>false</code>
45 */
46 public boolean isVersionSupported(String version);
47
eb1bab5b
BH
48 /**
49 * Retrieves the existing sessions names from the node.
cfdb727a
AM
50 *
51 * @param monitor
52 * - a progress monitor
eb1bab5b
BH
53 * @return an array with session names.
54 * @throws ExecutionException
cfdb727a 55 * If the command fails
eb1bab5b 56 */
cfdb727a
AM
57 public String[] getSessionNames(IProgressMonitor monitor)
58 throws ExecutionException;
59
eb1bab5b
BH
60 /**
61 * Retrieves the session information with the given name the node.
cfdb727a
AM
62 *
63 * @param sessionName
64 * - the session name
65 * @param monitor
66 * - a progress monitor
eb1bab5b
BH
67 * @return session information
68 * @throws ExecutionException
cfdb727a
AM
69 * If the command fails
70 */
71 public ISessionInfo getSession(String sessionName, IProgressMonitor monitor)
72 throws ExecutionException;
73
eb1bab5b
BH
74 /**
75 * Retrieves the kernel provider information (i.e. the kernel events)
cfdb727a
AM
76 *
77 * @param monitor
78 * - a progress monitor
eb1bab5b
BH
79 * @return the list of existing kernel events.
80 * @throws ExecutionException
cfdb727a 81 * If the command fails
eb1bab5b 82 */
cfdb727a
AM
83 public List<IBaseEventInfo> getKernelProvider(IProgressMonitor monitor)
84 throws ExecutionException;
85
eb1bab5b
BH
86 /**
87 * Retrieves the UST provider information from the node.
cfdb727a 88 *
eb1bab5b
BH
89 * @return - the UST provider information.
90 * @throws ExecutionException
cfdb727a 91 * If the command fails
eb1bab5b
BH
92 */
93 public List<IUstProviderInfo> getUstProvider() throws ExecutionException;
cfdb727a 94
eb1bab5b
BH
95 /**
96 * Retrieves the UST provider information from the node.
cfdb727a
AM
97 *
98 * @param monitor
99 * - a progress monitor
bbb3538a 100 * @return the UST provider information.
eb1bab5b 101 * @throws ExecutionException
cfdb727a 102 * If the command fails
eb1bab5b 103 */
cfdb727a
AM
104 public List<IUstProviderInfo> getUstProvider(IProgressMonitor monitor)
105 throws ExecutionException;
106
bbb3538a
BH
107 /**
108 * Creates a session with given session name and location.
cfdb727a
AM
109 *
110 * @param sessionName
111 * - a session name to create
112 * @param sessionPath
113 * - a path for storing the traces (use null for default)
114 * @param monitor
115 * - a progress monitor
bbb3538a
BH
116 * @return the session information
117 * @throws ExecutionException
cfdb727a 118 * If the command fails
bbb3538a 119 */
cfdb727a
AM
120 public ISessionInfo createSession(String sessionName, String sessionPath,
121 IProgressMonitor monitor) throws ExecutionException;
122
bbb3538a 123 /**
cfdb727a
AM
124 * Destroys a session with given session name.
125 *
126 * @param sessionName
127 * - a session name to destroy
128 * @param monitor
129 * - a progress monitor
bbb3538a 130 * @throws ExecutionException
cfdb727a 131 * If the command fails
bbb3538a 132 */
cfdb727a
AM
133 public void destroySession(String sessionName, IProgressMonitor monitor)
134 throws ExecutionException;
bbb3538a
BH
135
136 /**
cfdb727a
AM
137 * Starts a session with given session name.
138 *
139 * @param sessionName
140 * - a session name to start
141 * @param monitor
142 * - a progress monitor
bbb3538a 143 * @throws ExecutionException
cfdb727a
AM
144 * If the command fails
145 */
146 public void startSession(String sessionName, IProgressMonitor monitor)
147 throws ExecutionException;
bbb3538a 148
cfdb727a
AM
149 /**
150 * Stops a session with given session name.
151 *
152 * @param sessionName
153 * - a session name to stop
154 * @param monitor
155 * - a progress monitor
156 * @throws ExecutionException
157 * If the command fails
158 */
159 public void stopSession(String sessionName, IProgressMonitor monitor)
160 throws ExecutionException;
bbb3538a 161
cfdb727a
AM
162 /**
163 * Enables a list of channels for given session and given channel
164 * information (configuration).
165 *
166 * @param sessionName
167 * - a session name to create
168 * @param channelNames
169 * - a list of channel names to be enabled
170 * @param isKernel
171 * - a flag to indicate Kernel or UST (true for Kernel, false for
172 * UST)
173 * @param info
174 * - channel information used for creation of a channel (or null
175 * for default)
176 * @param monitor
177 * - a progress monitor
178 * @throws ExecutionException
179 * If the command fails
180 */
181 public void enableChannels(String sessionName, List<String> channelNames,
182 boolean isKernel, IChannelInfo info, IProgressMonitor monitor)
183 throws ExecutionException;
bbb3538a 184
cfdb727a
AM
185 /**
186 * Disables a list of channels for given session and given channel
187 * information (configuration).
188 *
189 * @param sessionName
190 * - a session name to create
191 * @param channelNames
192 * - a list of channel names to be enabled
193 * @param isKernel
194 * - a flag to indicate Kernel or UST (true for Kernel, false for
195 * UST)
196 * @param monitor
197 * - a progress monitor
198 * @throws ExecutionException
199 * If the command fails
200 */
201 public void disableChannels(String sessionName, List<String> channelNames,
202 boolean isKernel, IProgressMonitor monitor)
203 throws ExecutionException;
6503ae0f
BH
204
205 /**
206 * Enables a list of events with no additional parameters.
cfdb727a
AM
207 *
208 * @param sessionName
209 * - a session name
210 * @param channelName
211 * - a channel name or null for default channel
212 * @param eventNames
213 * - a list of event names to be enabled, or null (list of size =
214 * 0)for all events .
215 * @param isKernel
216 * - a flag for indicating kernel or UST.
d4514365
BH
217 * @param filterExpression
218 * - a filter expression
cfdb727a
AM
219 * @param monitor
220 * - a progress monitor
6503ae0f 221 * @throws ExecutionException
cfdb727a 222 * If the command fails
6503ae0f 223 */
cfdb727a 224 public void enableEvents(String sessionName, String channelName,
d4514365
BH
225 List<String> eventNames, boolean isKernel, String filterExpression,
226 IProgressMonitor monitor)
cfdb727a 227 throws ExecutionException;
498704b3 228
d4514365 229
498704b3
BH
230 /**
231 * Enables all syscall events.
cfdb727a
AM
232 *
233 * @param sessionName
234 * - a session name
235 * @param channelName
236 * - a channel name or null for default channel
237 * @param monitor
238 * - a progress monitor
498704b3 239 * @throws ExecutionException
cfdb727a 240 * If the command fails
498704b3 241 */
cfdb727a
AM
242 public void enableSyscalls(String sessionName, String channelName,
243 IProgressMonitor monitor) throws ExecutionException;
498704b3
BH
244
245 /**
d132bcc7 246 * Enables a dynamic probe or dynamic function entry/return probe.
cfdb727a
AM
247 *
248 * @param sessionName
249 * - a session name
250 * @param channelName
251 * - a channel name or null for default channel
252 * @param eventName
253 * - a event name
254 * @param isFunction
255 * - true for dynamic function entry/return probe else false
256 * @param probe
257 * - a dynamic probe information
258 * @param monitor
259 * - a progress monitor
498704b3 260 * @throws ExecutionException
cfdb727a 261 * If the command fails
498704b3 262 */
cfdb727a
AM
263 public void enableProbe(String sessionName, String channelName,
264 String eventName, boolean isFunction, String probe,
265 IProgressMonitor monitor) throws ExecutionException;
498704b3 266
ccc66d01
BH
267 /**
268 * Enables events using log level
cfdb727a
AM
269 *
270 * @param sessionName
271 * - a session name
272 * @param channelName
273 * - a channel name (null for default channel)
274 * @param eventName
275 * - a event name
276 * @param logLevelType
277 * - a log level type
278 * @param level
279 * - a log level
d4514365
BH
280 * @param filterExpression
281 * - a filter expression
cfdb727a
AM
282 * @param monitor
283 * - a progress monitor
ccc66d01 284 * @throws ExecutionException
cfdb727a 285 * If the command fails
ccc66d01 286 */
cfdb727a
AM
287 public void enableLogLevel(String sessionName, String channelName,
288 String eventName, LogLevelType logLevelType, TraceLogLevel level,
d4514365 289 String filterExpression,
cfdb727a
AM
290 IProgressMonitor monitor) throws ExecutionException;
291
6503ae0f
BH
292 /**
293 * Disables a list of events with no additional parameters.
cfdb727a
AM
294 *
295 * @param sessionName
296 * - a session name
297 * @param channelName
298 * - a channel name (null for default channel)
299 * @param eventNames
300 * - a list of event names to enabled.
301 * @param isKernel
302 * - a flag for indicating kernel or UST.
303 * @param monitor
304 * - a progress monitor
6503ae0f 305 * @throws ExecutionException
cfdb727a 306 * If the command fails
6503ae0f 307 */
cfdb727a
AM
308 public void disableEvent(String sessionName, String channelName,
309 List<String> eventNames, boolean isKernel, IProgressMonitor monitor)
310 throws ExecutionException;
311
b793fbe1
BH
312 /**
313 * Gets all available context names to be added to channels/events.
cfdb727a 314 *
b793fbe1 315 * @param monitor
cfdb727a 316 * The progress monitor
b793fbe1 317 * @return the list of available contexts
cfdb727a
AM
318 * @throws ExecutionException
319 * If the command fails
b793fbe1 320 */
cfdb727a
AM
321 public List<String> getContextList(IProgressMonitor monitor)
322 throws ExecutionException;
323
b793fbe1
BH
324 /**
325 * Add contexts to given channels and or events
cfdb727a
AM
326 *
327 * @param sessionName
328 * - a session name
329 * @param channelName
330 * - a channel name (null for all channels)
331 * @param eventName
332 * - a event name (null for all events)
333 * @param isKernel
334 * - a flag for indicating kernel or UST.
335 * @param contexts
336 * - a list of name of contexts to add
337 * @param monitor
338 * - a progress monitor
b793fbe1 339 * @throws ExecutionException
cfdb727a 340 * If the command fails
b793fbe1 341 */
cfdb727a
AM
342 public void addContexts(String sessionName, String channelName,
343 String eventName, boolean isKernel, List<String> contexts,
344 IProgressMonitor monitor) throws ExecutionException;
345
b720ac44
BH
346 /**
347 * Executes calibrate command to quantify LTTng overhead.
cfdb727a
AM
348 *
349 * @param isKernel
350 * - a flag for indicating kernel or UST.
351 * @param monitor
352 * - a progress monitor
b720ac44 353 * @throws ExecutionException
cfdb727a 354 * If the command fails
b720ac44 355 */
cfdb727a
AM
356 public void calibrate(boolean isKernel, IProgressMonitor monitor)
357 throws ExecutionException;
eb1bab5b 358}
This page took 0.05057 seconds and 5 git commands to generate.