Mercurial > hg > truffle
annotate src/share/vm/services/diagnosticCommand.cpp @ 17925:45e59fae8f2b
8041481: JVM crashes with collect_args_for_profiling
Summary: method handle call to c1 intrinsic tries to profile popped argument
Reviewed-by: kvn, twisti
author | roland |
---|---|
date | Fri, 25 Apr 2014 09:22:16 +0200 |
parents | f42c10a3d4b1 |
children | 78bbf4d43a14 |
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 #include "precompiled.hpp" | |
4773 | 26 #include "gc_implementation/shared/vmGCOperations.hpp" |
27 #include "runtime/javaCalls.hpp" | |
4133 | 28 #include "services/diagnosticArgument.hpp" |
29 #include "services/diagnosticCommand.hpp" | |
30 #include "services/diagnosticFramework.hpp" | |
4773 | 31 #include "services/heapDumper.hpp" |
32 #include "services/management.hpp" | |
8001
db9981fd3124
8005915: Unify SERIALGC and INCLUDE_ALTERNATE_GCS
jprovino
parents:
6856
diff
changeset
|
33 #include "utilities/macros.hpp" |
4133 | 34 |
4851
a42c07c38c47
7132515: Add dcmd to manage UnlockingCommercialFeature flag
dsamersoff
parents:
4773
diff
changeset
|
35 void DCmdRegistrant::register_dcmds(){ |
a42c07c38c47
7132515: Add dcmd to manage UnlockingCommercialFeature flag
dsamersoff
parents:
4773
diff
changeset
|
36 // Registration of the diagnostic commands |
10215
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
37 // First argument specifies which interfaces will export the command |
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
38 // Second argument specifies if the command is enabled |
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
39 // Third argument specifies if the command is hidden |
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
40 uint32_t full_export = DCmd_Source_Internal | DCmd_Source_AttachAPI |
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
41 | DCmd_Source_MBean; |
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
42 DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<HelpDCmd>(full_export, true, false)); |
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
43 DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<VersionDCmd>(full_export, true, false)); |
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
44 DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<CommandLineDCmd>(full_export, true, false)); |
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
45 DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<PrintSystemPropertiesDCmd>(full_export, true, false)); |
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
46 DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<PrintVMFlagsDCmd>(full_export, true, false)); |
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
47 DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<VMUptimeDCmd>(full_export, true, false)); |
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
48 DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<SystemGCDCmd>(full_export, true, false)); |
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
49 DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<RunFinalizationDCmd>(full_export, true, false)); |
7956 | 50 #if INCLUDE_SERVICES // Heap dumping/inspection supported |
12916
38f9393d1847
8020789: Disable exporting of gc.heap_dump diagnostic command
sgabdura
parents:
10405
diff
changeset
|
51 DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<HeapDumpDCmd>(DCmd_Source_Internal | DCmd_Source_AttachAPI, true, false)); |
10215
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
52 DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<ClassHistogramDCmd>(full_export, true, false)); |
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
53 DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<ClassStatsDCmd>(full_export, true, false)); |
6854
fb19af007ffc
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
6725
diff
changeset
|
54 #endif // INCLUDE_SERVICES |
10215
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
55 DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<ThreadDumpDCmd>(full_export, true, false)); |
17827 | 56 DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<RotateGCLogDCmd>(full_export, true, false)); |
10215
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
57 |
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
58 // Enhanced JMX Agent Support |
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
59 // These commands won't be exported via the DiagnosticCommandMBean until an |
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
60 // appropriate permission is created for them |
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
61 uint32_t jmx_agent_export_flags = DCmd_Source_Internal | DCmd_Source_AttachAPI; |
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
62 DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<JMXStartRemoteDCmd>(jmx_agent_export_flags, true,false)); |
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
63 DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<JMXStartLocalDCmd>(jmx_agent_export_flags, true,false)); |
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
64 DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<JMXStopRemoteDCmd>(jmx_agent_export_flags, true,false)); |
5895
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
65 |
4851
a42c07c38c47
7132515: Add dcmd to manage UnlockingCommercialFeature flag
dsamersoff
parents:
4773
diff
changeset
|
66 } |
a42c07c38c47
7132515: Add dcmd to manage UnlockingCommercialFeature flag
dsamersoff
parents:
4773
diff
changeset
|
67 |
a42c07c38c47
7132515: Add dcmd to manage UnlockingCommercialFeature flag
dsamersoff
parents:
4773
diff
changeset
|
68 #ifndef HAVE_EXTRA_DCMD |
a42c07c38c47
7132515: Add dcmd to manage UnlockingCommercialFeature flag
dsamersoff
parents:
4773
diff
changeset
|
69 void DCmdRegistrant::register_dcmds_ext(){ |
a42c07c38c47
7132515: Add dcmd to manage UnlockingCommercialFeature flag
dsamersoff
parents:
4773
diff
changeset
|
70 // Do nothing here |
a42c07c38c47
7132515: Add dcmd to manage UnlockingCommercialFeature flag
dsamersoff
parents:
4773
diff
changeset
|
71 } |
a42c07c38c47
7132515: Add dcmd to manage UnlockingCommercialFeature flag
dsamersoff
parents:
4773
diff
changeset
|
72 #endif |
a42c07c38c47
7132515: Add dcmd to manage UnlockingCommercialFeature flag
dsamersoff
parents:
4773
diff
changeset
|
73 |
a42c07c38c47
7132515: Add dcmd to manage UnlockingCommercialFeature flag
dsamersoff
parents:
4773
diff
changeset
|
74 |
4773 | 75 HelpDCmd::HelpDCmd(outputStream* output, bool heap) : DCmdWithParser(output, heap), |
4133 | 76 _all("-all", "Show help for all commands", "BOOLEAN", false, "false"), |
77 _cmd("command name", "The name of the command for which we want help", | |
78 "STRING", false) { | |
79 _dcmdparser.add_dcmd_option(&_all); | |
80 _dcmdparser.add_dcmd_argument(&_cmd); | |
81 }; | |
82 | |
10215
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
83 void HelpDCmd::execute(DCmdSource source, TRAPS) { |
4133 | 84 if (_all.value()) { |
10215
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
85 GrowableArray<const char*>* cmd_list = DCmdFactory::DCmd_list(source); |
4133 | 86 for (int i = 0; i < cmd_list->length(); i++) { |
10215
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
87 DCmdFactory* factory = DCmdFactory::factory(source, cmd_list->at(i), |
4133 | 88 strlen(cmd_list->at(i))); |
10215
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
89 output()->print_cr("%s%s", factory->name(), |
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
90 factory->is_enabled() ? "" : " [disabled]"); |
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
91 output()->print_cr("\t%s", factory->description()); |
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
92 output()->cr(); |
4133 | 93 factory = factory->next(); |
94 } | |
95 } else if (_cmd.has_value()) { | |
96 DCmd* cmd = NULL; | |
10215
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
97 DCmdFactory* factory = DCmdFactory::factory(source, _cmd.value(), |
4133 | 98 strlen(_cmd.value())); |
99 if (factory != NULL) { | |
100 output()->print_cr("%s%s", factory->name(), | |
101 factory->is_enabled() ? "" : " [disabled]"); | |
102 output()->print_cr(factory->description()); | |
103 output()->print_cr("\nImpact: %s", factory->impact()); | |
10215
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
104 JavaPermission p = factory->permission(); |
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
105 if(p._class != NULL) { |
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
106 if(p._action != NULL) { |
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
107 output()->print_cr("\nPermission: %s(%s, %s)", |
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
108 p._class, p._name == NULL ? "null" : p._name, p._action); |
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
109 } else { |
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
110 output()->print_cr("\nPermission: %s(%s)", |
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
111 p._class, p._name == NULL ? "null" : p._name); |
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
112 } |
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
113 } |
4773 | 114 output()->cr(); |
4133 | 115 cmd = factory->create_resource_instance(output()); |
116 if (cmd != NULL) { | |
117 DCmdMark mark(cmd); | |
4773 | 118 cmd->print_help(factory->name()); |
4133 | 119 } |
120 } else { | |
121 output()->print_cr("Help unavailable : '%s' : No such command", _cmd.value()); | |
122 } | |
123 } else { | |
124 output()->print_cr("The following commands are available:"); | |
10215
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
125 GrowableArray<const char *>* cmd_list = DCmdFactory::DCmd_list(source); |
4133 | 126 for (int i = 0; i < cmd_list->length(); i++) { |
10215
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
127 DCmdFactory* factory = DCmdFactory::factory(source, cmd_list->at(i), |
4133 | 128 strlen(cmd_list->at(i))); |
10215
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
129 output()->print_cr("%s%s", factory->name(), |
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
130 factory->is_enabled() ? "" : " [disabled]"); |
4133 | 131 factory = factory->_next; |
132 } | |
133 output()->print_cr("\nFor more information about a specific command use 'help <command>'."); | |
134 } | |
135 } | |
136 | |
137 int HelpDCmd::num_arguments() { | |
138 ResourceMark rm; | |
139 HelpDCmd* dcmd = new HelpDCmd(NULL, false); | |
140 if (dcmd != NULL) { | |
141 DCmdMark mark(dcmd); | |
142 return dcmd->_dcmdparser.num_arguments(); | |
143 } else { | |
144 return 0; | |
145 } | |
146 } | |
147 | |
10215
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
148 void VersionDCmd::execute(DCmdSource source, TRAPS) { |
4133 | 149 output()->print_cr("%s version %s", Abstract_VM_Version::vm_name(), |
150 Abstract_VM_Version::vm_release()); | |
151 JDK_Version jdk_version = JDK_Version::current(); | |
152 if (jdk_version.update_version() > 0) { | |
153 output()->print_cr("JDK %d.%d_%02d", jdk_version.major_version(), | |
154 jdk_version.minor_version(), jdk_version.update_version()); | |
155 } else { | |
156 output()->print_cr("JDK %d.%d", jdk_version.major_version(), | |
157 jdk_version.minor_version()); | |
158 } | |
159 } | |
4773 | 160 |
161 PrintVMFlagsDCmd::PrintVMFlagsDCmd(outputStream* output, bool heap) : | |
162 DCmdWithParser(output, heap), | |
163 _all("-all", "Print all flags supported by the VM", "BOOLEAN", false, "false") { | |
164 _dcmdparser.add_dcmd_option(&_all); | |
165 } | |
166 | |
10215
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
167 void PrintVMFlagsDCmd::execute(DCmdSource source, TRAPS) { |
4773 | 168 if (_all.value()) { |
169 CommandLineFlags::printFlags(output(), true); | |
170 } else { | |
171 CommandLineFlags::printSetFlags(output()); | |
172 } | |
173 } | |
174 | |
175 int PrintVMFlagsDCmd::num_arguments() { | |
176 ResourceMark rm; | |
177 PrintVMFlagsDCmd* dcmd = new PrintVMFlagsDCmd(NULL, false); | |
178 if (dcmd != NULL) { | |
179 DCmdMark mark(dcmd); | |
180 return dcmd->_dcmdparser.num_arguments(); | |
181 } else { | |
182 return 0; | |
183 } | |
184 } | |
185 | |
10215
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
186 void PrintSystemPropertiesDCmd::execute(DCmdSource source, TRAPS) { |
4773 | 187 // load sun.misc.VMSupport |
188 Symbol* klass = vmSymbols::sun_misc_VMSupport(); | |
6725
da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
5895
diff
changeset
|
189 Klass* k = SystemDictionary::resolve_or_fail(klass, true, CHECK); |
4773 | 190 instanceKlassHandle ik (THREAD, k); |
191 if (ik->should_be_initialized()) { | |
192 ik->initialize(THREAD); | |
193 } | |
194 if (HAS_PENDING_EXCEPTION) { | |
195 java_lang_Throwable::print(PENDING_EXCEPTION, output()); | |
196 output()->cr(); | |
197 CLEAR_PENDING_EXCEPTION; | |
198 return; | |
199 } | |
200 | |
201 // invoke the serializePropertiesToByteArray method | |
202 JavaValue result(T_OBJECT); | |
203 JavaCallArguments args; | |
204 | |
205 Symbol* signature = vmSymbols::serializePropertiesToByteArray_signature(); | |
206 JavaCalls::call_static(&result, | |
207 ik, | |
208 vmSymbols::serializePropertiesToByteArray_name(), | |
209 signature, | |
210 &args, | |
211 THREAD); | |
212 if (HAS_PENDING_EXCEPTION) { | |
213 java_lang_Throwable::print(PENDING_EXCEPTION, output()); | |
214 output()->cr(); | |
215 CLEAR_PENDING_EXCEPTION; | |
216 return; | |
217 } | |
218 | |
219 // The result should be a [B | |
220 oop res = (oop)result.get_jobject(); | |
221 assert(res->is_typeArray(), "just checking"); | |
6831
d8ce2825b193
8000213: NPG: Should have renamed arrayKlass and typeArrayKlass
coleenp
parents:
6725
diff
changeset
|
222 assert(TypeArrayKlass::cast(res->klass())->element_type() == T_BYTE, "just checking"); |
4773 | 223 |
224 // copy the bytes to the output stream | |
225 typeArrayOop ba = typeArrayOop(res); | |
226 jbyte* addr = typeArrayOop(res)->byte_at_addr(0); | |
227 output()->print_raw((const char*)addr, ba->length()); | |
228 } | |
229 | |
230 VMUptimeDCmd::VMUptimeDCmd(outputStream* output, bool heap) : | |
231 DCmdWithParser(output, heap), | |
232 _date("-date", "Add a prefix with current date", "BOOLEAN", false, "false") { | |
233 _dcmdparser.add_dcmd_option(&_date); | |
234 } | |
235 | |
10215
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
236 void VMUptimeDCmd::execute(DCmdSource source, TRAPS) { |
4773 | 237 if (_date.value()) { |
238 output()->date_stamp(true, "", ": "); | |
239 } | |
240 output()->time_stamp().update_to(tty->time_stamp().ticks()); | |
241 output()->stamp(); | |
242 output()->print_cr(" s"); | |
243 } | |
244 | |
245 int VMUptimeDCmd::num_arguments() { | |
246 ResourceMark rm; | |
247 VMUptimeDCmd* dcmd = new VMUptimeDCmd(NULL, false); | |
248 if (dcmd != NULL) { | |
249 DCmdMark mark(dcmd); | |
250 return dcmd->_dcmdparser.num_arguments(); | |
251 } else { | |
252 return 0; | |
253 } | |
254 } | |
255 | |
10215
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
256 void SystemGCDCmd::execute(DCmdSource source, TRAPS) { |
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
257 if (!DisableExplicitGC) { |
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
258 Universe::heap()->collect(GCCause::_java_lang_system_gc); |
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
259 } else { |
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
260 output()->print_cr("Explicit GC is disabled, no GC has been performed."); |
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
261 } |
4773 | 262 } |
263 | |
10215
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
264 void RunFinalizationDCmd::execute(DCmdSource source, TRAPS) { |
6725
da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
5895
diff
changeset
|
265 Klass* k = SystemDictionary::resolve_or_fail(vmSymbols::java_lang_System(), |
4773 | 266 true, CHECK); |
267 instanceKlassHandle klass(THREAD, k); | |
268 JavaValue result(T_VOID); | |
269 JavaCalls::call_static(&result, klass, | |
270 vmSymbols::run_finalization_name(), | |
271 vmSymbols::void_method_signature(), CHECK); | |
272 } | |
273 | |
7956 | 274 #if INCLUDE_SERVICES // Heap dumping/inspection supported |
4773 | 275 HeapDumpDCmd::HeapDumpDCmd(outputStream* output, bool heap) : |
276 DCmdWithParser(output, heap), | |
277 _filename("filename","Name of the dump file", "STRING",true), | |
278 _all("-all", "Dump all objects, including unreachable objects", | |
279 "BOOLEAN", false, "false") { | |
280 _dcmdparser.add_dcmd_option(&_all); | |
281 _dcmdparser.add_dcmd_argument(&_filename); | |
282 } | |
283 | |
10215
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
284 void HeapDumpDCmd::execute(DCmdSource source, TRAPS) { |
4773 | 285 // Request a full GC before heap dump if _all is false |
286 // This helps reduces the amount of unreachable objects in the dump | |
287 // and makes it easier to browse. | |
288 HeapDumper dumper(!_all.value() /* request GC if _all is false*/); | |
289 int res = dumper.dump(_filename.value()); | |
290 if (res == 0) { | |
291 output()->print_cr("Heap dump file created"); | |
292 } else { | |
293 // heap dump failed | |
294 ResourceMark rm; | |
295 char* error = dumper.error_as_C_string(); | |
296 if (error == NULL) { | |
297 output()->print_cr("Dump failed - reason unknown"); | |
298 } else { | |
299 output()->print_cr("%s", error); | |
300 } | |
301 } | |
302 } | |
303 | |
304 int HeapDumpDCmd::num_arguments() { | |
305 ResourceMark rm; | |
306 HeapDumpDCmd* dcmd = new HeapDumpDCmd(NULL, false); | |
307 if (dcmd != NULL) { | |
308 DCmdMark mark(dcmd); | |
309 return dcmd->_dcmdparser.num_arguments(); | |
310 } else { | |
311 return 0; | |
312 } | |
313 } | |
314 | |
315 ClassHistogramDCmd::ClassHistogramDCmd(outputStream* output, bool heap) : | |
316 DCmdWithParser(output, heap), | |
317 _all("-all", "Inspect all objects, including unreachable objects", | |
318 "BOOLEAN", false, "false") { | |
319 _dcmdparser.add_dcmd_option(&_all); | |
320 } | |
321 | |
10215
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
322 void ClassHistogramDCmd::execute(DCmdSource source, TRAPS) { |
4773 | 323 VM_GC_HeapInspection heapop(output(), |
10405 | 324 !_all.value() /* request full gc if false */); |
4773 | 325 VMThread::execute(&heapop); |
326 } | |
327 | |
328 int ClassHistogramDCmd::num_arguments() { | |
329 ResourceMark rm; | |
330 ClassHistogramDCmd* dcmd = new ClassHistogramDCmd(NULL, false); | |
331 if (dcmd != NULL) { | |
332 DCmdMark mark(dcmd); | |
333 return dcmd->_dcmdparser.num_arguments(); | |
334 } else { | |
335 return 0; | |
336 } | |
337 } | |
338 | |
7956 | 339 #define DEFAULT_COLUMNS "InstBytes,KlassBytes,CpAll,annotations,MethodCount,Bytecodes,MethodAll,ROAll,RWAll,Total" |
340 ClassStatsDCmd::ClassStatsDCmd(outputStream* output, bool heap) : | |
341 DCmdWithParser(output, heap), | |
342 _csv("-csv", "Print in CSV (comma-separated values) format for spreadsheets", | |
343 "BOOLEAN", false, "false"), | |
344 _all("-all", "Show all columns", | |
345 "BOOLEAN", false, "false"), | |
346 _help("-help", "Show meaning of all the columns", | |
347 "BOOLEAN", false, "false"), | |
348 _columns("columns", "Comma-separated list of all the columns to show. " | |
349 "If not specified, the following columns are shown: " DEFAULT_COLUMNS, | |
350 "STRING", false) { | |
351 _dcmdparser.add_dcmd_option(&_all); | |
352 _dcmdparser.add_dcmd_option(&_csv); | |
353 _dcmdparser.add_dcmd_option(&_help); | |
354 _dcmdparser.add_dcmd_argument(&_columns); | |
355 } | |
356 | |
10215
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
357 void ClassStatsDCmd::execute(DCmdSource source, TRAPS) { |
7956 | 358 if (!UnlockDiagnosticVMOptions) { |
359 output()->print_cr("GC.class_stats command requires -XX:+UnlockDiagnosticVMOptions"); | |
360 return; | |
361 } | |
362 | |
363 VM_GC_HeapInspection heapop(output(), | |
10405 | 364 true /* request_full_gc */); |
7956 | 365 heapop.set_csv_format(_csv.value()); |
366 heapop.set_print_help(_help.value()); | |
367 heapop.set_print_class_stats(true); | |
368 if (_all.value()) { | |
369 if (_columns.has_value()) { | |
370 output()->print_cr("Cannot specify -all and individual columns at the same time"); | |
371 return; | |
372 } else { | |
373 heapop.set_columns(NULL); | |
374 } | |
375 } else { | |
376 if (_columns.has_value()) { | |
377 heapop.set_columns(_columns.value()); | |
378 } else { | |
379 heapop.set_columns(DEFAULT_COLUMNS); | |
380 } | |
381 } | |
382 VMThread::execute(&heapop); | |
383 } | |
384 | |
385 int ClassStatsDCmd::num_arguments() { | |
386 ResourceMark rm; | |
387 ClassStatsDCmd* dcmd = new ClassStatsDCmd(NULL, false); | |
388 if (dcmd != NULL) { | |
389 DCmdMark mark(dcmd); | |
390 return dcmd->_dcmdparser.num_arguments(); | |
391 } else { | |
392 return 0; | |
393 } | |
394 } | |
395 #endif // INCLUDE_SERVICES | |
396 | |
4773 | 397 ThreadDumpDCmd::ThreadDumpDCmd(outputStream* output, bool heap) : |
398 DCmdWithParser(output, heap), | |
399 _locks("-l", "print java.util.concurrent locks", "BOOLEAN", false, "false") { | |
400 _dcmdparser.add_dcmd_option(&_locks); | |
401 } | |
402 | |
10215
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
403 void ThreadDumpDCmd::execute(DCmdSource source, TRAPS) { |
4773 | 404 // thread stacks |
405 VM_PrintThreads op1(output(), _locks.value()); | |
406 VMThread::execute(&op1); | |
407 | |
408 // JNI global handles | |
409 VM_PrintJNI op2(output()); | |
410 VMThread::execute(&op2); | |
411 | |
412 // Deadlock detection | |
413 VM_FindDeadlocks op3(output()); | |
414 VMThread::execute(&op3); | |
415 } | |
416 | |
417 int ThreadDumpDCmd::num_arguments() { | |
418 ResourceMark rm; | |
419 ThreadDumpDCmd* dcmd = new ThreadDumpDCmd(NULL, false); | |
420 if (dcmd != NULL) { | |
421 DCmdMark mark(dcmd); | |
422 return dcmd->_dcmdparser.num_arguments(); | |
423 } else { | |
424 return 0; | |
425 } | |
426 } | |
5895
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
427 |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
428 // Enhanced JMX Agent support |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
429 |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
430 JMXStartRemoteDCmd::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
|
431 |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
432 DCmdWithParser(output, heap_allocated), |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
433 |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
434 _config_file |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
435 ("config.file", |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
436 "set com.sun.management.config.file", "STRING", false), |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
437 |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
438 _jmxremote_port |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
439 ("jmxremote.port", |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
440 "set com.sun.management.jmxremote.port", "STRING", false), |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
441 |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
442 _jmxremote_rmi_port |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
443 ("jmxremote.rmi.port", |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
444 "set com.sun.management.jmxremote.rmi.port", "STRING", false), |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
445 |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
446 _jmxremote_ssl |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
447 ("jmxremote.ssl", |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
448 "set com.sun.management.jmxremote.ssl", "STRING", false), |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
449 |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
450 _jmxremote_registry_ssl |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
451 ("jmxremote.registry.ssl", |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
452 "set com.sun.management.jmxremote.registry.ssl", "STRING", false), |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
453 |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
454 _jmxremote_authenticate |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
455 ("jmxremote.authenticate", |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
456 "set com.sun.management.jmxremote.authenticate", "STRING", false), |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
457 |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
458 _jmxremote_password_file |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
459 ("jmxremote.password.file", |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
460 "set com.sun.management.jmxremote.password.file", "STRING", false), |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
461 |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
462 _jmxremote_access_file |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
463 ("jmxremote.access.file", |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
464 "set com.sun.management.jmxremote.access.file", "STRING", false), |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
465 |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
466 _jmxremote_login_config |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
467 ("jmxremote.login.config", |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
468 "set com.sun.management.jmxremote.login.config", "STRING", false), |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
469 |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
470 _jmxremote_ssl_enabled_cipher_suites |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
471 ("jmxremote.ssl.enabled.cipher.suites", |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
472 "set com.sun.management.jmxremote.ssl.enabled.cipher.suite", "STRING", false), |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
473 |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
474 _jmxremote_ssl_enabled_protocols |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
475 ("jmxremote.ssl.enabled.protocols", |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
476 "set com.sun.management.jmxremote.ssl.enabled.protocols", "STRING", false), |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
477 |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
478 _jmxremote_ssl_need_client_auth |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
479 ("jmxremote.ssl.need.client.auth", |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
480 "set com.sun.management.jmxremote.need.client.auth", "STRING", false), |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
481 |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
482 _jmxremote_ssl_config_file |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
483 ("jmxremote.ssl.config.file", |
7979
8f696cf1a0fb
8002048: Protocol to discovery of manageable Java processes on a network
dsamersoff
parents:
7956
diff
changeset
|
484 "set com.sun.management.jmxremote.ssl_config_file", "STRING", false), |
8f696cf1a0fb
8002048: Protocol to discovery of manageable Java processes on a network
dsamersoff
parents:
7956
diff
changeset
|
485 |
8f696cf1a0fb
8002048: Protocol to discovery of manageable Java processes on a network
dsamersoff
parents:
7956
diff
changeset
|
486 // JDP Protocol support |
8f696cf1a0fb
8002048: Protocol to discovery of manageable Java processes on a network
dsamersoff
parents:
7956
diff
changeset
|
487 _jmxremote_autodiscovery |
8f696cf1a0fb
8002048: Protocol to discovery of manageable Java processes on a network
dsamersoff
parents:
7956
diff
changeset
|
488 ("jmxremote.autodiscovery", |
8f696cf1a0fb
8002048: Protocol to discovery of manageable Java processes on a network
dsamersoff
parents:
7956
diff
changeset
|
489 "set com.sun.management.jmxremote.autodiscovery", "STRING", false), |
8f696cf1a0fb
8002048: Protocol to discovery of manageable Java processes on a network
dsamersoff
parents:
7956
diff
changeset
|
490 |
8f696cf1a0fb
8002048: Protocol to discovery of manageable Java processes on a network
dsamersoff
parents:
7956
diff
changeset
|
491 _jdp_port |
8f696cf1a0fb
8002048: Protocol to discovery of manageable Java processes on a network
dsamersoff
parents:
7956
diff
changeset
|
492 ("jdp.port", |
8f696cf1a0fb
8002048: Protocol to discovery of manageable Java processes on a network
dsamersoff
parents:
7956
diff
changeset
|
493 "set com.sun.management.jdp.port", "INT", false), |
8f696cf1a0fb
8002048: Protocol to discovery of manageable Java processes on a network
dsamersoff
parents:
7956
diff
changeset
|
494 |
8f696cf1a0fb
8002048: Protocol to discovery of manageable Java processes on a network
dsamersoff
parents:
7956
diff
changeset
|
495 _jdp_address |
8f696cf1a0fb
8002048: Protocol to discovery of manageable Java processes on a network
dsamersoff
parents:
7956
diff
changeset
|
496 ("jdp.address", |
8f696cf1a0fb
8002048: Protocol to discovery of manageable Java processes on a network
dsamersoff
parents:
7956
diff
changeset
|
497 "set com.sun.management.jdp.address", "STRING", false), |
8f696cf1a0fb
8002048: Protocol to discovery of manageable Java processes on a network
dsamersoff
parents:
7956
diff
changeset
|
498 |
8f696cf1a0fb
8002048: Protocol to discovery of manageable Java processes on a network
dsamersoff
parents:
7956
diff
changeset
|
499 _jdp_source_addr |
8f696cf1a0fb
8002048: Protocol to discovery of manageable Java processes on a network
dsamersoff
parents:
7956
diff
changeset
|
500 ("jdp.source_addr", |
8f696cf1a0fb
8002048: Protocol to discovery of manageable Java processes on a network
dsamersoff
parents:
7956
diff
changeset
|
501 "set com.sun.management.jdp.source_addr", "STRING", false), |
8f696cf1a0fb
8002048: Protocol to discovery of manageable Java processes on a network
dsamersoff
parents:
7956
diff
changeset
|
502 |
8f696cf1a0fb
8002048: Protocol to discovery of manageable Java processes on a network
dsamersoff
parents:
7956
diff
changeset
|
503 _jdp_ttl |
8f696cf1a0fb
8002048: Protocol to discovery of manageable Java processes on a network
dsamersoff
parents:
7956
diff
changeset
|
504 ("jdp.ttl", |
8f696cf1a0fb
8002048: Protocol to discovery of manageable Java processes on a network
dsamersoff
parents:
7956
diff
changeset
|
505 "set com.sun.management.jdp.ttl", "INT", false), |
8f696cf1a0fb
8002048: Protocol to discovery of manageable Java processes on a network
dsamersoff
parents:
7956
diff
changeset
|
506 |
8f696cf1a0fb
8002048: Protocol to discovery of manageable Java processes on a network
dsamersoff
parents:
7956
diff
changeset
|
507 _jdp_pause |
8f696cf1a0fb
8002048: Protocol to discovery of manageable Java processes on a network
dsamersoff
parents:
7956
diff
changeset
|
508 ("jdp.pause", |
12943
996d1f2f056f
8026930: In ManagementAgent.start it should be possible to set the jdp.name parameter (hotspot part)
dsamersoff
parents:
10405
diff
changeset
|
509 "set com.sun.management.jdp.pause", "INT", false), |
996d1f2f056f
8026930: In ManagementAgent.start it should be possible to set the jdp.name parameter (hotspot part)
dsamersoff
parents:
10405
diff
changeset
|
510 |
996d1f2f056f
8026930: In ManagementAgent.start it should be possible to set the jdp.name parameter (hotspot part)
dsamersoff
parents:
10405
diff
changeset
|
511 _jdp_name |
996d1f2f056f
8026930: In ManagementAgent.start it should be possible to set the jdp.name parameter (hotspot part)
dsamersoff
parents:
10405
diff
changeset
|
512 ("jdp.name", |
996d1f2f056f
8026930: In ManagementAgent.start it should be possible to set the jdp.name parameter (hotspot part)
dsamersoff
parents:
10405
diff
changeset
|
513 "set com.sun.management.jdp.name", "STRING", false) |
5895
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
514 |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
515 { |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
516 _dcmdparser.add_dcmd_option(&_config_file); |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
517 _dcmdparser.add_dcmd_option(&_jmxremote_port); |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
518 _dcmdparser.add_dcmd_option(&_jmxremote_rmi_port); |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
519 _dcmdparser.add_dcmd_option(&_jmxremote_ssl); |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
520 _dcmdparser.add_dcmd_option(&_jmxremote_registry_ssl); |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
521 _dcmdparser.add_dcmd_option(&_jmxremote_authenticate); |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
522 _dcmdparser.add_dcmd_option(&_jmxremote_password_file); |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
523 _dcmdparser.add_dcmd_option(&_jmxremote_access_file); |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
524 _dcmdparser.add_dcmd_option(&_jmxremote_login_config); |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
525 _dcmdparser.add_dcmd_option(&_jmxremote_ssl_enabled_cipher_suites); |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
526 _dcmdparser.add_dcmd_option(&_jmxremote_ssl_enabled_protocols); |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
527 _dcmdparser.add_dcmd_option(&_jmxremote_ssl_need_client_auth); |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
528 _dcmdparser.add_dcmd_option(&_jmxremote_ssl_config_file); |
7979
8f696cf1a0fb
8002048: Protocol to discovery of manageable Java processes on a network
dsamersoff
parents:
7956
diff
changeset
|
529 _dcmdparser.add_dcmd_option(&_jmxremote_autodiscovery); |
8f696cf1a0fb
8002048: Protocol to discovery of manageable Java processes on a network
dsamersoff
parents:
7956
diff
changeset
|
530 _dcmdparser.add_dcmd_option(&_jdp_port); |
8f696cf1a0fb
8002048: Protocol to discovery of manageable Java processes on a network
dsamersoff
parents:
7956
diff
changeset
|
531 _dcmdparser.add_dcmd_option(&_jdp_address); |
8f696cf1a0fb
8002048: Protocol to discovery of manageable Java processes on a network
dsamersoff
parents:
7956
diff
changeset
|
532 _dcmdparser.add_dcmd_option(&_jdp_source_addr); |
8f696cf1a0fb
8002048: Protocol to discovery of manageable Java processes on a network
dsamersoff
parents:
7956
diff
changeset
|
533 _dcmdparser.add_dcmd_option(&_jdp_ttl); |
8f696cf1a0fb
8002048: Protocol to discovery of manageable Java processes on a network
dsamersoff
parents:
7956
diff
changeset
|
534 _dcmdparser.add_dcmd_option(&_jdp_pause); |
12943
996d1f2f056f
8026930: In ManagementAgent.start it should be possible to set the jdp.name parameter (hotspot part)
dsamersoff
parents:
10405
diff
changeset
|
535 _dcmdparser.add_dcmd_option(&_jdp_name); |
5895
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
536 } |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
537 |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
538 |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
539 int JMXStartRemoteDCmd::num_arguments() { |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
540 ResourceMark rm; |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
541 JMXStartRemoteDCmd* dcmd = new JMXStartRemoteDCmd(NULL, false); |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
542 if (dcmd != NULL) { |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
543 DCmdMark mark(dcmd); |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
544 return dcmd->_dcmdparser.num_arguments(); |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
545 } else { |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
546 return 0; |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
547 } |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
548 } |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
549 |
10215
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
550 |
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
551 void JMXStartRemoteDCmd::execute(DCmdSource source, TRAPS) { |
5895
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
552 ResourceMark rm(THREAD); |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
553 HandleMark hm(THREAD); |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
554 |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
555 // Load and initialize the sun.management.Agent class |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
556 // invoke startRemoteManagementAgent(string) method to start |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
557 // the remote management server. |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
558 // throw java.lang.NoSuchMethodError if the method doesn't exist |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
559 |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
560 Handle loader = Handle(THREAD, SystemDictionary::java_system_loader()); |
6725
da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
5895
diff
changeset
|
561 Klass* k = SystemDictionary::resolve_or_fail(vmSymbols::sun_management_Agent(), loader, Handle(), true, CHECK); |
5895
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
562 instanceKlassHandle ik (THREAD, k); |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
563 |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
564 JavaValue result(T_VOID); |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
565 |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
566 // Pass all command line arguments to java as key=value,... |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
567 // All checks are done on java side |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
568 |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
569 int len = 0; |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
570 stringStream options; |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
571 char comma[2] = {0,0}; |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
572 |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
573 // Leave default values on Agent.class side and pass only |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
574 // agruments explicitly set by user. All arguments passed |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
575 // to jcmd override properties with the same name set by |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
576 // command line with -D or by managmenent.properties |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
577 // file. |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
578 #define PUT_OPTION(a) \ |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
579 if ( (a).is_set() ){ \ |
7979
8f696cf1a0fb
8002048: Protocol to discovery of manageable Java processes on a network
dsamersoff
parents:
7956
diff
changeset
|
580 options.print(\ |
8f696cf1a0fb
8002048: Protocol to discovery of manageable Java processes on a network
dsamersoff
parents:
7956
diff
changeset
|
581 ( *((a).type()) == 'I' ) ? "%scom.sun.management.%s=%d" : "%scom.sun.management.%s=%s",\ |
8f696cf1a0fb
8002048: Protocol to discovery of manageable Java processes on a network
dsamersoff
parents:
7956
diff
changeset
|
582 comma, (a).name(), (a).value()); \ |
5895
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
583 comma[0] = ','; \ |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
584 } |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
585 |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
586 PUT_OPTION(_config_file); |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
587 PUT_OPTION(_jmxremote_port); |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
588 PUT_OPTION(_jmxremote_rmi_port); |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
589 PUT_OPTION(_jmxremote_ssl); |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
590 PUT_OPTION(_jmxremote_registry_ssl); |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
591 PUT_OPTION(_jmxremote_authenticate); |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
592 PUT_OPTION(_jmxremote_password_file); |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
593 PUT_OPTION(_jmxremote_access_file); |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
594 PUT_OPTION(_jmxremote_login_config); |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
595 PUT_OPTION(_jmxremote_ssl_enabled_cipher_suites); |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
596 PUT_OPTION(_jmxremote_ssl_enabled_protocols); |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
597 PUT_OPTION(_jmxremote_ssl_need_client_auth); |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
598 PUT_OPTION(_jmxremote_ssl_config_file); |
7979
8f696cf1a0fb
8002048: Protocol to discovery of manageable Java processes on a network
dsamersoff
parents:
7956
diff
changeset
|
599 PUT_OPTION(_jmxremote_autodiscovery); |
8f696cf1a0fb
8002048: Protocol to discovery of manageable Java processes on a network
dsamersoff
parents:
7956
diff
changeset
|
600 PUT_OPTION(_jdp_port); |
8f696cf1a0fb
8002048: Protocol to discovery of manageable Java processes on a network
dsamersoff
parents:
7956
diff
changeset
|
601 PUT_OPTION(_jdp_address); |
8f696cf1a0fb
8002048: Protocol to discovery of manageable Java processes on a network
dsamersoff
parents:
7956
diff
changeset
|
602 PUT_OPTION(_jdp_source_addr); |
8f696cf1a0fb
8002048: Protocol to discovery of manageable Java processes on a network
dsamersoff
parents:
7956
diff
changeset
|
603 PUT_OPTION(_jdp_ttl); |
8f696cf1a0fb
8002048: Protocol to discovery of manageable Java processes on a network
dsamersoff
parents:
7956
diff
changeset
|
604 PUT_OPTION(_jdp_pause); |
12943
996d1f2f056f
8026930: In ManagementAgent.start it should be possible to set the jdp.name parameter (hotspot part)
dsamersoff
parents:
10405
diff
changeset
|
605 PUT_OPTION(_jdp_name); |
5895
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
606 |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
607 #undef PUT_OPTION |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
608 |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
609 Handle str = java_lang_String::create_from_str(options.as_string(), CHECK); |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
610 JavaCalls::call_static(&result, ik, vmSymbols::startRemoteAgent_name(), vmSymbols::string_void_signature(), str, CHECK); |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
611 } |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
612 |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
613 JMXStartLocalDCmd::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
|
614 DCmd(output, heap_allocated) |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
615 { |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
616 // do nothing |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
617 } |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
618 |
10215
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
619 void JMXStartLocalDCmd::execute(DCmdSource source, TRAPS) { |
5895
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
620 ResourceMark rm(THREAD); |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
621 HandleMark hm(THREAD); |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
622 |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
623 // Load and initialize the sun.management.Agent class |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
624 // invoke startLocalManagementAgent(void) method to start |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
625 // the local management server |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
626 // throw java.lang.NoSuchMethodError if method doesn't exist |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
627 |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
628 Handle loader = Handle(THREAD, SystemDictionary::java_system_loader()); |
6725
da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
5895
diff
changeset
|
629 Klass* k = SystemDictionary::resolve_or_fail(vmSymbols::sun_management_Agent(), loader, Handle(), true, CHECK); |
5895
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
630 instanceKlassHandle ik (THREAD, k); |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
631 |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
632 JavaValue result(T_VOID); |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
633 JavaCalls::call_static(&result, ik, vmSymbols::startLocalAgent_name(), vmSymbols::void_method_signature(), CHECK); |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
634 } |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
635 |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
636 |
10215
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8003
diff
changeset
|
637 void JMXStopRemoteDCmd::execute(DCmdSource source, TRAPS) { |
5895
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
638 ResourceMark rm(THREAD); |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
639 HandleMark hm(THREAD); |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
640 |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
641 // Load and initialize the sun.management.Agent class |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
642 // invoke stopRemoteManagementAgent method to stop the |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
643 // management server |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
644 // throw java.lang.NoSuchMethodError if method doesn't exist |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
645 |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
646 Handle loader = Handle(THREAD, SystemDictionary::java_system_loader()); |
6725
da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
5895
diff
changeset
|
647 Klass* k = SystemDictionary::resolve_or_fail(vmSymbols::sun_management_Agent(), loader, Handle(), true, CHECK); |
5895
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
648 instanceKlassHandle ik (THREAD, k); |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
649 |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
650 JavaValue result(T_VOID); |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
651 JavaCalls::call_static(&result, ik, vmSymbols::stopRemoteAgent_name(), vmSymbols::void_method_signature(), CHECK); |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
652 } |
645162d94294
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
4851
diff
changeset
|
653 |
17827 | 654 void RotateGCLogDCmd::execute(DCmdSource source, TRAPS) { |
655 if (UseGCLogFileRotation) { | |
656 VM_RotateGCLog rotateop(output()); | |
657 VMThread::execute(&rotateop); | |
658 } else { | |
659 output()->print_cr("Target VM does not support GC log file rotation."); | |
660 } | |
661 } |