author | cjplummer |
Wed, 11 Feb 2015 15:22:43 -0800 | |
changeset 29071 | 73f45d04ad7a |
parent 26807 | 843ea33eb963 |
child 30121 | cc43664a0ad7 |
permissions | -rw-r--r-- |
11209 | 1 |
/* |
29071
73f45d04ad7a
8054888: Runtime: Add Diagnostic Command that prints the class hierarchy
cjplummer
parents:
26807
diff
changeset
|
2 |
* Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. |
11209 | 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 |
||
25715
d5a8dbdc5150
8049325: Introduce and clean up umbrella headers for the files in the cpu subdirectories.
goetz
parents:
23517
diff
changeset
|
28 |
#include "classfile/vmSymbols.hpp" |
11209 | 29 |
#include "runtime/arguments.hpp" |
25715
d5a8dbdc5150
8049325: Introduce and clean up umbrella headers for the files in the cpu subdirectories.
goetz
parents:
23517
diff
changeset
|
30 |
#include "runtime/os.hpp" |
11209 | 31 |
#include "runtime/vmThread.hpp" |
32 |
#include "services/diagnosticArgument.hpp" |
|
33 |
#include "services/diagnosticCommand.hpp" |
|
25715
d5a8dbdc5150
8049325: Introduce and clean up umbrella headers for the files in the cpu subdirectories.
goetz
parents:
23517
diff
changeset
|
34 |
#include "services/diagnosticCommand_ext.hpp" |
11209 | 35 |
#include "services/diagnosticFramework.hpp" |
15482
470d0b0c09f1
8005915: Unify SERIALGC and INCLUDE_ALTERNATE_GCS
jprovino
parents:
13975
diff
changeset
|
36 |
#include "utilities/macros.hpp" |
25715
d5a8dbdc5150
8049325: Introduce and clean up umbrella headers for the files in the cpu subdirectories.
goetz
parents:
23517
diff
changeset
|
37 |
#include "utilities/ostream.hpp" |
11209 | 38 |
|
11441 | 39 |
class HelpDCmd : public DCmdWithParser { |
11209 | 40 |
protected: |
41 |
DCmdArgument<bool> _all; |
|
42 |
DCmdArgument<char*> _cmd; |
|
43 |
public: |
|
44 |
HelpDCmd(outputStream* output, bool heap); |
|
45 |
static const char* name() { return "help"; } |
|
46 |
static const char* description() { |
|
47 |
return "For more information about a specific command use 'help <command>'. " |
|
48 |
"With no argument this will show a list of available commands. " |
|
49 |
"'help all' will show help for all commands."; |
|
50 |
} |
|
13200
7b506e7b406e
7178703: Fix handling of quoted arguments and better error messages in dcmd
sla
parents:
11953
diff
changeset
|
51 |
static const char* impact() { return "Low"; } |
11209 | 52 |
static int num_arguments(); |
17296
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
53 |
virtual void execute(DCmdSource source, TRAPS); |
11209 | 54 |
}; |
55 |
||
56 |
class VersionDCmd : public DCmd { |
|
57 |
public: |
|
58 |
VersionDCmd(outputStream* output, bool heap) : DCmd(output,heap) { } |
|
59 |
static const char* name() { return "VM.version"; } |
|
60 |
static const char* description() { |
|
61 |
return "Print JVM version information."; |
|
62 |
} |
|
13200
7b506e7b406e
7178703: Fix handling of quoted arguments and better error messages in dcmd
sla
parents:
11953
diff
changeset
|
63 |
static const char* impact() { return "Low"; } |
17296
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
64 |
static const JavaPermission permission() { |
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
65 |
JavaPermission p = {"java.util.PropertyPermission", |
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
66 |
"java.vm.version", "read"}; |
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
67 |
return p; |
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
68 |
} |
11209 | 69 |
static int num_arguments() { return 0; } |
17296
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
70 |
virtual void execute(DCmdSource source, TRAPS); |
11441 | 71 |
}; |
72 |
||
73 |
class CommandLineDCmd : public DCmd { |
|
74 |
public: |
|
75 |
CommandLineDCmd(outputStream* output, bool heap) : DCmd(output, heap) { } |
|
76 |
static const char* name() { return "VM.command_line"; } |
|
77 |
static const char* description() { |
|
78 |
return "Print the command line used to start this VM instance."; |
|
79 |
} |
|
13200
7b506e7b406e
7178703: Fix handling of quoted arguments and better error messages in dcmd
sla
parents:
11953
diff
changeset
|
80 |
static const char* impact() { return "Low"; } |
17296
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
81 |
static const JavaPermission permission() { |
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
82 |
JavaPermission p = {"java.lang.management.ManagementPermission", |
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
83 |
"monitor", NULL}; |
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
84 |
return p; |
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
85 |
} |
11441 | 86 |
static int num_arguments() { return 0; } |
17296
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
87 |
virtual void execute(DCmdSource source, TRAPS) { |
11441 | 88 |
Arguments::print_on(_output); |
89 |
} |
|
90 |
}; |
|
91 |
||
92 |
// See also: get_system_properties in attachListener.cpp |
|
93 |
class PrintSystemPropertiesDCmd : public DCmd { |
|
94 |
public: |
|
95 |
PrintSystemPropertiesDCmd(outputStream* output, bool heap) : DCmd(output, heap) { } |
|
96 |
static const char* name() { return "VM.system_properties"; } |
|
97 |
static const char* description() { |
|
98 |
return "Print system properties."; |
|
99 |
} |
|
100 |
static const char* impact() { |
|
13200
7b506e7b406e
7178703: Fix handling of quoted arguments and better error messages in dcmd
sla
parents:
11953
diff
changeset
|
101 |
return "Low"; |
11441 | 102 |
} |
17296
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
103 |
static const JavaPermission permission() { |
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
104 |
JavaPermission p = {"java.util.PropertyPermission", |
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
105 |
"*", "read"}; |
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
106 |
return p; |
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
107 |
} |
11441 | 108 |
static int num_arguments() { return 0; } |
17296
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
109 |
virtual void execute(DCmdSource source, TRAPS); |
11441 | 110 |
}; |
111 |
||
112 |
// See also: print_flag in attachListener.cpp |
|
113 |
class PrintVMFlagsDCmd : public DCmdWithParser { |
|
114 |
protected: |
|
115 |
DCmdArgument<bool> _all; |
|
116 |
public: |
|
117 |
PrintVMFlagsDCmd(outputStream* output, bool heap); |
|
118 |
static const char* name() { return "VM.flags"; } |
|
119 |
static const char* description() { |
|
120 |
return "Print VM flag options and their current values."; |
|
121 |
} |
|
122 |
static const char* impact() { |
|
13200
7b506e7b406e
7178703: Fix handling of quoted arguments and better error messages in dcmd
sla
parents:
11953
diff
changeset
|
123 |
return "Low"; |
11441 | 124 |
} |
17296
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
125 |
static const JavaPermission permission() { |
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
126 |
JavaPermission p = {"java.lang.management.ManagementPermission", |
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
127 |
"monitor", NULL}; |
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
128 |
return p; |
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
129 |
} |
11441 | 130 |
static int num_arguments(); |
17296
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
131 |
virtual void execute(DCmdSource source, TRAPS); |
11441 | 132 |
}; |
133 |
||
22490
039128291aa6
8031304: Add dcmd to print all loaded dynamic libraries.
farvidsson
parents:
21076
diff
changeset
|
134 |
class VMDynamicLibrariesDCmd : public DCmd { |
039128291aa6
8031304: Add dcmd to print all loaded dynamic libraries.
farvidsson
parents:
21076
diff
changeset
|
135 |
public: |
039128291aa6
8031304: Add dcmd to print all loaded dynamic libraries.
farvidsson
parents:
21076
diff
changeset
|
136 |
VMDynamicLibrariesDCmd(outputStream* output, bool heap); |
039128291aa6
8031304: Add dcmd to print all loaded dynamic libraries.
farvidsson
parents:
21076
diff
changeset
|
137 |
static const char* name() { |
039128291aa6
8031304: Add dcmd to print all loaded dynamic libraries.
farvidsson
parents:
21076
diff
changeset
|
138 |
return "VM.dynlibs"; |
039128291aa6
8031304: Add dcmd to print all loaded dynamic libraries.
farvidsson
parents:
21076
diff
changeset
|
139 |
} |
039128291aa6
8031304: Add dcmd to print all loaded dynamic libraries.
farvidsson
parents:
21076
diff
changeset
|
140 |
static const char* description() { |
039128291aa6
8031304: Add dcmd to print all loaded dynamic libraries.
farvidsson
parents:
21076
diff
changeset
|
141 |
return "Print loaded dynamic libraries."; |
039128291aa6
8031304: Add dcmd to print all loaded dynamic libraries.
farvidsson
parents:
21076
diff
changeset
|
142 |
} |
039128291aa6
8031304: Add dcmd to print all loaded dynamic libraries.
farvidsson
parents:
21076
diff
changeset
|
143 |
static const char* impact() { |
039128291aa6
8031304: Add dcmd to print all loaded dynamic libraries.
farvidsson
parents:
21076
diff
changeset
|
144 |
return "Low"; |
039128291aa6
8031304: Add dcmd to print all loaded dynamic libraries.
farvidsson
parents:
21076
diff
changeset
|
145 |
} |
039128291aa6
8031304: Add dcmd to print all loaded dynamic libraries.
farvidsson
parents:
21076
diff
changeset
|
146 |
static const JavaPermission permission() { |
039128291aa6
8031304: Add dcmd to print all loaded dynamic libraries.
farvidsson
parents:
21076
diff
changeset
|
147 |
JavaPermission p = {"java.lang.management.ManagementPermission", |
039128291aa6
8031304: Add dcmd to print all loaded dynamic libraries.
farvidsson
parents:
21076
diff
changeset
|
148 |
"monitor", NULL}; |
039128291aa6
8031304: Add dcmd to print all loaded dynamic libraries.
farvidsson
parents:
21076
diff
changeset
|
149 |
return p; |
039128291aa6
8031304: Add dcmd to print all loaded dynamic libraries.
farvidsson
parents:
21076
diff
changeset
|
150 |
} |
039128291aa6
8031304: Add dcmd to print all loaded dynamic libraries.
farvidsson
parents:
21076
diff
changeset
|
151 |
static int num_arguments() { |
039128291aa6
8031304: Add dcmd to print all loaded dynamic libraries.
farvidsson
parents:
21076
diff
changeset
|
152 |
return 0; |
039128291aa6
8031304: Add dcmd to print all loaded dynamic libraries.
farvidsson
parents:
21076
diff
changeset
|
153 |
}; |
039128291aa6
8031304: Add dcmd to print all loaded dynamic libraries.
farvidsson
parents:
21076
diff
changeset
|
154 |
virtual void execute(DCmdSource source, TRAPS); |
039128291aa6
8031304: Add dcmd to print all loaded dynamic libraries.
farvidsson
parents:
21076
diff
changeset
|
155 |
}; |
039128291aa6
8031304: Add dcmd to print all loaded dynamic libraries.
farvidsson
parents:
21076
diff
changeset
|
156 |
|
11441 | 157 |
class VMUptimeDCmd : public DCmdWithParser { |
158 |
protected: |
|
159 |
DCmdArgument<bool> _date; |
|
160 |
public: |
|
161 |
VMUptimeDCmd(outputStream* output, bool heap); |
|
162 |
static const char* name() { return "VM.uptime"; } |
|
163 |
static const char* description() { |
|
164 |
return "Print VM uptime."; |
|
165 |
} |
|
166 |
static const char* impact() { |
|
13200
7b506e7b406e
7178703: Fix handling of quoted arguments and better error messages in dcmd
sla
parents:
11953
diff
changeset
|
167 |
return "Low"; |
11441 | 168 |
} |
169 |
static int num_arguments(); |
|
17296
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
170 |
virtual void execute(DCmdSource source, TRAPS); |
11441 | 171 |
}; |
172 |
||
173 |
class SystemGCDCmd : public DCmd { |
|
174 |
public: |
|
175 |
SystemGCDCmd(outputStream* output, bool heap) : DCmd(output, heap) { } |
|
176 |
static const char* name() { return "GC.run"; } |
|
177 |
static const char* description() { |
|
178 |
return "Call java.lang.System.gc()."; |
|
179 |
} |
|
180 |
static const char* impact() { |
|
181 |
return "Medium: Depends on Java heap size and content."; |
|
182 |
} |
|
183 |
static int num_arguments() { return 0; } |
|
17296
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
184 |
virtual void execute(DCmdSource source, TRAPS); |
11441 | 185 |
}; |
186 |
||
187 |
class RunFinalizationDCmd : public DCmd { |
|
188 |
public: |
|
189 |
RunFinalizationDCmd(outputStream* output, bool heap) : DCmd(output, heap) { } |
|
190 |
static const char* name() { return "GC.run_finalization"; } |
|
191 |
static const char* description() { |
|
192 |
return "Call java.lang.System.runFinalization()."; |
|
193 |
} |
|
194 |
static const char* impact() { |
|
195 |
return "Medium: Depends on Java content."; |
|
196 |
} |
|
197 |
static int num_arguments() { return 0; } |
|
17296
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
198 |
virtual void execute(DCmdSource source, TRAPS); |
11441 | 199 |
}; |
200 |
||
13975
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
13200
diff
changeset
|
201 |
#if INCLUDE_SERVICES // Heap dumping supported |
11441 | 202 |
// See also: dump_heap in attachListener.cpp |
203 |
class HeapDumpDCmd : public DCmdWithParser { |
|
204 |
protected: |
|
205 |
DCmdArgument<char*> _filename; |
|
206 |
DCmdArgument<bool> _all; |
|
207 |
public: |
|
208 |
HeapDumpDCmd(outputStream* output, bool heap); |
|
209 |
static const char* name() { |
|
210 |
return "GC.heap_dump"; |
|
211 |
} |
|
212 |
static const char* description() { |
|
213 |
return "Generate a HPROF format dump of the Java heap."; |
|
214 |
} |
|
215 |
static const char* impact() { |
|
216 |
return "High: Depends on Java heap size and content. " |
|
217 |
"Request a full GC unless the '-all' option is specified."; |
|
218 |
} |
|
17296
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
219 |
static const JavaPermission permission() { |
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
220 |
JavaPermission p = {"java.lang.management.ManagementPermission", |
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
221 |
"monitor", NULL}; |
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
222 |
return p; |
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
223 |
} |
11441 | 224 |
static int num_arguments(); |
17296
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
225 |
virtual void execute(DCmdSource source, TRAPS); |
11441 | 226 |
}; |
13975
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
13200
diff
changeset
|
227 |
#endif // INCLUDE_SERVICES |
11441 | 228 |
|
15437 | 229 |
// See also: inspectheap in attachListener.cpp |
11441 | 230 |
class ClassHistogramDCmd : public DCmdWithParser { |
231 |
protected: |
|
232 |
DCmdArgument<bool> _all; |
|
233 |
public: |
|
234 |
ClassHistogramDCmd(outputStream* output, bool heap); |
|
235 |
static const char* name() { |
|
236 |
return "GC.class_histogram"; |
|
237 |
} |
|
238 |
static const char* description() { |
|
239 |
return "Provide statistics about the Java heap usage."; |
|
240 |
} |
|
241 |
static const char* impact() { |
|
242 |
return "High: Depends on Java heap size and content."; |
|
243 |
} |
|
17296
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
244 |
static const JavaPermission permission() { |
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
245 |
JavaPermission p = {"java.lang.management.ManagementPermission", |
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
246 |
"monitor", NULL}; |
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
247 |
return p; |
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
248 |
} |
11441 | 249 |
static int num_arguments(); |
17296
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
250 |
virtual void execute(DCmdSource source, TRAPS); |
11441 | 251 |
}; |
252 |
||
15437 | 253 |
class ClassStatsDCmd : public DCmdWithParser { |
254 |
protected: |
|
255 |
DCmdArgument<bool> _all; |
|
256 |
DCmdArgument<bool> _csv; |
|
257 |
DCmdArgument<bool> _help; |
|
258 |
DCmdArgument<char*> _columns; |
|
259 |
public: |
|
260 |
ClassStatsDCmd(outputStream* output, bool heap); |
|
261 |
static const char* name() { |
|
262 |
return "GC.class_stats"; |
|
263 |
} |
|
264 |
static const char* description() { |
|
265 |
return "Provide statistics about Java class meta data. Requires -XX:+UnlockDiagnosticVMOptions."; |
|
266 |
} |
|
267 |
static const char* impact() { |
|
268 |
return "High: Depends on Java heap size and content."; |
|
269 |
} |
|
270 |
static int num_arguments(); |
|
17296
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
271 |
virtual void execute(DCmdSource source, TRAPS); |
15437 | 272 |
}; |
273 |
||
29071
73f45d04ad7a
8054888: Runtime: Add Diagnostic Command that prints the class hierarchy
cjplummer
parents:
26807
diff
changeset
|
274 |
|
73f45d04ad7a
8054888: Runtime: Add Diagnostic Command that prints the class hierarchy
cjplummer
parents:
26807
diff
changeset
|
275 |
class ClassHierarchyDCmd : public DCmdWithParser { |
73f45d04ad7a
8054888: Runtime: Add Diagnostic Command that prints the class hierarchy
cjplummer
parents:
26807
diff
changeset
|
276 |
protected: |
73f45d04ad7a
8054888: Runtime: Add Diagnostic Command that prints the class hierarchy
cjplummer
parents:
26807
diff
changeset
|
277 |
DCmdArgument<bool> _print_interfaces; // true if inherited interfaces should be printed. |
73f45d04ad7a
8054888: Runtime: Add Diagnostic Command that prints the class hierarchy
cjplummer
parents:
26807
diff
changeset
|
278 |
DCmdArgument<bool> _print_subclasses; // true if subclasses of the specified classname should be printed. |
73f45d04ad7a
8054888: Runtime: Add Diagnostic Command that prints the class hierarchy
cjplummer
parents:
26807
diff
changeset
|
279 |
DCmdArgument<char*> _classname; // Optional single class name whose hierarchy should be printed. |
73f45d04ad7a
8054888: Runtime: Add Diagnostic Command that prints the class hierarchy
cjplummer
parents:
26807
diff
changeset
|
280 |
public: |
73f45d04ad7a
8054888: Runtime: Add Diagnostic Command that prints the class hierarchy
cjplummer
parents:
26807
diff
changeset
|
281 |
ClassHierarchyDCmd(outputStream* output, bool heap); |
73f45d04ad7a
8054888: Runtime: Add Diagnostic Command that prints the class hierarchy
cjplummer
parents:
26807
diff
changeset
|
282 |
static const char* name() { |
73f45d04ad7a
8054888: Runtime: Add Diagnostic Command that prints the class hierarchy
cjplummer
parents:
26807
diff
changeset
|
283 |
return "VM.class_hierarchy"; |
73f45d04ad7a
8054888: Runtime: Add Diagnostic Command that prints the class hierarchy
cjplummer
parents:
26807
diff
changeset
|
284 |
} |
73f45d04ad7a
8054888: Runtime: Add Diagnostic Command that prints the class hierarchy
cjplummer
parents:
26807
diff
changeset
|
285 |
static const char* description() { |
73f45d04ad7a
8054888: Runtime: Add Diagnostic Command that prints the class hierarchy
cjplummer
parents:
26807
diff
changeset
|
286 |
return "Print a list of all loaded classes, indented to show the class hiearchy. " |
73f45d04ad7a
8054888: Runtime: Add Diagnostic Command that prints the class hierarchy
cjplummer
parents:
26807
diff
changeset
|
287 |
"The name of each class is followed by the ClassLoaderData* of its ClassLoader, " |
73f45d04ad7a
8054888: Runtime: Add Diagnostic Command that prints the class hierarchy
cjplummer
parents:
26807
diff
changeset
|
288 |
"or \"null\" if loaded by the bootstrap class loader."; |
73f45d04ad7a
8054888: Runtime: Add Diagnostic Command that prints the class hierarchy
cjplummer
parents:
26807
diff
changeset
|
289 |
} |
73f45d04ad7a
8054888: Runtime: Add Diagnostic Command that prints the class hierarchy
cjplummer
parents:
26807
diff
changeset
|
290 |
static const char* impact() { |
73f45d04ad7a
8054888: Runtime: Add Diagnostic Command that prints the class hierarchy
cjplummer
parents:
26807
diff
changeset
|
291 |
return "Medium: Depends on number of loaded classes."; |
73f45d04ad7a
8054888: Runtime: Add Diagnostic Command that prints the class hierarchy
cjplummer
parents:
26807
diff
changeset
|
292 |
} |
73f45d04ad7a
8054888: Runtime: Add Diagnostic Command that prints the class hierarchy
cjplummer
parents:
26807
diff
changeset
|
293 |
static const JavaPermission permission() { |
73f45d04ad7a
8054888: Runtime: Add Diagnostic Command that prints the class hierarchy
cjplummer
parents:
26807
diff
changeset
|
294 |
JavaPermission p = {"java.lang.management.ManagementPermission", |
73f45d04ad7a
8054888: Runtime: Add Diagnostic Command that prints the class hierarchy
cjplummer
parents:
26807
diff
changeset
|
295 |
"monitor", NULL}; |
73f45d04ad7a
8054888: Runtime: Add Diagnostic Command that prints the class hierarchy
cjplummer
parents:
26807
diff
changeset
|
296 |
return p; |
73f45d04ad7a
8054888: Runtime: Add Diagnostic Command that prints the class hierarchy
cjplummer
parents:
26807
diff
changeset
|
297 |
} |
73f45d04ad7a
8054888: Runtime: Add Diagnostic Command that prints the class hierarchy
cjplummer
parents:
26807
diff
changeset
|
298 |
static int num_arguments(); |
73f45d04ad7a
8054888: Runtime: Add Diagnostic Command that prints the class hierarchy
cjplummer
parents:
26807
diff
changeset
|
299 |
virtual void execute(DCmdSource source, TRAPS); |
73f45d04ad7a
8054888: Runtime: Add Diagnostic Command that prints the class hierarchy
cjplummer
parents:
26807
diff
changeset
|
300 |
}; |
73f45d04ad7a
8054888: Runtime: Add Diagnostic Command that prints the class hierarchy
cjplummer
parents:
26807
diff
changeset
|
301 |
|
11441 | 302 |
// See also: thread_dump in attachListener.cpp |
303 |
class ThreadDumpDCmd : public DCmdWithParser { |
|
304 |
protected: |
|
305 |
DCmdArgument<bool> _locks; |
|
306 |
public: |
|
307 |
ThreadDumpDCmd(outputStream* output, bool heap); |
|
308 |
static const char* name() { return "Thread.print"; } |
|
309 |
static const char* description() { |
|
310 |
return "Print all threads with stacktraces."; |
|
311 |
} |
|
312 |
static const char* impact() { |
|
313 |
return "Medium: Depends on the number of threads."; |
|
314 |
} |
|
17296
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
315 |
static const JavaPermission permission() { |
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
316 |
JavaPermission p = {"java.lang.management.ManagementPermission", |
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
317 |
"monitor", NULL}; |
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
318 |
return p; |
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
319 |
} |
11441 | 320 |
static int num_arguments(); |
17296
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
321 |
virtual void execute(DCmdSource source, TRAPS); |
11209 | 322 |
}; |
323 |
||
11953
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
324 |
// Enhanced JMX Agent support |
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
325 |
|
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
326 |
class JMXStartRemoteDCmd : public DCmdWithParser { |
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
327 |
|
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
328 |
// Explicitly list all properties that could be |
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
329 |
// passed to Agent.startRemoteManagementAgent() |
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
330 |
// com.sun.management is omitted |
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
331 |
|
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
332 |
DCmdArgument<char *> _config_file; |
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
333 |
DCmdArgument<char *> _jmxremote_port; |
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
334 |
DCmdArgument<char *> _jmxremote_rmi_port; |
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
335 |
DCmdArgument<char *> _jmxremote_ssl; |
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
336 |
DCmdArgument<char *> _jmxremote_registry_ssl; |
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
337 |
DCmdArgument<char *> _jmxremote_authenticate; |
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
338 |
DCmdArgument<char *> _jmxremote_password_file; |
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
339 |
DCmdArgument<char *> _jmxremote_access_file; |
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
340 |
DCmdArgument<char *> _jmxremote_login_config; |
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
341 |
DCmdArgument<char *> _jmxremote_ssl_enabled_cipher_suites; |
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
342 |
DCmdArgument<char *> _jmxremote_ssl_enabled_protocols; |
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
343 |
DCmdArgument<char *> _jmxremote_ssl_need_client_auth; |
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
344 |
DCmdArgument<char *> _jmxremote_ssl_config_file; |
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
345 |
|
15460
ac08a4bdd0f6
8002048: Protocol to discovery of manageable Java processes on a network
dsamersoff
parents:
15437
diff
changeset
|
346 |
// JDP support |
ac08a4bdd0f6
8002048: Protocol to discovery of manageable Java processes on a network
dsamersoff
parents:
15437
diff
changeset
|
347 |
// Keep autodiscovery char* not bool to pass true/false |
ac08a4bdd0f6
8002048: Protocol to discovery of manageable Java processes on a network
dsamersoff
parents:
15437
diff
changeset
|
348 |
// as property value to java level. |
ac08a4bdd0f6
8002048: Protocol to discovery of manageable Java processes on a network
dsamersoff
parents:
15437
diff
changeset
|
349 |
DCmdArgument<char *> _jmxremote_autodiscovery; |
ac08a4bdd0f6
8002048: Protocol to discovery of manageable Java processes on a network
dsamersoff
parents:
15437
diff
changeset
|
350 |
DCmdArgument<jlong> _jdp_port; |
ac08a4bdd0f6
8002048: Protocol to discovery of manageable Java processes on a network
dsamersoff
parents:
15437
diff
changeset
|
351 |
DCmdArgument<char *> _jdp_address; |
ac08a4bdd0f6
8002048: Protocol to discovery of manageable Java processes on a network
dsamersoff
parents:
15437
diff
changeset
|
352 |
DCmdArgument<char *> _jdp_source_addr; |
ac08a4bdd0f6
8002048: Protocol to discovery of manageable Java processes on a network
dsamersoff
parents:
15437
diff
changeset
|
353 |
DCmdArgument<jlong> _jdp_ttl; |
ac08a4bdd0f6
8002048: Protocol to discovery of manageable Java processes on a network
dsamersoff
parents:
15437
diff
changeset
|
354 |
DCmdArgument<jlong> _jdp_pause; |
21076
7cea9d36a46e
8026930: In ManagementAgent.start it should be possible to set the jdp.name parameter (hotspot part)
dsamersoff
parents:
17296
diff
changeset
|
355 |
DCmdArgument<char *> _jdp_name; |
15460
ac08a4bdd0f6
8002048: Protocol to discovery of manageable Java processes on a network
dsamersoff
parents:
15437
diff
changeset
|
356 |
|
11953
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
357 |
public: |
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
358 |
JMXStartRemoteDCmd(outputStream *output, bool heap_allocated); |
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
359 |
|
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
360 |
static const char *name() { |
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
361 |
return "ManagementAgent.start"; |
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
362 |
} |
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
363 |
|
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
364 |
static const char *description() { |
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
365 |
return "Start remote management agent."; |
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
366 |
} |
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
367 |
|
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
368 |
static int num_arguments(); |
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
369 |
|
17296
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
370 |
virtual void execute(DCmdSource source, TRAPS); |
11953
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
371 |
|
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
372 |
}; |
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
373 |
|
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
374 |
class JMXStartLocalDCmd : public DCmd { |
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
375 |
|
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
376 |
// Explicitly request start of local agent, |
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
377 |
// it will not be started by start dcmd |
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
378 |
|
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
379 |
|
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
380 |
public: |
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
381 |
JMXStartLocalDCmd(outputStream *output, bool heap_allocated); |
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
382 |
|
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
383 |
static const char *name() { |
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
384 |
return "ManagementAgent.start_local"; |
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
385 |
} |
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
386 |
|
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
387 |
static const char *description() { |
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
388 |
return "Start local management agent."; |
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
389 |
} |
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
390 |
|
17296
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
391 |
virtual void execute(DCmdSource source, TRAPS); |
11953
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
392 |
|
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
393 |
}; |
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
394 |
|
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
395 |
class JMXStopRemoteDCmd : public DCmd { |
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
396 |
public: |
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
397 |
JMXStopRemoteDCmd(outputStream *output, bool heap_allocated) : |
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
398 |
DCmd(output, heap_allocated) { |
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
399 |
// Do Nothing |
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
400 |
} |
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
401 |
|
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
402 |
static const char *name() { |
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
403 |
return "ManagementAgent.stop"; |
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
404 |
} |
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
405 |
|
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
406 |
static const char *description() { |
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
407 |
return "Stop remote management agent."; |
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
408 |
} |
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
409 |
|
17296
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
410 |
virtual void execute(DCmdSource source, TRAPS); |
11953
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
411 |
}; |
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
412 |
|
23517 | 413 |
class RotateGCLogDCmd : public DCmd { |
414 |
public: |
|
415 |
RotateGCLogDCmd(outputStream* output, bool heap) : DCmd(output, heap) {} |
|
416 |
static const char* name() { return "GC.rotate_log"; } |
|
417 |
static const char* description() { |
|
418 |
return "Force the GC log file to be rotated."; |
|
419 |
} |
|
420 |
static const char* impact() { return "Low"; } |
|
421 |
virtual void execute(DCmdSource source, TRAPS); |
|
422 |
static int num_arguments() { return 0; } |
|
423 |
static const JavaPermission permission() { |
|
424 |
JavaPermission p = {"java.lang.management.ManagementPermission", |
|
425 |
"control", NULL}; |
|
426 |
return p; |
|
427 |
} |
|
428 |
}; |
|
429 |
||
26587 | 430 |
class CompileQueueDCmd : public DCmd { |
431 |
public: |
|
432 |
CompileQueueDCmd(outputStream* output, bool heap) : DCmd(output, heap) {} |
|
433 |
static const char* name() { |
|
434 |
return "Compiler.queue"; |
|
435 |
} |
|
436 |
static const char* description() { |
|
437 |
return "Print methods queued for compilation."; |
|
438 |
} |
|
439 |
static const char* impact() { |
|
440 |
return "Low"; |
|
441 |
} |
|
442 |
static const JavaPermission permission() { |
|
443 |
JavaPermission p = {"java.lang.management.ManagementPermission", |
|
444 |
"monitor", NULL}; |
|
445 |
return p; |
|
446 |
} |
|
447 |
static int num_arguments() { return 0; } |
|
448 |
virtual void execute(DCmdSource source, TRAPS); |
|
449 |
}; |
|
450 |
||
451 |
class CodeListDCmd : public DCmd { |
|
452 |
public: |
|
453 |
CodeListDCmd(outputStream* output, bool heap) : DCmd(output, heap) {} |
|
454 |
static const char* name() { |
|
455 |
return "Compiler.codelist"; |
|
456 |
} |
|
457 |
static const char* description() { |
|
26807
843ea33eb963
8058461: serviceability/dcmd/CodelistTest.java and serviceability/dcmd/CompilerQueueTest.java SIGSEGV
neliasso
parents:
26587
diff
changeset
|
458 |
return "Print all compiled methods in code cache that are alive"; |
26587 | 459 |
} |
460 |
static const char* impact() { |
|
461 |
return "Medium"; |
|
462 |
} |
|
463 |
static const JavaPermission permission() { |
|
464 |
JavaPermission p = {"java.lang.management.ManagementPermission", |
|
465 |
"monitor", NULL}; |
|
466 |
return p; |
|
467 |
} |
|
468 |
static int num_arguments() { return 0; } |
|
469 |
virtual void execute(DCmdSource source, TRAPS); |
|
470 |
}; |
|
471 |
||
472 |
||
473 |
class CodeCacheDCmd : public DCmd { |
|
474 |
public: |
|
475 |
CodeCacheDCmd(outputStream* output, bool heap) : DCmd(output, heap) {} |
|
476 |
static const char* name() { |
|
477 |
return "Compiler.codecache"; |
|
478 |
} |
|
479 |
static const char* description() { |
|
480 |
return "Print code cache layout and bounds."; |
|
481 |
} |
|
482 |
static const char* impact() { |
|
483 |
return "Low"; |
|
484 |
} |
|
485 |
static const JavaPermission permission() { |
|
486 |
JavaPermission p = {"java.lang.management.ManagementPermission", |
|
487 |
"monitor", NULL}; |
|
488 |
return p; |
|
489 |
} |
|
490 |
static int num_arguments() { return 0; } |
|
491 |
virtual void execute(DCmdSource source, TRAPS); |
|
492 |
}; |
|
493 |
||
11209 | 494 |
#endif // SHARE_VM_SERVICES_DIAGNOSTICCOMMAND_HPP |