Commit | Line | Data |
---|---|---|
0c9bad2e BH |
1 | /******************************************************************************* |
2 | * Copyright (c) 2010 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 | ||
6c13869b | 13 | package org.eclipse.linuxtools.lttng.core; |
b12f4544 FC |
14 | |
15 | /** | |
0c9bad2e BH |
16 | * <b><u>LttngConstants</u></b> |
17 | * <p> | |
18 | * Declaration of LTTng specific constants. | |
19 | * <p> | |
b12f4544 | 20 | */ |
e8d771d5 | 21 | @SuppressWarnings("nls") |
b12f4544 FC |
22 | public class LttngConstants { |
23 | ||
24 | /** | |
25 | * <h4>Number of bits of an integer to be used for statistic node identifier. </h4> | |
26 | */ | |
27 | public static final int STATS_ID_SHIFT = 28; | |
28 | /** | |
29 | * <h4>Maximum number of trace ids to be created, before wrapping around to 0. </h4> | |
30 | * Note that there is a tight coupling to STATS_ID_SHIFT, because the trace id is | |
31 | * also used for statistics node identification. | |
32 | */ | |
33 | public static final int MAX_NUMBER_OF_TRACES_ID = (1 << STATS_ID_SHIFT) - 1; | |
34 | public static final int STATS_ID_MASK = MAX_NUMBER_OF_TRACES_ID; | |
35 | ||
36 | /** | |
37 | * <h4>Statistic node identifier for unknown/none kernel submode. </h4> | |
38 | */ | |
39 | public static final int STATS_NONE_ID = 0x1 << STATS_ID_SHIFT; | |
40 | /** | |
41 | * <h4>Statistic node identifier for IRQ kernel submodes. </h4> | |
42 | */ | |
43 | public static final int STATS_IRQ_NAME_ID = 0x2 << STATS_ID_SHIFT; | |
44 | /** | |
45 | * <h4>Statistic node identifier for soft IRQ kernel submodes. </h4> | |
46 | */ | |
47 | public static final int STATS_SOFT_IRQ_NAME_ID = 0x3 << STATS_ID_SHIFT; | |
48 | /** | |
49 | * <h4>Statistic node identifier for sys_call kernel submodes.</h4> | |
50 | */ | |
51 | public static final int STATS_SYS_CALL_NAME_ID = 0x4 << STATS_ID_SHIFT; | |
52 | /** | |
53 | * <h4>Statistic node identifier for trab kernel submodes. </h4> | |
54 | */ | |
55 | public static final int STATS_TRAP_NAME_ID = 0x5 << STATS_ID_SHIFT; | |
56 | /** | |
57 | * <h4>Statistic node identifier for the trace. </h4> | |
58 | */ | |
59 | public static final int STATS_TRACE_NAME_ID = 0x6 << STATS_ID_SHIFT; | |
60 | /** | |
61 | * <h4>Statistic node identifier for the CPU IDs. </h4> | |
62 | */ | |
63 | public static final int STATS_CPU_ID = 0x7 << STATS_ID_SHIFT; | |
64 | /** | |
65 | * <h4>Statistic node identifier for the kernel modes. </h4> | |
66 | */ | |
67 | public static final int STATS_MODE_ID = 0x8 << STATS_ID_SHIFT; | |
68 | /** | |
69 | * <h4>Statistic node identifier for the kernel function IDs. </h4> | |
70 | */ | |
71 | public static final int STATS_FUNCTION_ID = 0x9 << STATS_ID_SHIFT; | |
72 | /** | |
73 | * <h4>Statistic node identifier for the process IDs. </h4> | |
74 | */ | |
75 | public static final int STATS_PROCESS_ID = 0xA << STATS_ID_SHIFT; | |
76 | /** | |
77 | * <h4>Statistic node identifier for the event types. </h4> | |
78 | */ | |
79 | public static final int STATS_TYPE_ID = 0xB << STATS_ID_SHIFT; | |
80 | /** | |
81 | * <h4>Statistic node identifier for the event types. </h4> | |
82 | */ | |
83 | public static final int STATS_CATEGORY_ID = 0xC << STATS_ID_SHIFT; | |
8016d660 FC |
84 | /** |
85 | * <h4>Background requests block size </h4> | |
86 | */ | |
87 | public static final int DEFAULT_BLOCK_SIZE = 50000; | |
e8d771d5 BH |
88 | |
89 | /* | |
90 | * LTTng Trace Control Constants | |
91 | */ | |
92 | ||
93 | /** | |
94 | * <h4>Kernel Provider name.</h4> | |
95 | */ | |
96 | public static final String Lttng_Provider_Kernel = "kernel"; | |
97 | /** | |
98 | * <h4>UST provider name.</h4> | |
99 | */ | |
100 | public static final String Lttng_Provider_Ust = "ust"; | |
101 | /** | |
102 | * <h4>LTTng trace control command name.</h4> | |
103 | */ | |
104 | public static final String Lttng_Control_Command = "ltt_control"; | |
105 | /** | |
106 | * <h4>LTTng trace control command to get providers.</h4> | |
107 | */ | |
108 | public static final String Lttng_Control_GetProviders = "getProviders"; | |
109 | /** | |
110 | * <h4>LTTng trace control command to get targets.</h4> | |
111 | */ | |
112 | public static final String Lttng_Control_GetTargets = "getTargets"; | |
113 | /** | |
114 | * <h4>LTTng trace control command to get markers.</h4> | |
115 | */ | |
116 | public static final String Lttng_Control_GetMarkers = "getMarkers"; | |
117 | /** | |
118 | * <h4>LTTng trace control command to get traces.</h4> | |
119 | */ | |
120 | public static final String Lttng_Control_GetTraces = "getTraces"; | |
121 | /** | |
122 | * <h4>LTTng trace control command to get active traces.</h4> | |
123 | */ | |
124 | public static final String Lttng_Control_GetActiveTraces = "getActiveTraces"; | |
125 | /** | |
126 | * <h4>LTTng trace control command to get information about a active trace.</h4> | |
127 | */ | |
128 | public static final String Lttng_Control_GetActiveTraceInfo = "getActiveTraceInfo"; | |
129 | /** | |
130 | * <h4>LTTng trace control command get all available channels.</h4> | |
131 | */ | |
132 | public static final String Lttng_Control_GetChannels = "getChannels"; | |
133 | /** | |
134 | * <h4>LTTng trace control command to setup a trace.</h4> | |
135 | */ | |
136 | public static final String Lttng_Control_SetupTrace = "setupTrace"; | |
137 | /** | |
138 | * <h4>LTTng trace control command to set the trace transport.</h4> | |
139 | */ | |
140 | public static final String Lttng_Control_SetupTraceTransport = "setTraceTransport"; | |
141 | /** | |
142 | * <h4>LTTng trace control command to get information about a marker.</h4> | |
143 | */ | |
144 | public static final String Lttng_Control_GetMarkerInfo = "getMarkerInfo"; | |
145 | /** | |
146 | * <h4>LTTng trace control command to enable/disable a marker.</h4> | |
147 | */ | |
148 | public static final String Lttng_Control_SetMarkerEnable = "setMarkerEnable"; | |
149 | /** | |
150 | * <h4>LTTng trace control command to enable/disable a channel.</h4> | |
151 | */ | |
152 | public static final String Lttng_Control_SetChannelEnable = "setChannelEnable"; | |
153 | /** | |
154 | * <h4>LTTng trace control command to enable/disable channel buffer overwrite.</h4> | |
155 | */ | |
156 | public static final String Lttng_Control_SetChannelOverwrite = "setChannelOverwrite"; | |
157 | /** | |
158 | * <h4>LTTng trace control command to the channel timer.</h4> | |
159 | */ | |
160 | public static final String Lttng_Control_SetChannelTimer = "setChannelTimer"; | |
161 | /** | |
162 | * <h4>LTTng trace control command to set the number of sub-buffers of a channel.</h4> | |
163 | */ | |
164 | public static final String Lttng_Control_SetChannelSubbufNum = "setChannelSubbufNum"; | |
165 | /** | |
166 | * <h4>LTTng trace control command to set the sub-buffer size of a channel.</h4> | |
167 | */ | |
168 | public static final String Lttng_Control_SetChannelSubbufSize = "setChannelSubbufSize"; | |
169 | /** | |
170 | * <h4>LTTng trace control command to allocate trace resources.</h4> | |
171 | */ | |
172 | public static final String Lttng_Control_AllocTrace = "allocTrace"; | |
173 | /** | |
174 | * <h4>LTTng trace control command to configure a trace local trace.</h4> | |
175 | */ | |
176 | public static final String Lttng_Control_WriteTraceLocal = "writeTraceLocal"; | |
177 | /** | |
178 | * <h4>LTTng trace control command to configure a network trace</h4> | |
179 | */ | |
180 | public static final String Lttng_Control_WriteTraceNetwork = "writeTraceNetwork"; | |
1b70b6dc PT |
181 | /** |
182 | * <h4>LTTng trace control command to stop a network trace transfer</h4> | |
183 | */ | |
184 | public static final String Lttng_Control_StopWriteTraceNetwork = "stopWriteTraceNetwork"; | |
e8d771d5 BH |
185 | /** |
186 | * <h4>LTTng trace control command to start tracing.</h4> | |
187 | */ | |
188 | public static final String Lttng_Control_StartTrace = "startTrace"; | |
189 | /** | |
190 | * <h4>LTTng trace control command to pause tracing.</h4> | |
191 | */ | |
192 | public static final String Lttng_Control_PauseTrace = "pauseTrace"; | |
193 | /** | |
194 | * <h4>LTTng trace control command to destroy a trace (i.e. deallocate trace resource)</h4> | |
195 | */ | |
196 | public static final String Lttng_Control_DestroyTrace = "destroyTrace"; | |
197 | /** | |
198 | * <h4>Separator in command replies.</h4> | |
199 | */ | |
200 | public static final String Lttng_Control_Separator = ","; | |
201 | /** | |
202 | * <h4>Separator</h4> | |
203 | */ | |
204 | public static final String Lttng_Control_GetActiveTraceInfoSeparator = "="; | |
205 | /** | |
206 | * <h4>Action property indicating a enabled action.</h4> | |
207 | */ | |
208 | public static final String Rse_Resource_Action_Enabled = "yes"; | |
209 | ||
210 | /** | |
211 | * <h4>Action property indicating a disabled action.</h4> | |
212 | */ | |
213 | public static final String Rse_Resource_Action_Disabled = "no"; | |
b12f4544 | 214 | } |