Mercurial > hg > truffle
annotate src/share/vm/services/diagnosticCommand.hpp @ 21836:b517d3a9aebf jdk8u31-b31
Merge
author | asaha |
---|---|
date | Thu, 18 Dec 2014 14:30:02 -0800 |
parents | f42c10a3d4b1 |
children | 52b4284cb496 |
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 | |
135 class VMUptimeDCmd : public DCmdWithParser { | |
136 protected: | |
137 DCmdArgument<bool> _date; | |
138 public: | |
139 VMUptimeDCmd(outputStream* output, bool heap); | |
140 static const char* name() { return "VM.uptime"; } | |
141 static const char* description() { | |
142 return "Print VM uptime."; | |
143 } | |
144 static const char* impact() { | |
6202
5a1f452f8f90
7178703: Fix handling of quoted arguments and better error messages in dcmd
sla
parents:
5895
diff
changeset
|
145 return "Low"; |
4773 | 146 } |
147 static int num_arguments(); | |
10215
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
148 virtual void execute(DCmdSource source, TRAPS); |
4773 | 149 }; |
150 | |
151 class SystemGCDCmd : public DCmd { | |
152 public: | |
153 SystemGCDCmd(outputStream* output, bool heap) : DCmd(output, heap) { } | |
154 static const char* name() { return "GC.run"; } | |
155 static const char* description() { | |
156 return "Call java.lang.System.gc()."; | |
157 } | |
158 static const char* impact() { | |
159 return "Medium: Depends on Java heap size and content."; | |
160 } | |
161 static int num_arguments() { return 0; } | |
10215
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
162 virtual void execute(DCmdSource source, TRAPS); |
4773 | 163 }; |
164 | |
165 class RunFinalizationDCmd : public DCmd { | |
166 public: | |
167 RunFinalizationDCmd(outputStream* output, bool heap) : DCmd(output, heap) { } | |
168 static const char* name() { return "GC.run_finalization"; } | |
169 static const char* description() { | |
170 return "Call java.lang.System.runFinalization()."; | |
171 } | |
172 static const char* impact() { | |
173 return "Medium: Depends on Java content."; | |
174 } | |
175 static int num_arguments() { return 0; } | |
10215
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
176 virtual void execute(DCmdSource source, TRAPS); |
4773 | 177 }; |
178 | |
6854
fb19af007ffc
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
6202
diff
changeset
|
179 #if INCLUDE_SERVICES // Heap dumping supported |
4773 | 180 // See also: dump_heap in attachListener.cpp |
181 class HeapDumpDCmd : public DCmdWithParser { | |
182 protected: | |
183 DCmdArgument<char*> _filename; | |
184 DCmdArgument<bool> _all; | |
185 public: | |
186 HeapDumpDCmd(outputStream* output, bool heap); | |
187 static const char* name() { | |
188 return "GC.heap_dump"; | |
189 } | |
190 static const char* description() { | |
191 return "Generate a HPROF format dump of the Java heap."; | |
192 } | |
193 static const char* impact() { | |
194 return "High: Depends on Java heap size and content. " | |
195 "Request a full GC unless the '-all' option is specified."; | |
196 } | |
10215
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
197 static const JavaPermission permission() { |
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
198 JavaPermission p = {"java.lang.management.ManagementPermission", |
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
199 "monitor", NULL}; |
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
200 return p; |
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
201 } |
4773 | 202 static int num_arguments(); |
10215
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
203 virtual void execute(DCmdSource source, TRAPS); |
4773 | 204 }; |
6854
fb19af007ffc
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
6202
diff
changeset
|
205 #endif // INCLUDE_SERVICES |
4773 | 206 |
7956 | 207 // See also: inspectheap in attachListener.cpp |
4773 | 208 class ClassHistogramDCmd : public DCmdWithParser { |
209 protected: | |
210 DCmdArgument<bool> _all; | |
211 public: | |
212 ClassHistogramDCmd(outputStream* output, bool heap); | |
213 static const char* name() { | |
214 return "GC.class_histogram"; | |
215 } | |
216 static const char* description() { | |
217 return "Provide statistics about the Java heap usage."; | |
218 } | |
219 static const char* impact() { | |
220 return "High: Depends on Java heap size and content."; | |
221 } | |
10215
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
222 static const JavaPermission permission() { |
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
223 JavaPermission p = {"java.lang.management.ManagementPermission", |
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
224 "monitor", NULL}; |
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
225 return p; |
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
226 } |
4773 | 227 static int num_arguments(); |
10215
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
228 virtual void execute(DCmdSource source, TRAPS); |
4773 | 229 }; |
230 | |
7956 | 231 class ClassStatsDCmd : public DCmdWithParser { |
232 protected: | |
233 DCmdArgument<bool> _all; | |
234 DCmdArgument<bool> _csv; | |
235 DCmdArgument<bool> _help; | |
236 DCmdArgument<char*> _columns; | |
237 public: | |
238 ClassStatsDCmd(outputStream* output, bool heap); | |
239 static const char* name() { | |
240 return "GC.class_stats"; | |
241 } | |
242 static const char* description() { | |
243 return "Provide statistics about Java class meta data. Requires -XX:+UnlockDiagnosticVMOptions."; | |
244 } | |
245 static const char* impact() { | |
246 return "High: Depends on Java heap size and content."; | |
247 } | |
248 static int num_arguments(); | |
10215
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
249 virtual void execute(DCmdSource source, TRAPS); |
7956 | 250 }; |
251 | |
4773 | 252 // See also: thread_dump in attachListener.cpp |
253 class ThreadDumpDCmd : public DCmdWithParser { | |
254 protected: | |
255 DCmdArgument<bool> _locks; | |
256 public: | |
257 ThreadDumpDCmd(outputStream* output, bool heap); | |
258 static const char* name() { return "Thread.print"; } | |
259 static const char* description() { | |
260 return "Print all threads with stacktraces."; | |
261 } | |
262 static const char* impact() { | |
263 return "Medium: Depends on the number of threads."; | |
264 } | |
10215
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
265 static const JavaPermission permission() { |
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
266 JavaPermission p = {"java.lang.management.ManagementPermission", |
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
267 "monitor", NULL}; |
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
268 return p; |
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
269 } |
4773 | 270 static int num_arguments(); |
10215
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
271 virtual void execute(DCmdSource source, TRAPS); |
4133 | 272 }; |
273 | |
5895
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
274 // Enhanced JMX Agent support |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
275 |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
276 class JMXStartRemoteDCmd : public DCmdWithParser { |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
277 |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
278 // 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
|
279 // passed to Agent.startRemoteManagementAgent() |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
280 // com.sun.management is omitted |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
281 |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
282 DCmdArgument<char *> _config_file; |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
283 DCmdArgument<char *> _jmxremote_port; |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
284 DCmdArgument<char *> _jmxremote_rmi_port; |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
285 DCmdArgument<char *> _jmxremote_ssl; |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
286 DCmdArgument<char *> _jmxremote_registry_ssl; |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
287 DCmdArgument<char *> _jmxremote_authenticate; |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
288 DCmdArgument<char *> _jmxremote_password_file; |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
289 DCmdArgument<char *> _jmxremote_access_file; |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
290 DCmdArgument<char *> _jmxremote_login_config; |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
291 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
|
292 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
|
293 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
|
294 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
|
295 |
7979
8f696cf1a0fb
8002048: Protocol to discovery of manageable Java processes on a network
dsamersoff
parents:
7956
diff
changeset
|
296 // JDP support |
8f696cf1a0fb
8002048: Protocol to discovery of manageable Java processes on a network
dsamersoff
parents:
7956
diff
changeset
|
297 // 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
|
298 // as property value to java level. |
8f696cf1a0fb
8002048: Protocol to discovery of manageable Java processes on a network
dsamersoff
parents:
7956
diff
changeset
|
299 DCmdArgument<char *> _jmxremote_autodiscovery; |
8f696cf1a0fb
8002048: Protocol to discovery of manageable Java processes on a network
dsamersoff
parents:
7956
diff
changeset
|
300 DCmdArgument<jlong> _jdp_port; |
8f696cf1a0fb
8002048: Protocol to discovery of manageable Java processes on a network
dsamersoff
parents:
7956
diff
changeset
|
301 DCmdArgument<char *> _jdp_address; |
8f696cf1a0fb
8002048: Protocol to discovery of manageable Java processes on a network
dsamersoff
parents:
7956
diff
changeset
|
302 DCmdArgument<char *> _jdp_source_addr; |
8f696cf1a0fb
8002048: Protocol to discovery of manageable Java processes on a network
dsamersoff
parents:
7956
diff
changeset
|
303 DCmdArgument<jlong> _jdp_ttl; |
8f696cf1a0fb
8002048: Protocol to discovery of manageable Java processes on a network
dsamersoff
parents:
7956
diff
changeset
|
304 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
|
305 DCmdArgument<char *> _jdp_name; |
7979
8f696cf1a0fb
8002048: Protocol to discovery of manageable Java processes on a network
dsamersoff
parents:
7956
diff
changeset
|
306 |
5895
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
307 public: |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
308 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
|
309 |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
310 static const char *name() { |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
311 return "ManagementAgent.start"; |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
312 } |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
313 |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
314 static const char *description() { |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
315 return "Start remote management agent."; |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
316 } |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
317 |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
318 static int num_arguments(); |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
319 |
10215
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
320 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
|
321 |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
322 }; |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
323 |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
324 class JMXStartLocalDCmd : public DCmd { |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
325 |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
326 // 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
|
327 // 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
|
328 |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
329 |
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 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
|
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_local"; |
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 local 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 |
10215
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
341 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
|
342 |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
343 }; |
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 class JMXStopRemoteDCmd : public DCmd { |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
346 public: |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
347 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
|
348 DCmd(output, heap_allocated) { |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
349 // Do Nothing |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
350 } |
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 static const char *name() { |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
353 return "ManagementAgent.stop"; |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
354 } |
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 *description() { |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
357 return "Stop remote management agent."; |
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 |
10215
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
360 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
|
361 }; |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
362 |
17827 | 363 class RotateGCLogDCmd : public DCmd { |
364 public: | |
365 RotateGCLogDCmd(outputStream* output, bool heap) : DCmd(output, heap) {} | |
366 static const char* name() { return "GC.rotate_log"; } | |
367 static const char* description() { | |
368 return "Force the GC log file to be rotated."; | |
369 } | |
370 static const char* impact() { return "Low"; } | |
371 virtual void execute(DCmdSource source, TRAPS); | |
372 static int num_arguments() { return 0; } | |
373 static const JavaPermission permission() { | |
374 JavaPermission p = {"java.lang.management.ManagementPermission", | |
375 "control", NULL}; | |
376 return p; | |
377 } | |
378 }; | |
379 | |
4133 | 380 #endif // SHARE_VM_SERVICES_DIAGNOSTICCOMMAND_HPP |