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
;
26 /** <b><u>ILttngControlService</u></b>
28 * Interface for LTTng trace control command service.
31 public interface ILttngControlService
{
34 * @return the version string.
36 public String
getVersion();
39 * Retrieves the existing sessions names from the node.
40 * @param monitor - a progress monitor
41 * @return an array with session names.
42 * @throws ExecutionException
44 public String
[] getSessionNames(IProgressMonitor monitor
) throws ExecutionException
;
47 * Retrieves the session information with the given name the node.
48 * @param sessionName - the session name
49 * @param monitor - a progress monitor
50 * @return session information
51 * @throws ExecutionException
53 public ISessionInfo
getSession(String sessionName
, IProgressMonitor monitor
) throws ExecutionException
;
56 * Retrieves the kernel provider information (i.e. the kernel events)
57 * @param monitor - a progress monitor
58 * @return the list of existing kernel events.
59 * @throws ExecutionException
61 public List
<IBaseEventInfo
> getKernelProvider(IProgressMonitor monitor
) throws ExecutionException
;
64 * Retrieves the UST provider information from the node.
65 * @return - the UST provider information.
66 * @throws ExecutionException
68 public List
<IUstProviderInfo
> getUstProvider() throws ExecutionException
;
70 * Retrieves the UST provider information from the node.
71 * @param monitor - a progress monitor
72 * @return the UST provider information.
73 * @throws ExecutionException
75 public List
<IUstProviderInfo
> getUstProvider(IProgressMonitor monitor
) throws ExecutionException
;
78 * Creates a session with given session name and location.
79 * @param sessionName - a session name to create
80 * @param sessionPath - a path for storing the traces (use null for default)
81 * @param monitor - a progress monitor
82 * @return the session information
83 * @throws ExecutionException
85 public ISessionInfo
createSession(String sessionName
, String sessionPath
, IProgressMonitor monitor
) throws ExecutionException
;
88 * Destroys a session with given session name.
89 * @param sessionName - a session name to destroy
90 * @param monitor - a progress monitor
91 * @throws ExecutionException
93 public void destroySession(String sessionName
, IProgressMonitor monitor
) throws ExecutionException
;
96 * Starts a session with given session name.
97 * @param sessionName - a session name to start
98 * @param monitor - a progress monitor
99 * @throws ExecutionException
101 public void startSession(String sessionName
, IProgressMonitor monitor
) throws ExecutionException
;
104 * Stops a session with given session name.
105 * @param sessionName - a session name to stop
106 * @param monitor - a progress monitor
107 * @throws ExecutionException
109 public void stopSession(String sessionName
, IProgressMonitor monitor
) throws ExecutionException
;
113 * Enables a list of channels for given session and given channel information (configuration).
114 * @param sessionName - a session name to create
115 * @param channelNames - a list of channel names to be enabled
116 * @param isKernel - a flag to indicate Kernel or UST (true for Kernel, false for UST)
117 * @param info - channel information used for creation of a channel (or null for default)
118 * @param monitor - a progress monitor
119 * @throws ExecutionException
121 public void enableChannels(String sessionName
, List
<String
> channelNames
, boolean isKernel
, IChannelInfo info
, IProgressMonitor monitor
) throws ExecutionException
;
124 * Disables a list of channels for given session and given channel information (configuration).
125 * @param sessionName - a session name to create
126 * @param channelNames - a list of channel names to be enabled
127 * @param isKernel - a flag to indicate Kernel or UST (true for Kernel, false for UST)
128 * @param monitor - a progress monitor
129 * @throws ExecutionException
131 public void disableChannels(String sessionName
, List
<String
> channelNames
, boolean isKernel
, IProgressMonitor monitor
) throws ExecutionException
;
134 * Enables a list of events with no additional parameters.
135 * @param sessionName - a session name
136 * @param channelName - a channel name or null for default channel
137 * @param eventNames - a list of event names to be enabled, or null (list of size = 0)for all events .
138 * @param isKernel - a flag for indicating kernel or UST.
139 * @param monitor - a progress monitor
140 * @throws ExecutionException
142 public void enableEvents(String sessionName
, String channelName
, List
<String
> eventNames
, boolean isKernel
, IProgressMonitor monitor
) throws ExecutionException
;
145 * Enables all syscall events.
146 * @param sessionName - a session name
147 * @param channelName - a channel name or null for default channel
148 * @param monitor - a progress monitor
149 * @throws ExecutionException
151 public void enableSyscalls(String sessionName
, String channelName
, IProgressMonitor monitor
) throws ExecutionException
;
154 * Enables a dynamic probe or dynamic function entry/return probe.
155 * @param sessionName - a session name
156 * @param channelName - a channel name or null for default channel
157 * @param eventName - a event name
158 * @param isFunction - true for dynamic function entry/return probe else false
159 * @param probe - a dynamic probe information
160 * @param monitor - a progress monitor
161 * @throws ExecutionException
163 public void enableProbe(String sessionName
, String channelName
, String eventName
, boolean isFunction
, String probe
, IProgressMonitor monitor
) throws ExecutionException
;
166 * Enables events using log level
167 * @param sessionName - a session name
168 * @param channelName - a channel name (null for default channel)
169 * @param eventName - a event name
170 * @param logLevelType - a log level type
171 * @param level - a log level
172 * @param monitor - a progress monitor
173 * @throws ExecutionException
175 public void enableLogLevel(String sessionName
, String channelName
, String eventName
, LogLevelType logLevelType
, TraceLogLevel level
, IProgressMonitor monitor
) throws ExecutionException
;
178 * Disables a list of events with no additional parameters.
179 * @param sessionName - a session name
180 * @param channelName - a channel name (null for default channel)
181 * @param eventNames - a list of event names to enabled.
182 * @param isKernel - a flag for indicating kernel or UST.
183 * @param monitor - a progress monitor
184 * @throws ExecutionException
186 public void disableEvent(String sessionName
, String channelName
, List
<String
> eventNames
, boolean isKernel
, IProgressMonitor monitor
) throws ExecutionException
;
189 * Gets all available context names to be added to channels/events.
191 * @return the list of available contexts
193 public List
<String
> getContextList(IProgressMonitor monitor
) throws ExecutionException
;
196 * Add contexts to given channels and or events
197 * @param sessionName - a session name
198 * @param channelName - a channel name (null for all channels)
199 * @param eventName - a event name (null for all events)
200 * @param isKernel - a flag for indicating kernel or UST.
201 * @param contexts - a list of name of contexts to add
202 * @param monitor - a progress monitor
203 * @throws ExecutionException
205 public void addContexts(String sessionName
, String channelName
, String eventName
, boolean isKernel
, List
<String
> contexts
, IProgressMonitor monitor
) throws ExecutionException
;
208 * Executes calibrate command to quantify LTTng overhead.
209 * @param isKernel - a flag for indicating kernel or UST.
210 * @param monitor - a progress monitor
211 * @throws ExecutionException
213 public void calibrate(boolean isKernel
, IProgressMonitor monitor
) throws ExecutionException
;