Mercurial > hg > graal-compiler
annotate src/share/vm/services/diagnosticCommand.hpp @ 14752:311bf6c7488b
revert some changes to match upstream files
author | twisti |
---|---|
date | Tue, 25 Mar 2014 16:25:02 -0700 |
parents | afa21611f918 |
children | 4ca6dc0799b6 |
rev | line source |
---|---|
4133 | 1 /* |
7956 | 2 * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. |
4133 | 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * | |
5 * This code is free software; you can redistribute it and/or modify it | |
6 * under the terms of the GNU General Public License version 2 only, as | |
7 * published by the Free Software Foundation. | |
8 * | |
9 * This code is distributed in the hope that it will be useful, but WITHOUT | |
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
12 * version 2 for more details (a copy is included in the LICENSE file that | |
13 * accompanied this code). | |
14 * | |
15 * You should have received a copy of the GNU General Public License version | |
16 * 2 along with this work; if not, write to the Free Software Foundation, | |
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. | |
18 * | |
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA | |
20 * or visit www.oracle.com if you need additional information or have any | |
21 * questions. | |
22 * | |
23 */ | |
24 | |
25 #ifndef SHARE_VM_SERVICES_DIAGNOSTICCOMMAND_HPP | |
26 #define SHARE_VM_SERVICES_DIAGNOSTICCOMMAND_HPP | |
27 | |
28 #include "runtime/arguments.hpp" | |
29 #include "classfile/vmSymbols.hpp" | |
30 #include "utilities/ostream.hpp" | |
31 #include "runtime/vm_version.hpp" | |
32 #include "runtime/vmThread.hpp" | |
33 #include "runtime/os.hpp" | |
34 #include "services/diagnosticArgument.hpp" | |
35 #include "services/diagnosticCommand.hpp" | |
36 #include "services/diagnosticFramework.hpp" | |
4851
a42c07c38c47
7132515: Add dcmd to manage UnlockingCommercialFeature flag
dsamersoff
parents:
4773
diff
changeset
|
37 #include "services/diagnosticCommand_ext.hpp" |
8001
db9981fd3124
8005915: Unify SERIALGC and INCLUDE_ALTERNATE_GCS
jprovino
parents:
6854
diff
changeset
|
38 #include "utilities/macros.hpp" |
4133 | 39 |
4773 | 40 class HelpDCmd : public DCmdWithParser { |
4133 | 41 protected: |
42 DCmdArgument<bool> _all; | |
43 DCmdArgument<char*> _cmd; | |
44 public: | |
45 HelpDCmd(outputStream* output, bool heap); | |
46 static const char* name() { return "help"; } | |
47 static const char* description() { | |
48 return "For more information about a specific command use 'help <command>'. " | |
49 "With no argument this will show a list of available commands. " | |
50 "'help all' will show help for all commands."; | |
51 } | |
6202
5a1f452f8f90
7178703: Fix handling of quoted arguments and better error messages in dcmd
sla
parents:
5895
diff
changeset
|
52 static const char* impact() { return "Low"; } |
4133 | 53 static int num_arguments(); |
10215
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
54 virtual void execute(DCmdSource source, TRAPS); |
4133 | 55 }; |
56 | |
57 class VersionDCmd : public DCmd { | |
58 public: | |
59 VersionDCmd(outputStream* output, bool heap) : DCmd(output,heap) { } | |
60 static const char* name() { return "VM.version"; } | |
61 static const char* description() { | |
62 return "Print JVM version information."; | |
63 } | |
6202
5a1f452f8f90
7178703: Fix handling of quoted arguments and better error messages in dcmd
sla
parents:
5895
diff
changeset
|
64 static const char* impact() { return "Low"; } |
10215
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
65 static const JavaPermission permission() { |
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
66 JavaPermission p = {"java.util.PropertyPermission", |
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
67 "java.vm.version", "read"}; |
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
68 return p; |
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
69 } |
4133 | 70 static int num_arguments() { return 0; } |
10215
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
71 virtual void execute(DCmdSource source, TRAPS); |
4773 | 72 }; |
73 | |
74 class CommandLineDCmd : public DCmd { | |
75 public: | |
76 CommandLineDCmd(outputStream* output, bool heap) : DCmd(output, heap) { } | |
77 static const char* name() { return "VM.command_line"; } | |
78 static const char* description() { | |
79 return "Print the command line used to start this VM instance."; | |
80 } | |
6202
5a1f452f8f90
7178703: Fix handling of quoted arguments and better error messages in dcmd
sla
parents:
5895
diff
changeset
|
81 static const char* impact() { return "Low"; } |
10215
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
82 static const JavaPermission permission() { |
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
83 JavaPermission p = {"java.lang.management.ManagementPermission", |
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
84 "monitor", NULL}; |
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
85 return p; |
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
86 } |
4773 | 87 static int num_arguments() { return 0; } |
10215
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
88 virtual void execute(DCmdSource source, TRAPS) { |
4773 | 89 Arguments::print_on(_output); |
90 } | |
91 }; | |
92 | |
93 // See also: get_system_properties in attachListener.cpp | |
94 class PrintSystemPropertiesDCmd : public DCmd { | |
95 public: | |
96 PrintSystemPropertiesDCmd(outputStream* output, bool heap) : DCmd(output, heap) { } | |
97 static const char* name() { return "VM.system_properties"; } | |
98 static const char* description() { | |
99 return "Print system properties."; | |
100 } | |
101 static const char* impact() { | |
6202
5a1f452f8f90
7178703: Fix handling of quoted arguments and better error messages in dcmd
sla
parents:
5895
diff
changeset
|
102 return "Low"; |
4773 | 103 } |
10215
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
104 static const JavaPermission permission() { |
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
105 JavaPermission p = {"java.util.PropertyPermission", |
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
106 "*", "read"}; |
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
107 return p; |
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
108 } |
4773 | 109 static int num_arguments() { return 0; } |
10215
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
110 virtual void execute(DCmdSource source, TRAPS); |
4773 | 111 }; |
112 | |
113 // See also: print_flag in attachListener.cpp | |
114 class PrintVMFlagsDCmd : public DCmdWithParser { | |
115 protected: | |
116 DCmdArgument<bool> _all; | |
117 public: | |
118 PrintVMFlagsDCmd(outputStream* output, bool heap); | |
119 static const char* name() { return "VM.flags"; } | |
120 static const char* description() { | |
121 return "Print VM flag options and their current values."; | |
122 } | |
123 static const char* impact() { | |
6202
5a1f452f8f90
7178703: Fix handling of quoted arguments and better error messages in dcmd
sla
parents:
5895
diff
changeset
|
124 return "Low"; |
4773 | 125 } |
10215
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
126 static const JavaPermission permission() { |
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
127 JavaPermission p = {"java.lang.management.ManagementPermission", |
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
128 "monitor", NULL}; |
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
129 return p; |
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
130 } |
4773 | 131 static int num_arguments(); |
10215
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
132 virtual void execute(DCmdSource source, TRAPS); |
4773 | 133 }; |
134 | |
14246
afa21611f918
8031304: Add dcmd to print all loaded dynamic libraries.
farvidsson
parents:
12943
diff
changeset
|
135 class VMDynamicLibrariesDCmd : public DCmd { |
afa21611f918
8031304: Add dcmd to print all loaded dynamic libraries.
farvidsson
parents:
12943
diff
changeset
|
136 public: |
afa21611f918
8031304: Add dcmd to print all loaded dynamic libraries.
farvidsson
parents:
12943
diff
changeset
|
137 VMDynamicLibrariesDCmd(outputStream* output, bool heap); |
afa21611f918
8031304: Add dcmd to print all loaded dynamic libraries.
farvidsson
parents:
12943
diff
changeset
|
138 static const char* name() { |
afa21611f918
8031304: Add dcmd to print all loaded dynamic libraries.
farvidsson
parents:
12943
diff
changeset
|
139 return "VM.dynlibs"; |
afa21611f918
8031304: Add dcmd to print all loaded dynamic libraries.
farvidsson
parents:
12943
diff
changeset
|
140 } |
afa21611f918
8031304: Add dcmd to print all loaded dynamic libraries.
farvidsson
parents:
12943
diff
changeset
|
141 static const char* description() { |
afa21611f918
8031304: Add dcmd to print all loaded dynamic libraries.
farvidsson
parents:
12943
diff
changeset
|
142 return "Print loaded dynamic libraries."; |
afa21611f918
8031304: Add dcmd to print all loaded dynamic libraries.
farvidsson
parents:
12943
diff
changeset
|
143 } |
afa21611f918
8031304: Add dcmd to print all loaded dynamic libraries.
farvidsson
parents:
12943
diff
changeset
|
144 static const char* impact() { |
afa21611f918
8031304: Add dcmd to print all loaded dynamic libraries.
farvidsson
parents:
12943
diff
changeset
|
145 return "Low"; |
afa21611f918
8031304: Add dcmd to print all loaded dynamic libraries.
farvidsson
parents:
12943
diff
changeset
|
146 } |
afa21611f918
8031304: Add dcmd to print all loaded dynamic libraries.
farvidsson
parents:
12943
diff
changeset
|
147 static const JavaPermission permission() { |
afa21611f918
8031304: Add dcmd to print all loaded dynamic libraries.
farvidsson
parents:
12943
diff
changeset
|
148 JavaPermission p = {"java.lang.management.ManagementPermission", |
afa21611f918
8031304: Add dcmd to print all loaded dynamic libraries.
farvidsson
parents:
12943
diff
changeset
|
149 "monitor", NULL}; |
afa21611f918
8031304: Add dcmd to print all loaded dynamic libraries.
farvidsson
parents:
12943
diff
changeset
|
150 return p; |
afa21611f918
8031304: Add dcmd to print all loaded dynamic libraries.
farvidsson
parents:
12943
diff
changeset
|
151 } |
afa21611f918
8031304: Add dcmd to print all loaded dynamic libraries.
farvidsson
parents:
12943
diff
changeset
|
152 static int num_arguments() { |
afa21611f918
8031304: Add dcmd to print all loaded dynamic libraries.
farvidsson
parents:
12943
diff
changeset
|
153 return 0; |
afa21611f918
8031304: Add dcmd to print all loaded dynamic libraries.
farvidsson
parents:
12943
diff
changeset
|
154 }; |
afa21611f918
8031304: Add dcmd to print all loaded dynamic libraries.
farvidsson
parents:
12943
diff
changeset
|
155 virtual void execute(DCmdSource source, TRAPS); |
afa21611f918
8031304: Add dcmd to print all loaded dynamic libraries.
farvidsson
parents:
12943
diff
changeset
|
156 }; |
afa21611f918
8031304: Add dcmd to print all loaded dynamic libraries.
farvidsson
parents:
12943
diff
changeset
|
157 |
4773 | 158 class VMUptimeDCmd : public DCmdWithParser { |
159 protected: | |
160 DCmdArgument<bool> _date; | |
161 public: | |
162 VMUptimeDCmd(outputStream* output, bool heap); | |
163 static const char* name() { return "VM.uptime"; } | |
164 static const char* description() { | |
165 return "Print VM uptime."; | |
166 } | |
167 static const char* impact() { | |
6202
5a1f452f8f90
7178703: Fix handling of quoted arguments and better error messages in dcmd
sla
parents:
5895
diff
changeset
|
168 return "Low"; |
4773 | 169 } |
170 static int num_arguments(); | |
10215
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
171 virtual void execute(DCmdSource source, TRAPS); |
4773 | 172 }; |
173 | |
174 class SystemGCDCmd : public DCmd { | |
175 public: | |
176 SystemGCDCmd(outputStream* output, bool heap) : DCmd(output, heap) { } | |
177 static const char* name() { return "GC.run"; } | |
178 static const char* description() { | |
179 return "Call java.lang.System.gc()."; | |
180 } | |
181 static const char* impact() { | |
182 return "Medium: Depends on Java heap size and content."; | |
183 } | |
184 static int num_arguments() { return 0; } | |
10215
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
185 virtual void execute(DCmdSource source, TRAPS); |
4773 | 186 }; |
187 | |
188 class RunFinalizationDCmd : public DCmd { | |
189 public: | |
190 RunFinalizationDCmd(outputStream* output, bool heap) : DCmd(output, heap) { } | |
191 static const char* name() { return "GC.run_finalization"; } | |
192 static const char* description() { | |
193 return "Call java.lang.System.runFinalization()."; | |
194 } | |
195 static const char* impact() { | |
196 return "Medium: Depends on Java content."; | |
197 } | |
198 static int num_arguments() { return 0; } | |
10215
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
199 virtual void execute(DCmdSource source, TRAPS); |
4773 | 200 }; |
201 | |
6854
fb19af007ffc
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
6202
diff
changeset
|
202 #if INCLUDE_SERVICES // Heap dumping supported |
4773 | 203 // See also: dump_heap in attachListener.cpp |
204 class HeapDumpDCmd : public DCmdWithParser { | |
205 protected: | |
206 DCmdArgument<char*> _filename; | |
207 DCmdArgument<bool> _all; | |
208 public: | |
209 HeapDumpDCmd(outputStream* output, bool heap); | |
210 static const char* name() { | |
211 return "GC.heap_dump"; | |
212 } | |
213 static const char* description() { | |
214 return "Generate a HPROF format dump of the Java heap."; | |
215 } | |
216 static const char* impact() { | |
217 return "High: Depends on Java heap size and content. " | |
218 "Request a full GC unless the '-all' option is specified."; | |
219 } | |
10215
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
220 static const JavaPermission permission() { |
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
221 JavaPermission p = {"java.lang.management.ManagementPermission", |
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
222 "monitor", NULL}; |
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
223 return p; |
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
224 } |
4773 | 225 static int num_arguments(); |
10215
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
226 virtual void execute(DCmdSource source, TRAPS); |
4773 | 227 }; |
6854
fb19af007ffc
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
6202
diff
changeset
|
228 #endif // INCLUDE_SERVICES |
4773 | 229 |
7956 | 230 // See also: inspectheap in attachListener.cpp |
4773 | 231 class ClassHistogramDCmd : public DCmdWithParser { |
232 protected: | |
233 DCmdArgument<bool> _all; | |
234 public: | |
235 ClassHistogramDCmd(outputStream* output, bool heap); | |
236 static const char* name() { | |
237 return "GC.class_histogram"; | |
238 } | |
239 static const char* description() { | |
240 return "Provide statistics about the Java heap usage."; | |
241 } | |
242 static const char* impact() { | |
243 return "High: Depends on Java heap size and content."; | |
244 } | |
10215
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
245 static const JavaPermission permission() { |
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
246 JavaPermission p = {"java.lang.management.ManagementPermission", |
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
247 "monitor", NULL}; |
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
248 return p; |
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
249 } |
4773 | 250 static int num_arguments(); |
10215
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
251 virtual void execute(DCmdSource source, TRAPS); |
4773 | 252 }; |
253 | |
7956 | 254 class ClassStatsDCmd : public DCmdWithParser { |
255 protected: | |
256 DCmdArgument<bool> _all; | |
257 DCmdArgument<bool> _csv; | |
258 DCmdArgument<bool> _help; | |
259 DCmdArgument<char*> _columns; | |
260 public: | |
261 ClassStatsDCmd(outputStream* output, bool heap); | |
262 static const char* name() { | |
263 return "GC.class_stats"; | |
264 } | |
265 static const char* description() { | |
266 return "Provide statistics about Java class meta data. Requires -XX:+UnlockDiagnosticVMOptions."; | |
267 } | |
268 static const char* impact() { | |
269 return "High: Depends on Java heap size and content."; | |
270 } | |
271 static int num_arguments(); | |
10215
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
272 virtual void execute(DCmdSource source, TRAPS); |
7956 | 273 }; |
274 | |
4773 | 275 // See also: thread_dump in attachListener.cpp |
276 class ThreadDumpDCmd : public DCmdWithParser { | |
277 protected: | |
278 DCmdArgument<bool> _locks; | |
279 public: | |
280 ThreadDumpDCmd(outputStream* output, bool heap); | |
281 static const char* name() { return "Thread.print"; } | |
282 static const char* description() { | |
283 return "Print all threads with stacktraces."; | |
284 } | |
285 static const char* impact() { | |
286 return "Medium: Depends on the number of threads."; | |
287 } | |
10215
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
288 static const JavaPermission permission() { |
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
289 JavaPermission p = {"java.lang.management.ManagementPermission", |
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
290 "monitor", NULL}; |
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
291 return p; |
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
292 } |
4773 | 293 static int num_arguments(); |
10215
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
294 virtual void execute(DCmdSource source, TRAPS); |
4133 | 295 }; |
296 | |
5895
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
297 // Enhanced JMX Agent support |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
298 |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
299 class JMXStartRemoteDCmd : public DCmdWithParser { |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
300 |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
301 // Explicitly list all properties that could be |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
302 // passed to Agent.startRemoteManagementAgent() |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
303 // com.sun.management is omitted |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
304 |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
305 DCmdArgument<char *> _config_file; |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
306 DCmdArgument<char *> _jmxremote_port; |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
307 DCmdArgument<char *> _jmxremote_rmi_port; |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
308 DCmdArgument<char *> _jmxremote_ssl; |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
309 DCmdArgument<char *> _jmxremote_registry_ssl; |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
310 DCmdArgument<char *> _jmxremote_authenticate; |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
311 DCmdArgument<char *> _jmxremote_password_file; |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
312 DCmdArgument<char *> _jmxremote_access_file; |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
313 DCmdArgument<char *> _jmxremote_login_config; |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
314 DCmdArgument<char *> _jmxremote_ssl_enabled_cipher_suites; |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
315 DCmdArgument<char *> _jmxremote_ssl_enabled_protocols; |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
316 DCmdArgument<char *> _jmxremote_ssl_need_client_auth; |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
317 DCmdArgument<char *> _jmxremote_ssl_config_file; |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
318 |
7979
8f696cf1a0fb
8002048: Protocol to discovery of manageable Java processes on a network
dsamersoff
parents:
7956
diff
changeset
|
319 // JDP support |
8f696cf1a0fb
8002048: Protocol to discovery of manageable Java processes on a network
dsamersoff
parents:
7956
diff
changeset
|
320 // Keep autodiscovery char* not bool to pass true/false |
8f696cf1a0fb
8002048: Protocol to discovery of manageable Java processes on a network
dsamersoff
parents:
7956
diff
changeset
|
321 // as property value to java level. |
8f696cf1a0fb
8002048: Protocol to discovery of manageable Java processes on a network
dsamersoff
parents:
7956
diff
changeset
|
322 DCmdArgument<char *> _jmxremote_autodiscovery; |
8f696cf1a0fb
8002048: Protocol to discovery of manageable Java processes on a network
dsamersoff
parents:
7956
diff
changeset
|
323 DCmdArgument<jlong> _jdp_port; |
8f696cf1a0fb
8002048: Protocol to discovery of manageable Java processes on a network
dsamersoff
parents:
7956
diff
changeset
|
324 DCmdArgument<char *> _jdp_address; |
8f696cf1a0fb
8002048: Protocol to discovery of manageable Java processes on a network
dsamersoff
parents:
7956
diff
changeset
|
325 DCmdArgument<char *> _jdp_source_addr; |
8f696cf1a0fb
8002048: Protocol to discovery of manageable Java processes on a network
dsamersoff
parents:
7956
diff
changeset
|
326 DCmdArgument<jlong> _jdp_ttl; |
8f696cf1a0fb
8002048: Protocol to discovery of manageable Java processes on a network
dsamersoff
parents:
7956
diff
changeset
|
327 DCmdArgument<jlong> _jdp_pause; |
12943
996d1f2f056f
8026930: In ManagementAgent.start it should be possible to set the jdp.name parameter (hotspot part)
dsamersoff
parents:
10215
diff
changeset
|
328 DCmdArgument<char *> _jdp_name; |
7979
8f696cf1a0fb
8002048: Protocol to discovery of manageable Java processes on a network
dsamersoff
parents:
7956
diff
changeset
|
329 |
5895
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
330 public: |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
331 JMXStartRemoteDCmd(outputStream *output, bool heap_allocated); |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
332 |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
333 static const char *name() { |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
334 return "ManagementAgent.start"; |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
335 } |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
336 |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
337 static const char *description() { |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
338 return "Start remote management agent."; |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
339 } |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
340 |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
341 static int num_arguments(); |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
342 |
10215
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
343 virtual void execute(DCmdSource source, TRAPS); |
5895
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
344 |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
345 }; |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
346 |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
347 class JMXStartLocalDCmd : public DCmd { |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
348 |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
349 // Explicitly request start of local agent, |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
350 // it will not be started by start dcmd |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
351 |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
352 |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
353 public: |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
354 JMXStartLocalDCmd(outputStream *output, bool heap_allocated); |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
355 |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
356 static const char *name() { |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
357 return "ManagementAgent.start_local"; |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
358 } |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
359 |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
360 static const char *description() { |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
361 return "Start local management agent."; |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
362 } |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
363 |
10215
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
364 virtual void execute(DCmdSource source, TRAPS); |
5895
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
365 |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
366 }; |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
367 |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
368 class JMXStopRemoteDCmd : public DCmd { |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
369 public: |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
370 JMXStopRemoteDCmd(outputStream *output, bool heap_allocated) : |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
371 DCmd(output, heap_allocated) { |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
372 // Do Nothing |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
373 } |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
374 |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
375 static const char *name() { |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
376 return "ManagementAgent.stop"; |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
377 } |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
378 |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
379 static const char *description() { |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
380 return "Stop remote management agent."; |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
381 } |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
382 |
10215
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
383 virtual void execute(DCmdSource source, TRAPS); |
5895
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
384 }; |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
385 |
4133 | 386 #endif // SHARE_VM_SERVICES_DIAGNOSTICCOMMAND_HPP |