8d65032c7dc1a6dce54217e65bbc7fb03cd57bfa
[deliverable/tracecompass.git] / org.eclipse.linuxtools.lttng2.ui / src / org / eclipse / linuxtools / internal / lttng2 / ui / views / control / service / ILttngControlService.java
1 /**********************************************************************
2 * Copyright (c) 2012 Ericsson
3 *
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
8 *
9 * Contributors:
10 * Bernd Hufmann - Initial API and implementation
11 **********************************************************************/
12 package org.eclipse.linuxtools.internal.lttng2.ui.views.control.service;
13
14 import java.util.List;
15
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;
24
25
26 /**
27 * <p>
28 * Interface for LTTng trace control command service.
29 * </p>
30 *
31 * @author Bernd Hufmann
32 */
33 public interface ILttngControlService {
34
35 /**
36 * @return the version string.
37 */
38 public String getVersion();
39
40 /**
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
45 */
46 public String[] getSessionNames(IProgressMonitor monitor) throws ExecutionException;
47
48 /**
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
54 */
55 public ISessionInfo getSession(String sessionName, IProgressMonitor monitor) throws ExecutionException;
56
57 /**
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
62 */
63 public List<IBaseEventInfo> getKernelProvider(IProgressMonitor monitor) throws ExecutionException;
64
65 /**
66 * Retrieves the UST provider information from the node.
67 * @return - the UST provider information.
68 * @throws ExecutionException
69 */
70 public List<IUstProviderInfo> getUstProvider() throws ExecutionException;
71 /**
72 * Retrieves the UST provider information from the node.
73 * @param monitor - a progress monitor
74 * @return the UST provider information.
75 * @throws ExecutionException
76 */
77 public List<IUstProviderInfo> getUstProvider(IProgressMonitor monitor) throws ExecutionException;
78
79 /**
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
86 */
87 public ISessionInfo createSession(String sessionName, String sessionPath, IProgressMonitor monitor) throws ExecutionException;
88
89 /**
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
94 */
95 public void destroySession(String sessionName, IProgressMonitor monitor) throws ExecutionException;
96
97 /**
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
102 */
103 public void startSession(String sessionName, IProgressMonitor monitor) throws ExecutionException;
104
105 /**
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
110 */
111 public void stopSession(String sessionName, IProgressMonitor monitor) throws ExecutionException;
112
113
114 /**
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
122 */
123 public void enableChannels(String sessionName, List<String> channelNames, boolean isKernel, IChannelInfo info, IProgressMonitor monitor) throws ExecutionException;
124
125 /**
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
132 */
133 public void disableChannels(String sessionName, List<String> channelNames, boolean isKernel, IProgressMonitor monitor) throws ExecutionException;
134
135 /**
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
143 */
144 public void enableEvents(String sessionName, String channelName, List<String> eventNames, boolean isKernel, IProgressMonitor monitor) throws ExecutionException;
145
146 /**
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
152 */
153 public void enableSyscalls(String sessionName, String channelName, IProgressMonitor monitor) throws ExecutionException;
154
155 /**
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
164 */
165 public void enableProbe(String sessionName, String channelName, String eventName, boolean isFunction, String probe, IProgressMonitor monitor) throws ExecutionException;
166
167 /**
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
176 */
177 public void enableLogLevel(String sessionName, String channelName, String eventName, LogLevelType logLevelType, TraceLogLevel level, IProgressMonitor monitor) throws ExecutionException;
178
179 /**
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
187 */
188 public void disableEvent(String sessionName, String channelName, List<String> eventNames, boolean isKernel, IProgressMonitor monitor) throws ExecutionException;
189
190 /**
191 * Gets all available context names to be added to channels/events.
192 * @param monitor
193 * @return the list of available contexts
194 */
195 public List<String> getContextList(IProgressMonitor monitor) throws ExecutionException;
196
197 /**
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
206 */
207 public void addContexts(String sessionName, String channelName, String eventName, boolean isKernel, List<String> contexts, IProgressMonitor monitor) throws ExecutionException;
208
209 /**
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
214 */
215 public void calibrate(boolean isKernel, IProgressMonitor monitor) throws ExecutionException;
216 }
This page took 0.041533 seconds and 4 git commands to generate.