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
CommitLineData
eb1bab5b
BH
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 **********************************************************************/
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;
115b4a01
BH
18import org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.IBaseEventInfo;
19import org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.IChannelInfo;
20import org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.ISessionInfo;
21import org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.IUstProviderInfo;
22import org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.LogLevelType;
23import org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.TraceLogLevel;
eb1bab5b
BH
24
25
26/** <b><u>ILttngControlService</u></b>
27* <p>
28* Interface for LTTng trace control command service.
29* </p>
30*/
31public interface ILttngControlService {
276c17e7
BH
32
33 /**
34 * @return the version string.
35 */
36 public String getVersion();
37
eb1bab5b
BH
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
eb1bab5b
BH
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
eb1bab5b
BH
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
bbb3538a 72 * @return the UST provider information.
eb1bab5b
BH
73 * @throws ExecutionException
74 */
75 public List<IUstProviderInfo> getUstProvider(IProgressMonitor monitor) throws ExecutionException;
bbb3538a
BH
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
d132bcc7 115 * @param channelNames - a list of channel names to be enabled
bbb3538a
BH
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 */
498704b3 121 public void enableChannels(String sessionName, List<String> channelNames, boolean isKernel, IChannelInfo info, IProgressMonitor monitor) throws ExecutionException;
bbb3538a
BH
122
123 /**
124 * Disables a list of channels for given session and given channel information (configuration).
125 * @param sessionName - a session name to create
d132bcc7 126 * @param channelNames - a list of channel names to be enabled
bbb3538a
BH
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 */
498704b3 131 public void disableChannels(String sessionName, List<String> channelNames, boolean isKernel, IProgressMonitor monitor) throws ExecutionException;
6503ae0f
BH
132
133 /**
134 * Enables a list of events with no additional parameters.
135 * @param sessionName - a session name
d132bcc7
BH
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 .
6503ae0f
BH
138 * @param isKernel - a flag for indicating kernel or UST.
139 * @param monitor - a progress monitor
140 * @throws ExecutionException
141 */
498704b3
BH
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
d132bcc7 147 * @param channelName - a channel name or null for default channel
498704b3
BH
148 * @param monitor - a progress monitor
149 * @throws ExecutionException
150 */
151 public void enableSyscalls(String sessionName, String channelName, IProgressMonitor monitor) throws ExecutionException;
152
153 /**
d132bcc7 154 * Enables a dynamic probe or dynamic function entry/return probe.
498704b3 155 * @param sessionName - a session name
d132bcc7 156 * @param channelName - a channel name or null for default channel
498704b3 157 * @param eventName - a event name
d132bcc7 158 * @param isFunction - true for dynamic function entry/return probe else false
ccc66d01
BH
159 * @param probe - a dynamic probe information
160 * @param monitor - a progress monitor
498704b3
BH
161 * @throws ExecutionException
162 */
d132bcc7 163 public void enableProbe(String sessionName, String channelName, String eventName, boolean isFunction, String probe, IProgressMonitor monitor) throws ExecutionException;
498704b3 164
ccc66d01
BH
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
6503ae0f
BH
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;
b793fbe1
BH
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;
b720ac44
BH
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;
eb1bab5b 214}
This page took 0.045402 seconds and 5 git commands to generate.