Add groundwork for multiple version support of LTTng 2.0 tracer control
[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.ui.views.control.model.IBaseEventInfo;
19 import org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.IChannelInfo;
20 import org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.ISessionInfo;
21 import org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.IUstProviderInfo;
22 import org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.LogLevelType;
23 import org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.TraceLogLevel;
24
25
26 /** <b><u>ILttngControlService</u></b>
27 * <p>
28 * Interface for LTTng trace control command service.
29 * </p>
30 */
31 public interface ILttngControlService {
32
33 /**
34 * @return the version string.
35 */
36 public String getVersion();
37
38 /**
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
43 */
44 public String[] getSessionNames(IProgressMonitor monitor) throws ExecutionException;
45
46 /**
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
52 */
53 public ISessionInfo getSession(String sessionName, IProgressMonitor monitor) throws ExecutionException;
54
55 /**
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
60 */
61 public List<IBaseEventInfo> getKernelProvider(IProgressMonitor monitor) throws ExecutionException;
62
63 /**
64 * Retrieves the UST provider information from the node.
65 * @return - the UST provider information.
66 * @throws ExecutionException
67 */
68 public List<IUstProviderInfo> getUstProvider() throws ExecutionException;
69 /**
70 * Retrieves the UST provider information from the node.
71 * @param monitor - a progress monitor
72 * @return the UST provider information.
73 * @throws ExecutionException
74 */
75 public List<IUstProviderInfo> getUstProvider(IProgressMonitor monitor) throws ExecutionException;
76
77 /**
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
84 */
85 public ISessionInfo createSession(String sessionName, String sessionPath, IProgressMonitor monitor) throws ExecutionException;
86
87 /**
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
92 */
93 public void destroySession(String sessionName, IProgressMonitor monitor) throws ExecutionException;
94
95 /**
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
100 */
101 public void startSession(String sessionName, IProgressMonitor monitor) throws ExecutionException;
102
103 /**
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
108 */
109 public void stopSession(String sessionName, IProgressMonitor monitor) throws ExecutionException;
110
111
112 /**
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
120 */
121 public void enableChannels(String sessionName, List<String> channelNames, boolean isKernel, IChannelInfo info, IProgressMonitor monitor) throws ExecutionException;
122
123 /**
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
130 */
131 public void disableChannels(String sessionName, List<String> channelNames, boolean isKernel, IProgressMonitor monitor) throws ExecutionException;
132
133 /**
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
141 */
142 public void enableEvents(String sessionName, String channelName, List<String> eventNames, boolean isKernel, IProgressMonitor monitor) throws ExecutionException;
143
144 /**
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
150 */
151 public void enableSyscalls(String sessionName, String channelName, IProgressMonitor monitor) throws ExecutionException;
152
153 /**
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
162 */
163 public void enableProbe(String sessionName, String channelName, String eventName, boolean isFunction, String probe, IProgressMonitor monitor) throws ExecutionException;
164
165 /**
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
174 */
175 public void enableLogLevel(String sessionName, String channelName, String eventName, LogLevelType logLevelType, TraceLogLevel level, IProgressMonitor monitor) throws ExecutionException;
176
177 /**
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
185 */
186 public void disableEvent(String sessionName, String channelName, List<String> eventNames, boolean isKernel, IProgressMonitor monitor) throws ExecutionException;
187
188 /**
189 * Gets all available context names to be added to channels/events.
190 * @param monitor
191 * @return the list of available contexts
192 */
193 public List<String> getContextList(IProgressMonitor monitor) throws ExecutionException;
194
195 /**
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
204 */
205 public void addContexts(String sessionName, String channelName, String eventName, boolean isKernel, List<String> contexts, IProgressMonitor monitor) throws ExecutionException;
206
207 /**
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
212 */
213 public void calibrate(boolean isKernel, IProgressMonitor monitor) throws ExecutionException;
214 }
This page took 0.049588 seconds and 5 git commands to generate.