author | sla |
Fri, 28 Oct 2016 08:40:35 +0200 | |
changeset 42075 | e5b263ac8c2e |
parent 37195 | 88b6f1271f64 |
child 46742 | 24ec8a039c90 |
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" |
31790 | 38 |
#include "oops/method.hpp" |
11209 | 39 |
|
11441 | 40 |
class HelpDCmd : public DCmdWithParser { |
11209 | 41 |
protected: |
42 |
DCmdArgument<bool> _all; |
|
43 |
DCmdArgument<char*> _cmd; |
|
44 |
public: |
|
45 |
HelpDCmd(outputStream* output, bool heap); |
|
46 |
static const char* name() { return "help"; } |
|
47 |
static const char* description() { |
|
48 |
return "For more information about a specific command use 'help <command>'. " |
|
49 |
"With no argument this will show a list of available commands. " |
|
50 |
"'help all' will show help for all commands."; |
|
51 |
} |
|
13200
7b506e7b406e
7178703: Fix handling of quoted arguments and better error messages in dcmd
sla
parents:
11953
diff
changeset
|
52 |
static const char* impact() { return "Low"; } |
11209 | 53 |
static int num_arguments(); |
17296
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
54 |
virtual void execute(DCmdSource source, TRAPS); |
11209 | 55 |
}; |
56 |
||
57 |
class VersionDCmd : public DCmd { |
|
58 |
public: |
|
59 |
VersionDCmd(outputStream* output, bool heap) : DCmd(output,heap) { } |
|
60 |
static const char* name() { return "VM.version"; } |
|
61 |
static const char* description() { |
|
62 |
return "Print JVM version information."; |
|
63 |
} |
|
13200
7b506e7b406e
7178703: Fix handling of quoted arguments and better error messages in dcmd
sla
parents:
11953
diff
changeset
|
64 |
static const char* impact() { return "Low"; } |
17296
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
65 |
static const JavaPermission permission() { |
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
66 |
JavaPermission p = {"java.util.PropertyPermission", |
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
67 |
"java.vm.version", "read"}; |
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
68 |
return p; |
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
69 |
} |
11209 | 70 |
static int num_arguments() { return 0; } |
17296
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
71 |
virtual void execute(DCmdSource source, TRAPS); |
11441 | 72 |
}; |
73 |
||
74 |
class CommandLineDCmd : public DCmd { |
|
75 |
public: |
|
76 |
CommandLineDCmd(outputStream* output, bool heap) : DCmd(output, heap) { } |
|
77 |
static const char* name() { return "VM.command_line"; } |
|
78 |
static const char* description() { |
|
79 |
return "Print the command line used to start this VM instance."; |
|
80 |
} |
|
13200
7b506e7b406e
7178703: Fix handling of quoted arguments and better error messages in dcmd
sla
parents:
11953
diff
changeset
|
81 |
static const char* impact() { return "Low"; } |
17296
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
82 |
static const JavaPermission permission() { |
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
83 |
JavaPermission p = {"java.lang.management.ManagementPermission", |
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
84 |
"monitor", NULL}; |
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
85 |
return p; |
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
86 |
} |
11441 | 87 |
static int num_arguments() { return 0; } |
17296
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
88 |
virtual void execute(DCmdSource source, TRAPS) { |
11441 | 89 |
Arguments::print_on(_output); |
90 |
} |
|
91 |
}; |
|
92 |
||
93 |
// See also: get_system_properties in attachListener.cpp |
|
94 |
class PrintSystemPropertiesDCmd : public DCmd { |
|
95 |
public: |
|
96 |
PrintSystemPropertiesDCmd(outputStream* output, bool heap) : DCmd(output, heap) { } |
|
97 |
static const char* name() { return "VM.system_properties"; } |
|
98 |
static const char* description() { |
|
99 |
return "Print system properties."; |
|
100 |
} |
|
101 |
static const char* impact() { |
|
13200
7b506e7b406e
7178703: Fix handling of quoted arguments and better error messages in dcmd
sla
parents:
11953
diff
changeset
|
102 |
return "Low"; |
11441 | 103 |
} |
17296
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
104 |
static const JavaPermission permission() { |
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
105 |
JavaPermission p = {"java.util.PropertyPermission", |
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
106 |
"*", "read"}; |
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
107 |
return p; |
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
108 |
} |
11441 | 109 |
static int num_arguments() { return 0; } |
17296
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
110 |
virtual void execute(DCmdSource source, TRAPS); |
11441 | 111 |
}; |
112 |
||
113 |
// See also: print_flag in attachListener.cpp |
|
114 |
class PrintVMFlagsDCmd : public DCmdWithParser { |
|
115 |
protected: |
|
116 |
DCmdArgument<bool> _all; |
|
117 |
public: |
|
118 |
PrintVMFlagsDCmd(outputStream* output, bool heap); |
|
119 |
static const char* name() { return "VM.flags"; } |
|
120 |
static const char* description() { |
|
121 |
return "Print VM flag options and their current values."; |
|
122 |
} |
|
123 |
static const char* impact() { |
|
13200
7b506e7b406e
7178703: Fix handling of quoted arguments and better error messages in dcmd
sla
parents:
11953
diff
changeset
|
124 |
return "Low"; |
11441 | 125 |
} |
17296
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
126 |
static const JavaPermission permission() { |
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
127 |
JavaPermission p = {"java.lang.management.ManagementPermission", |
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
128 |
"monitor", NULL}; |
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
129 |
return p; |
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
130 |
} |
11441 | 131 |
static int num_arguments(); |
17296
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
132 |
virtual void execute(DCmdSource source, TRAPS); |
11441 | 133 |
}; |
134 |
||
30121
cc43664a0ad7
8054890: Serviceability: New diagnostic commands 'VM.set_flag' and 'JVMTI.data_dump'
jbachorik
parents:
29071
diff
changeset
|
135 |
class SetVMFlagDCmd : public DCmdWithParser { |
cc43664a0ad7
8054890: Serviceability: New diagnostic commands 'VM.set_flag' and 'JVMTI.data_dump'
jbachorik
parents:
29071
diff
changeset
|
136 |
protected: |
cc43664a0ad7
8054890: Serviceability: New diagnostic commands 'VM.set_flag' and 'JVMTI.data_dump'
jbachorik
parents:
29071
diff
changeset
|
137 |
DCmdArgument<char*> _flag; |
cc43664a0ad7
8054890: Serviceability: New diagnostic commands 'VM.set_flag' and 'JVMTI.data_dump'
jbachorik
parents:
29071
diff
changeset
|
138 |
DCmdArgument<char*> _value; |
cc43664a0ad7
8054890: Serviceability: New diagnostic commands 'VM.set_flag' and 'JVMTI.data_dump'
jbachorik
parents:
29071
diff
changeset
|
139 |
|
cc43664a0ad7
8054890: Serviceability: New diagnostic commands 'VM.set_flag' and 'JVMTI.data_dump'
jbachorik
parents:
29071
diff
changeset
|
140 |
public: |
cc43664a0ad7
8054890: Serviceability: New diagnostic commands 'VM.set_flag' and 'JVMTI.data_dump'
jbachorik
parents:
29071
diff
changeset
|
141 |
SetVMFlagDCmd(outputStream* output, bool heap); |
cc43664a0ad7
8054890: Serviceability: New diagnostic commands 'VM.set_flag' and 'JVMTI.data_dump'
jbachorik
parents:
29071
diff
changeset
|
142 |
static const char* name() { return "VM.set_flag"; } |
cc43664a0ad7
8054890: Serviceability: New diagnostic commands 'VM.set_flag' and 'JVMTI.data_dump'
jbachorik
parents:
29071
diff
changeset
|
143 |
static const char* description() { |
cc43664a0ad7
8054890: Serviceability: New diagnostic commands 'VM.set_flag' and 'JVMTI.data_dump'
jbachorik
parents:
29071
diff
changeset
|
144 |
return "Sets VM flag option using the provided value."; |
cc43664a0ad7
8054890: Serviceability: New diagnostic commands 'VM.set_flag' and 'JVMTI.data_dump'
jbachorik
parents:
29071
diff
changeset
|
145 |
} |
cc43664a0ad7
8054890: Serviceability: New diagnostic commands 'VM.set_flag' and 'JVMTI.data_dump'
jbachorik
parents:
29071
diff
changeset
|
146 |
static const char* impact() { |
cc43664a0ad7
8054890: Serviceability: New diagnostic commands 'VM.set_flag' and 'JVMTI.data_dump'
jbachorik
parents:
29071
diff
changeset
|
147 |
return "Low"; |
cc43664a0ad7
8054890: Serviceability: New diagnostic commands 'VM.set_flag' and 'JVMTI.data_dump'
jbachorik
parents:
29071
diff
changeset
|
148 |
} |
cc43664a0ad7
8054890: Serviceability: New diagnostic commands 'VM.set_flag' and 'JVMTI.data_dump'
jbachorik
parents:
29071
diff
changeset
|
149 |
static const JavaPermission permission() { |
cc43664a0ad7
8054890: Serviceability: New diagnostic commands 'VM.set_flag' and 'JVMTI.data_dump'
jbachorik
parents:
29071
diff
changeset
|
150 |
JavaPermission p = {"java.lang.management.ManagementPermission", |
cc43664a0ad7
8054890: Serviceability: New diagnostic commands 'VM.set_flag' and 'JVMTI.data_dump'
jbachorik
parents:
29071
diff
changeset
|
151 |
"control", NULL}; |
cc43664a0ad7
8054890: Serviceability: New diagnostic commands 'VM.set_flag' and 'JVMTI.data_dump'
jbachorik
parents:
29071
diff
changeset
|
152 |
return p; |
cc43664a0ad7
8054890: Serviceability: New diagnostic commands 'VM.set_flag' and 'JVMTI.data_dump'
jbachorik
parents:
29071
diff
changeset
|
153 |
} |
cc43664a0ad7
8054890: Serviceability: New diagnostic commands 'VM.set_flag' and 'JVMTI.data_dump'
jbachorik
parents:
29071
diff
changeset
|
154 |
static int num_arguments(); |
cc43664a0ad7
8054890: Serviceability: New diagnostic commands 'VM.set_flag' and 'JVMTI.data_dump'
jbachorik
parents:
29071
diff
changeset
|
155 |
virtual void execute(DCmdSource source, TRAPS); |
cc43664a0ad7
8054890: Serviceability: New diagnostic commands 'VM.set_flag' and 'JVMTI.data_dump'
jbachorik
parents:
29071
diff
changeset
|
156 |
}; |
cc43664a0ad7
8054890: Serviceability: New diagnostic commands 'VM.set_flag' and 'JVMTI.data_dump'
jbachorik
parents:
29071
diff
changeset
|
157 |
|
cc43664a0ad7
8054890: Serviceability: New diagnostic commands 'VM.set_flag' and 'JVMTI.data_dump'
jbachorik
parents:
29071
diff
changeset
|
158 |
class JVMTIDataDumpDCmd : public DCmd { |
cc43664a0ad7
8054890: Serviceability: New diagnostic commands 'VM.set_flag' and 'JVMTI.data_dump'
jbachorik
parents:
29071
diff
changeset
|
159 |
public: |
cc43664a0ad7
8054890: Serviceability: New diagnostic commands 'VM.set_flag' and 'JVMTI.data_dump'
jbachorik
parents:
29071
diff
changeset
|
160 |
JVMTIDataDumpDCmd(outputStream* output, bool heap) : DCmd(output, heap) { } |
cc43664a0ad7
8054890: Serviceability: New diagnostic commands 'VM.set_flag' and 'JVMTI.data_dump'
jbachorik
parents:
29071
diff
changeset
|
161 |
static const char* name() { return "JVMTI.data_dump"; } |
cc43664a0ad7
8054890: Serviceability: New diagnostic commands 'VM.set_flag' and 'JVMTI.data_dump'
jbachorik
parents:
29071
diff
changeset
|
162 |
static const char* description() { |
cc43664a0ad7
8054890: Serviceability: New diagnostic commands 'VM.set_flag' and 'JVMTI.data_dump'
jbachorik
parents:
29071
diff
changeset
|
163 |
return "Signal the JVM to do a data-dump request for JVMTI."; |
cc43664a0ad7
8054890: Serviceability: New diagnostic commands 'VM.set_flag' and 'JVMTI.data_dump'
jbachorik
parents:
29071
diff
changeset
|
164 |
} |
cc43664a0ad7
8054890: Serviceability: New diagnostic commands 'VM.set_flag' and 'JVMTI.data_dump'
jbachorik
parents:
29071
diff
changeset
|
165 |
static const char* impact() { |
cc43664a0ad7
8054890: Serviceability: New diagnostic commands 'VM.set_flag' and 'JVMTI.data_dump'
jbachorik
parents:
29071
diff
changeset
|
166 |
return "High"; |
cc43664a0ad7
8054890: Serviceability: New diagnostic commands 'VM.set_flag' and 'JVMTI.data_dump'
jbachorik
parents:
29071
diff
changeset
|
167 |
} |
cc43664a0ad7
8054890: Serviceability: New diagnostic commands 'VM.set_flag' and 'JVMTI.data_dump'
jbachorik
parents:
29071
diff
changeset
|
168 |
static const JavaPermission permission() { |
cc43664a0ad7
8054890: Serviceability: New diagnostic commands 'VM.set_flag' and 'JVMTI.data_dump'
jbachorik
parents:
29071
diff
changeset
|
169 |
JavaPermission p = {"java.lang.management.ManagementPermission", |
cc43664a0ad7
8054890: Serviceability: New diagnostic commands 'VM.set_flag' and 'JVMTI.data_dump'
jbachorik
parents:
29071
diff
changeset
|
170 |
"monitor", NULL}; |
cc43664a0ad7
8054890: Serviceability: New diagnostic commands 'VM.set_flag' and 'JVMTI.data_dump'
jbachorik
parents:
29071
diff
changeset
|
171 |
return p; |
cc43664a0ad7
8054890: Serviceability: New diagnostic commands 'VM.set_flag' and 'JVMTI.data_dump'
jbachorik
parents:
29071
diff
changeset
|
172 |
} |
cc43664a0ad7
8054890: Serviceability: New diagnostic commands 'VM.set_flag' and 'JVMTI.data_dump'
jbachorik
parents:
29071
diff
changeset
|
173 |
static int num_arguments() { return 0; } |
cc43664a0ad7
8054890: Serviceability: New diagnostic commands 'VM.set_flag' and 'JVMTI.data_dump'
jbachorik
parents:
29071
diff
changeset
|
174 |
virtual void execute(DCmdSource source, TRAPS); |
cc43664a0ad7
8054890: Serviceability: New diagnostic commands 'VM.set_flag' and 'JVMTI.data_dump'
jbachorik
parents:
29071
diff
changeset
|
175 |
}; |
cc43664a0ad7
8054890: Serviceability: New diagnostic commands 'VM.set_flag' and 'JVMTI.data_dump'
jbachorik
parents:
29071
diff
changeset
|
176 |
|
37195
88b6f1271f64
8151991: jvmti diagnostics commands requires INCLUDE_SERVICES
dsamersoff
parents:
36188
diff
changeset
|
177 |
#if INCLUDE_SERVICES |
88b6f1271f64
8151991: jvmti diagnostics commands requires INCLUDE_SERVICES
dsamersoff
parents:
36188
diff
changeset
|
178 |
#if INCLUDE_JVMTI |
36188
99b6836dd3e8
8147388: Add diagnostic commands to attach JVMTI agent.
ysuenaga
parents:
35186
diff
changeset
|
179 |
class JVMTIAgentLoadDCmd : public DCmdWithParser { |
99b6836dd3e8
8147388: Add diagnostic commands to attach JVMTI agent.
ysuenaga
parents:
35186
diff
changeset
|
180 |
protected: |
99b6836dd3e8
8147388: Add diagnostic commands to attach JVMTI agent.
ysuenaga
parents:
35186
diff
changeset
|
181 |
DCmdArgument<char*> _libpath; |
99b6836dd3e8
8147388: Add diagnostic commands to attach JVMTI agent.
ysuenaga
parents:
35186
diff
changeset
|
182 |
DCmdArgument<char*> _option; |
99b6836dd3e8
8147388: Add diagnostic commands to attach JVMTI agent.
ysuenaga
parents:
35186
diff
changeset
|
183 |
public: |
99b6836dd3e8
8147388: Add diagnostic commands to attach JVMTI agent.
ysuenaga
parents:
35186
diff
changeset
|
184 |
JVMTIAgentLoadDCmd(outputStream* output, bool heap); |
99b6836dd3e8
8147388: Add diagnostic commands to attach JVMTI agent.
ysuenaga
parents:
35186
diff
changeset
|
185 |
static const char* name() { return "JVMTI.agent_load"; } |
99b6836dd3e8
8147388: Add diagnostic commands to attach JVMTI agent.
ysuenaga
parents:
35186
diff
changeset
|
186 |
static const char* description() { |
99b6836dd3e8
8147388: Add diagnostic commands to attach JVMTI agent.
ysuenaga
parents:
35186
diff
changeset
|
187 |
return "Load JVMTI native agent."; |
99b6836dd3e8
8147388: Add diagnostic commands to attach JVMTI agent.
ysuenaga
parents:
35186
diff
changeset
|
188 |
} |
99b6836dd3e8
8147388: Add diagnostic commands to attach JVMTI agent.
ysuenaga
parents:
35186
diff
changeset
|
189 |
static const char* impact() { return "Low"; } |
99b6836dd3e8
8147388: Add diagnostic commands to attach JVMTI agent.
ysuenaga
parents:
35186
diff
changeset
|
190 |
static const JavaPermission permission() { |
99b6836dd3e8
8147388: Add diagnostic commands to attach JVMTI agent.
ysuenaga
parents:
35186
diff
changeset
|
191 |
JavaPermission p = {"java.lang.management.ManagementPermission", |
99b6836dd3e8
8147388: Add diagnostic commands to attach JVMTI agent.
ysuenaga
parents:
35186
diff
changeset
|
192 |
"control", NULL}; |
99b6836dd3e8
8147388: Add diagnostic commands to attach JVMTI agent.
ysuenaga
parents:
35186
diff
changeset
|
193 |
return p; |
99b6836dd3e8
8147388: Add diagnostic commands to attach JVMTI agent.
ysuenaga
parents:
35186
diff
changeset
|
194 |
} |
99b6836dd3e8
8147388: Add diagnostic commands to attach JVMTI agent.
ysuenaga
parents:
35186
diff
changeset
|
195 |
static int num_arguments(); |
99b6836dd3e8
8147388: Add diagnostic commands to attach JVMTI agent.
ysuenaga
parents:
35186
diff
changeset
|
196 |
virtual void execute(DCmdSource source, TRAPS); |
99b6836dd3e8
8147388: Add diagnostic commands to attach JVMTI agent.
ysuenaga
parents:
35186
diff
changeset
|
197 |
}; |
37195
88b6f1271f64
8151991: jvmti diagnostics commands requires INCLUDE_SERVICES
dsamersoff
parents:
36188
diff
changeset
|
198 |
#endif // INCLUDE_JVMTI |
88b6f1271f64
8151991: jvmti diagnostics commands requires INCLUDE_SERVICES
dsamersoff
parents:
36188
diff
changeset
|
199 |
#endif // INCLUDE_SERVICES |
36188
99b6836dd3e8
8147388: Add diagnostic commands to attach JVMTI agent.
ysuenaga
parents:
35186
diff
changeset
|
200 |
|
22490
039128291aa6
8031304: Add dcmd to print all loaded dynamic libraries.
farvidsson
parents:
21076
diff
changeset
|
201 |
class VMDynamicLibrariesDCmd : public DCmd { |
039128291aa6
8031304: Add dcmd to print all loaded dynamic libraries.
farvidsson
parents:
21076
diff
changeset
|
202 |
public: |
039128291aa6
8031304: Add dcmd to print all loaded dynamic libraries.
farvidsson
parents:
21076
diff
changeset
|
203 |
VMDynamicLibrariesDCmd(outputStream* output, bool heap); |
039128291aa6
8031304: Add dcmd to print all loaded dynamic libraries.
farvidsson
parents:
21076
diff
changeset
|
204 |
static const char* name() { |
039128291aa6
8031304: Add dcmd to print all loaded dynamic libraries.
farvidsson
parents:
21076
diff
changeset
|
205 |
return "VM.dynlibs"; |
039128291aa6
8031304: Add dcmd to print all loaded dynamic libraries.
farvidsson
parents:
21076
diff
changeset
|
206 |
} |
039128291aa6
8031304: Add dcmd to print all loaded dynamic libraries.
farvidsson
parents:
21076
diff
changeset
|
207 |
static const char* description() { |
039128291aa6
8031304: Add dcmd to print all loaded dynamic libraries.
farvidsson
parents:
21076
diff
changeset
|
208 |
return "Print loaded dynamic libraries."; |
039128291aa6
8031304: Add dcmd to print all loaded dynamic libraries.
farvidsson
parents:
21076
diff
changeset
|
209 |
} |
039128291aa6
8031304: Add dcmd to print all loaded dynamic libraries.
farvidsson
parents:
21076
diff
changeset
|
210 |
static const char* impact() { |
039128291aa6
8031304: Add dcmd to print all loaded dynamic libraries.
farvidsson
parents:
21076
diff
changeset
|
211 |
return "Low"; |
039128291aa6
8031304: Add dcmd to print all loaded dynamic libraries.
farvidsson
parents:
21076
diff
changeset
|
212 |
} |
039128291aa6
8031304: Add dcmd to print all loaded dynamic libraries.
farvidsson
parents:
21076
diff
changeset
|
213 |
static const JavaPermission permission() { |
039128291aa6
8031304: Add dcmd to print all loaded dynamic libraries.
farvidsson
parents:
21076
diff
changeset
|
214 |
JavaPermission p = {"java.lang.management.ManagementPermission", |
039128291aa6
8031304: Add dcmd to print all loaded dynamic libraries.
farvidsson
parents:
21076
diff
changeset
|
215 |
"monitor", NULL}; |
039128291aa6
8031304: Add dcmd to print all loaded dynamic libraries.
farvidsson
parents:
21076
diff
changeset
|
216 |
return p; |
039128291aa6
8031304: Add dcmd to print all loaded dynamic libraries.
farvidsson
parents:
21076
diff
changeset
|
217 |
} |
039128291aa6
8031304: Add dcmd to print all loaded dynamic libraries.
farvidsson
parents:
21076
diff
changeset
|
218 |
static int num_arguments() { |
039128291aa6
8031304: Add dcmd to print all loaded dynamic libraries.
farvidsson
parents:
21076
diff
changeset
|
219 |
return 0; |
039128291aa6
8031304: Add dcmd to print all loaded dynamic libraries.
farvidsson
parents:
21076
diff
changeset
|
220 |
}; |
039128291aa6
8031304: Add dcmd to print all loaded dynamic libraries.
farvidsson
parents:
21076
diff
changeset
|
221 |
virtual void execute(DCmdSource source, TRAPS); |
039128291aa6
8031304: Add dcmd to print all loaded dynamic libraries.
farvidsson
parents:
21076
diff
changeset
|
222 |
}; |
039128291aa6
8031304: Add dcmd to print all loaded dynamic libraries.
farvidsson
parents:
21076
diff
changeset
|
223 |
|
11441 | 224 |
class VMUptimeDCmd : public DCmdWithParser { |
225 |
protected: |
|
226 |
DCmdArgument<bool> _date; |
|
227 |
public: |
|
228 |
VMUptimeDCmd(outputStream* output, bool heap); |
|
229 |
static const char* name() { return "VM.uptime"; } |
|
230 |
static const char* description() { |
|
231 |
return "Print VM uptime."; |
|
232 |
} |
|
233 |
static const char* impact() { |
|
13200
7b506e7b406e
7178703: Fix handling of quoted arguments and better error messages in dcmd
sla
parents:
11953
diff
changeset
|
234 |
return "Low"; |
11441 | 235 |
} |
236 |
static int num_arguments(); |
|
17296
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
237 |
virtual void execute(DCmdSource source, TRAPS); |
11441 | 238 |
}; |
239 |
||
34139
0728fe06ccf8
8027429: Add diagnostic command VM.info to get hs_err print-out
coleenp
parents:
33451
diff
changeset
|
240 |
class VMInfoDCmd : public DCmd { |
0728fe06ccf8
8027429: Add diagnostic command VM.info to get hs_err print-out
coleenp
parents:
33451
diff
changeset
|
241 |
public: |
0728fe06ccf8
8027429: Add diagnostic command VM.info to get hs_err print-out
coleenp
parents:
33451
diff
changeset
|
242 |
VMInfoDCmd(outputStream* output, bool heap) : DCmd(output, heap) { } |
0728fe06ccf8
8027429: Add diagnostic command VM.info to get hs_err print-out
coleenp
parents:
33451
diff
changeset
|
243 |
static const char* name() { return "VM.info"; } |
0728fe06ccf8
8027429: Add diagnostic command VM.info to get hs_err print-out
coleenp
parents:
33451
diff
changeset
|
244 |
static const char* description() { |
0728fe06ccf8
8027429: Add diagnostic command VM.info to get hs_err print-out
coleenp
parents:
33451
diff
changeset
|
245 |
return "Print information about JVM environment and status."; |
0728fe06ccf8
8027429: Add diagnostic command VM.info to get hs_err print-out
coleenp
parents:
33451
diff
changeset
|
246 |
} |
0728fe06ccf8
8027429: Add diagnostic command VM.info to get hs_err print-out
coleenp
parents:
33451
diff
changeset
|
247 |
static const char* impact() { return "Low"; } |
0728fe06ccf8
8027429: Add diagnostic command VM.info to get hs_err print-out
coleenp
parents:
33451
diff
changeset
|
248 |
static const JavaPermission permission() { |
0728fe06ccf8
8027429: Add diagnostic command VM.info to get hs_err print-out
coleenp
parents:
33451
diff
changeset
|
249 |
JavaPermission p = {"java.lang.management.ManagementPermission", |
0728fe06ccf8
8027429: Add diagnostic command VM.info to get hs_err print-out
coleenp
parents:
33451
diff
changeset
|
250 |
"monitor", NULL}; |
0728fe06ccf8
8027429: Add diagnostic command VM.info to get hs_err print-out
coleenp
parents:
33451
diff
changeset
|
251 |
return p; |
0728fe06ccf8
8027429: Add diagnostic command VM.info to get hs_err print-out
coleenp
parents:
33451
diff
changeset
|
252 |
} |
0728fe06ccf8
8027429: Add diagnostic command VM.info to get hs_err print-out
coleenp
parents:
33451
diff
changeset
|
253 |
static int num_arguments() { return 0; } |
0728fe06ccf8
8027429: Add diagnostic command VM.info to get hs_err print-out
coleenp
parents:
33451
diff
changeset
|
254 |
virtual void execute(DCmdSource source, TRAPS); |
0728fe06ccf8
8027429: Add diagnostic command VM.info to get hs_err print-out
coleenp
parents:
33451
diff
changeset
|
255 |
}; |
0728fe06ccf8
8027429: Add diagnostic command VM.info to get hs_err print-out
coleenp
parents:
33451
diff
changeset
|
256 |
|
11441 | 257 |
class SystemGCDCmd : public DCmd { |
258 |
public: |
|
259 |
SystemGCDCmd(outputStream* output, bool heap) : DCmd(output, heap) { } |
|
260 |
static const char* name() { return "GC.run"; } |
|
261 |
static const char* description() { |
|
262 |
return "Call java.lang.System.gc()."; |
|
263 |
} |
|
264 |
static const char* impact() { |
|
265 |
return "Medium: Depends on Java heap size and content."; |
|
266 |
} |
|
267 |
static int num_arguments() { return 0; } |
|
17296
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
268 |
virtual void execute(DCmdSource source, TRAPS); |
11441 | 269 |
}; |
270 |
||
271 |
class RunFinalizationDCmd : public DCmd { |
|
272 |
public: |
|
273 |
RunFinalizationDCmd(outputStream* output, bool heap) : DCmd(output, heap) { } |
|
274 |
static const char* name() { return "GC.run_finalization"; } |
|
275 |
static const char* description() { |
|
276 |
return "Call java.lang.System.runFinalization()."; |
|
277 |
} |
|
278 |
static const char* impact() { |
|
279 |
return "Medium: Depends on Java content."; |
|
280 |
} |
|
281 |
static int num_arguments() { return 0; } |
|
17296
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
282 |
virtual void execute(DCmdSource source, TRAPS); |
11441 | 283 |
}; |
284 |
||
32072
bc13add2c295
8059036: Implement Diagnostic Commands for heap and finalizerinfo
dsamersoff
parents:
31790
diff
changeset
|
285 |
class HeapInfoDCmd : public DCmd { |
bc13add2c295
8059036: Implement Diagnostic Commands for heap and finalizerinfo
dsamersoff
parents:
31790
diff
changeset
|
286 |
public: |
bc13add2c295
8059036: Implement Diagnostic Commands for heap and finalizerinfo
dsamersoff
parents:
31790
diff
changeset
|
287 |
HeapInfoDCmd(outputStream* output, bool heap) : DCmd(output, heap) { } |
bc13add2c295
8059036: Implement Diagnostic Commands for heap and finalizerinfo
dsamersoff
parents:
31790
diff
changeset
|
288 |
static const char* name() { return "GC.heap_info"; } |
bc13add2c295
8059036: Implement Diagnostic Commands for heap and finalizerinfo
dsamersoff
parents:
31790
diff
changeset
|
289 |
static const char* description() { |
bc13add2c295
8059036: Implement Diagnostic Commands for heap and finalizerinfo
dsamersoff
parents:
31790
diff
changeset
|
290 |
return "Provide generic Java heap information."; |
bc13add2c295
8059036: Implement Diagnostic Commands for heap and finalizerinfo
dsamersoff
parents:
31790
diff
changeset
|
291 |
} |
bc13add2c295
8059036: Implement Diagnostic Commands for heap and finalizerinfo
dsamersoff
parents:
31790
diff
changeset
|
292 |
static const char* impact() { |
bc13add2c295
8059036: Implement Diagnostic Commands for heap and finalizerinfo
dsamersoff
parents:
31790
diff
changeset
|
293 |
return "Medium"; |
bc13add2c295
8059036: Implement Diagnostic Commands for heap and finalizerinfo
dsamersoff
parents:
31790
diff
changeset
|
294 |
} |
bc13add2c295
8059036: Implement Diagnostic Commands for heap and finalizerinfo
dsamersoff
parents:
31790
diff
changeset
|
295 |
static int num_arguments() { return 0; } |
bc13add2c295
8059036: Implement Diagnostic Commands for heap and finalizerinfo
dsamersoff
parents:
31790
diff
changeset
|
296 |
static const JavaPermission permission() { |
bc13add2c295
8059036: Implement Diagnostic Commands for heap and finalizerinfo
dsamersoff
parents:
31790
diff
changeset
|
297 |
JavaPermission p = {"java.lang.management.ManagementPermission", |
bc13add2c295
8059036: Implement Diagnostic Commands for heap and finalizerinfo
dsamersoff
parents:
31790
diff
changeset
|
298 |
"monitor", NULL}; |
bc13add2c295
8059036: Implement Diagnostic Commands for heap and finalizerinfo
dsamersoff
parents:
31790
diff
changeset
|
299 |
return p; |
bc13add2c295
8059036: Implement Diagnostic Commands for heap and finalizerinfo
dsamersoff
parents:
31790
diff
changeset
|
300 |
} |
bc13add2c295
8059036: Implement Diagnostic Commands for heap and finalizerinfo
dsamersoff
parents:
31790
diff
changeset
|
301 |
|
bc13add2c295
8059036: Implement Diagnostic Commands for heap and finalizerinfo
dsamersoff
parents:
31790
diff
changeset
|
302 |
virtual void execute(DCmdSource source, TRAPS); |
bc13add2c295
8059036: Implement Diagnostic Commands for heap and finalizerinfo
dsamersoff
parents:
31790
diff
changeset
|
303 |
}; |
bc13add2c295
8059036: Implement Diagnostic Commands for heap and finalizerinfo
dsamersoff
parents:
31790
diff
changeset
|
304 |
|
bc13add2c295
8059036: Implement Diagnostic Commands for heap and finalizerinfo
dsamersoff
parents:
31790
diff
changeset
|
305 |
class FinalizerInfoDCmd : public DCmd { |
bc13add2c295
8059036: Implement Diagnostic Commands for heap and finalizerinfo
dsamersoff
parents:
31790
diff
changeset
|
306 |
public: |
bc13add2c295
8059036: Implement Diagnostic Commands for heap and finalizerinfo
dsamersoff
parents:
31790
diff
changeset
|
307 |
FinalizerInfoDCmd(outputStream* output, bool heap) : DCmd(output, heap) { } |
bc13add2c295
8059036: Implement Diagnostic Commands for heap and finalizerinfo
dsamersoff
parents:
31790
diff
changeset
|
308 |
static const char* name() { return "GC.finalizer_info"; } |
bc13add2c295
8059036: Implement Diagnostic Commands for heap and finalizerinfo
dsamersoff
parents:
31790
diff
changeset
|
309 |
static const char* description() { |
bc13add2c295
8059036: Implement Diagnostic Commands for heap and finalizerinfo
dsamersoff
parents:
31790
diff
changeset
|
310 |
return "Provide information about Java finalization queue."; |
bc13add2c295
8059036: Implement Diagnostic Commands for heap and finalizerinfo
dsamersoff
parents:
31790
diff
changeset
|
311 |
} |
bc13add2c295
8059036: Implement Diagnostic Commands for heap and finalizerinfo
dsamersoff
parents:
31790
diff
changeset
|
312 |
static const char* impact() { |
bc13add2c295
8059036: Implement Diagnostic Commands for heap and finalizerinfo
dsamersoff
parents:
31790
diff
changeset
|
313 |
return "Medium"; |
bc13add2c295
8059036: Implement Diagnostic Commands for heap and finalizerinfo
dsamersoff
parents:
31790
diff
changeset
|
314 |
} |
bc13add2c295
8059036: Implement Diagnostic Commands for heap and finalizerinfo
dsamersoff
parents:
31790
diff
changeset
|
315 |
static int num_arguments() { return 0; } |
bc13add2c295
8059036: Implement Diagnostic Commands for heap and finalizerinfo
dsamersoff
parents:
31790
diff
changeset
|
316 |
static const JavaPermission permission() { |
bc13add2c295
8059036: Implement Diagnostic Commands for heap and finalizerinfo
dsamersoff
parents:
31790
diff
changeset
|
317 |
JavaPermission p = {"java.lang.management.ManagementPermission", |
bc13add2c295
8059036: Implement Diagnostic Commands for heap and finalizerinfo
dsamersoff
parents:
31790
diff
changeset
|
318 |
"monitor", NULL}; |
bc13add2c295
8059036: Implement Diagnostic Commands for heap and finalizerinfo
dsamersoff
parents:
31790
diff
changeset
|
319 |
return p; |
bc13add2c295
8059036: Implement Diagnostic Commands for heap and finalizerinfo
dsamersoff
parents:
31790
diff
changeset
|
320 |
} |
bc13add2c295
8059036: Implement Diagnostic Commands for heap and finalizerinfo
dsamersoff
parents:
31790
diff
changeset
|
321 |
|
bc13add2c295
8059036: Implement Diagnostic Commands for heap and finalizerinfo
dsamersoff
parents:
31790
diff
changeset
|
322 |
virtual void execute(DCmdSource source, TRAPS); |
bc13add2c295
8059036: Implement Diagnostic Commands for heap and finalizerinfo
dsamersoff
parents:
31790
diff
changeset
|
323 |
}; |
bc13add2c295
8059036: Implement Diagnostic Commands for heap and finalizerinfo
dsamersoff
parents:
31790
diff
changeset
|
324 |
|
13975
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
13200
diff
changeset
|
325 |
#if INCLUDE_SERVICES // Heap dumping supported |
11441 | 326 |
// See also: dump_heap in attachListener.cpp |
327 |
class HeapDumpDCmd : public DCmdWithParser { |
|
328 |
protected: |
|
329 |
DCmdArgument<char*> _filename; |
|
330 |
DCmdArgument<bool> _all; |
|
331 |
public: |
|
332 |
HeapDumpDCmd(outputStream* output, bool heap); |
|
333 |
static const char* name() { |
|
334 |
return "GC.heap_dump"; |
|
335 |
} |
|
336 |
static const char* description() { |
|
337 |
return "Generate a HPROF format dump of the Java heap."; |
|
338 |
} |
|
339 |
static const char* impact() { |
|
340 |
return "High: Depends on Java heap size and content. " |
|
341 |
"Request a full GC unless the '-all' option is specified."; |
|
342 |
} |
|
17296
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
343 |
static const JavaPermission permission() { |
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
344 |
JavaPermission p = {"java.lang.management.ManagementPermission", |
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
345 |
"monitor", NULL}; |
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
346 |
return p; |
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
347 |
} |
11441 | 348 |
static int num_arguments(); |
17296
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
349 |
virtual void execute(DCmdSource source, TRAPS); |
11441 | 350 |
}; |
13975
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
13200
diff
changeset
|
351 |
#endif // INCLUDE_SERVICES |
11441 | 352 |
|
15437 | 353 |
// See also: inspectheap in attachListener.cpp |
11441 | 354 |
class ClassHistogramDCmd : public DCmdWithParser { |
355 |
protected: |
|
356 |
DCmdArgument<bool> _all; |
|
357 |
public: |
|
358 |
ClassHistogramDCmd(outputStream* output, bool heap); |
|
359 |
static const char* name() { |
|
360 |
return "GC.class_histogram"; |
|
361 |
} |
|
362 |
static const char* description() { |
|
363 |
return "Provide statistics about the Java heap usage."; |
|
364 |
} |
|
365 |
static const char* impact() { |
|
366 |
return "High: Depends on Java heap size and content."; |
|
367 |
} |
|
17296
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
368 |
static const JavaPermission permission() { |
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
369 |
JavaPermission p = {"java.lang.management.ManagementPermission", |
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
370 |
"monitor", NULL}; |
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
371 |
return p; |
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
372 |
} |
11441 | 373 |
static int num_arguments(); |
17296
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
374 |
virtual void execute(DCmdSource source, TRAPS); |
11441 | 375 |
}; |
376 |
||
15437 | 377 |
class ClassStatsDCmd : public DCmdWithParser { |
378 |
protected: |
|
379 |
DCmdArgument<bool> _all; |
|
380 |
DCmdArgument<bool> _csv; |
|
381 |
DCmdArgument<bool> _help; |
|
382 |
DCmdArgument<char*> _columns; |
|
383 |
public: |
|
384 |
ClassStatsDCmd(outputStream* output, bool heap); |
|
385 |
static const char* name() { |
|
386 |
return "GC.class_stats"; |
|
387 |
} |
|
388 |
static const char* description() { |
|
42075
e5b263ac8c2e
8168305: GC.class_stats should not require -XX:+UnlockDiagnosticVMOptions
sla
parents:
37195
diff
changeset
|
389 |
return "Provide statistics about Java class meta data."; |
15437 | 390 |
} |
391 |
static const char* impact() { |
|
392 |
return "High: Depends on Java heap size and content."; |
|
393 |
} |
|
394 |
static int num_arguments(); |
|
17296
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
395 |
virtual void execute(DCmdSource source, TRAPS); |
15437 | 396 |
}; |
397 |
||
29071
73f45d04ad7a
8054888: Runtime: Add Diagnostic Command that prints the class hierarchy
cjplummer
parents:
26807
diff
changeset
|
398 |
|
73f45d04ad7a
8054888: Runtime: Add Diagnostic Command that prints the class hierarchy
cjplummer
parents:
26807
diff
changeset
|
399 |
class ClassHierarchyDCmd : public DCmdWithParser { |
73f45d04ad7a
8054888: Runtime: Add Diagnostic Command that prints the class hierarchy
cjplummer
parents:
26807
diff
changeset
|
400 |
protected: |
73f45d04ad7a
8054888: Runtime: Add Diagnostic Command that prints the class hierarchy
cjplummer
parents:
26807
diff
changeset
|
401 |
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
|
402 |
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
|
403 |
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
|
404 |
public: |
73f45d04ad7a
8054888: Runtime: Add Diagnostic Command that prints the class hierarchy
cjplummer
parents:
26807
diff
changeset
|
405 |
ClassHierarchyDCmd(outputStream* output, bool heap); |
73f45d04ad7a
8054888: Runtime: Add Diagnostic Command that prints the class hierarchy
cjplummer
parents:
26807
diff
changeset
|
406 |
static const char* name() { |
73f45d04ad7a
8054888: Runtime: Add Diagnostic Command that prints the class hierarchy
cjplummer
parents:
26807
diff
changeset
|
407 |
return "VM.class_hierarchy"; |
73f45d04ad7a
8054888: Runtime: Add Diagnostic Command that prints the class hierarchy
cjplummer
parents:
26807
diff
changeset
|
408 |
} |
73f45d04ad7a
8054888: Runtime: Add Diagnostic Command that prints the class hierarchy
cjplummer
parents:
26807
diff
changeset
|
409 |
static const char* description() { |
73f45d04ad7a
8054888: Runtime: Add Diagnostic Command that prints the class hierarchy
cjplummer
parents:
26807
diff
changeset
|
410 |
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
|
411 |
"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
|
412 |
"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
|
413 |
} |
73f45d04ad7a
8054888: Runtime: Add Diagnostic Command that prints the class hierarchy
cjplummer
parents:
26807
diff
changeset
|
414 |
static const char* impact() { |
73f45d04ad7a
8054888: Runtime: Add Diagnostic Command that prints the class hierarchy
cjplummer
parents:
26807
diff
changeset
|
415 |
return "Medium: Depends on number of loaded classes."; |
73f45d04ad7a
8054888: Runtime: Add Diagnostic Command that prints the class hierarchy
cjplummer
parents:
26807
diff
changeset
|
416 |
} |
73f45d04ad7a
8054888: Runtime: Add Diagnostic Command that prints the class hierarchy
cjplummer
parents:
26807
diff
changeset
|
417 |
static const JavaPermission permission() { |
73f45d04ad7a
8054888: Runtime: Add Diagnostic Command that prints the class hierarchy
cjplummer
parents:
26807
diff
changeset
|
418 |
JavaPermission p = {"java.lang.management.ManagementPermission", |
73f45d04ad7a
8054888: Runtime: Add Diagnostic Command that prints the class hierarchy
cjplummer
parents:
26807
diff
changeset
|
419 |
"monitor", NULL}; |
73f45d04ad7a
8054888: Runtime: Add Diagnostic Command that prints the class hierarchy
cjplummer
parents:
26807
diff
changeset
|
420 |
return p; |
73f45d04ad7a
8054888: Runtime: Add Diagnostic Command that prints the class hierarchy
cjplummer
parents:
26807
diff
changeset
|
421 |
} |
73f45d04ad7a
8054888: Runtime: Add Diagnostic Command that prints the class hierarchy
cjplummer
parents:
26807
diff
changeset
|
422 |
static int num_arguments(); |
73f45d04ad7a
8054888: Runtime: Add Diagnostic Command that prints the class hierarchy
cjplummer
parents:
26807
diff
changeset
|
423 |
virtual void execute(DCmdSource source, TRAPS); |
73f45d04ad7a
8054888: Runtime: Add Diagnostic Command that prints the class hierarchy
cjplummer
parents:
26807
diff
changeset
|
424 |
}; |
73f45d04ad7a
8054888: Runtime: Add Diagnostic Command that prints the class hierarchy
cjplummer
parents:
26807
diff
changeset
|
425 |
|
31790 | 426 |
class TouchedMethodsDCmd : public DCmdWithParser { |
427 |
public: |
|
428 |
TouchedMethodsDCmd(outputStream* output, bool heap); |
|
429 |
static const char* name() { |
|
430 |
return "VM.print_touched_methods"; |
|
431 |
} |
|
432 |
static const char* description() { |
|
433 |
return "Print all methods that have ever been touched during the lifetime of this JVM."; |
|
434 |
} |
|
435 |
static const char* impact() { |
|
436 |
return "Medium: Depends on Java content."; |
|
437 |
} |
|
438 |
static int num_arguments(); |
|
439 |
virtual void execute(DCmdSource source, TRAPS); |
|
440 |
}; |
|
441 |
||
11441 | 442 |
// See also: thread_dump in attachListener.cpp |
443 |
class ThreadDumpDCmd : public DCmdWithParser { |
|
444 |
protected: |
|
445 |
DCmdArgument<bool> _locks; |
|
446 |
public: |
|
447 |
ThreadDumpDCmd(outputStream* output, bool heap); |
|
448 |
static const char* name() { return "Thread.print"; } |
|
449 |
static const char* description() { |
|
450 |
return "Print all threads with stacktraces."; |
|
451 |
} |
|
452 |
static const char* impact() { |
|
453 |
return "Medium: Depends on the number of threads."; |
|
454 |
} |
|
17296
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
455 |
static const JavaPermission permission() { |
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
456 |
JavaPermission p = {"java.lang.management.ManagementPermission", |
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
457 |
"monitor", NULL}; |
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
458 |
return p; |
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
459 |
} |
11441 | 460 |
static int num_arguments(); |
17296
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
461 |
virtual void execute(DCmdSource source, TRAPS); |
11209 | 462 |
}; |
463 |
||
11953
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
464 |
// Enhanced JMX Agent support |
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
465 |
|
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
466 |
class JMXStartRemoteDCmd : public DCmdWithParser { |
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
467 |
|
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
468 |
// 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
|
469 |
// passed to Agent.startRemoteManagementAgent() |
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
470 |
// com.sun.management is omitted |
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
471 |
|
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
472 |
DCmdArgument<char *> _config_file; |
35186
89076d5121c0
6425769: Allow specifying an address to bind JMX remote connector
sgehwolf
parents:
35061
diff
changeset
|
473 |
DCmdArgument<char *> _jmxremote_host; |
11953
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
474 |
DCmdArgument<char *> _jmxremote_port; |
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
475 |
DCmdArgument<char *> _jmxremote_rmi_port; |
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
476 |
DCmdArgument<char *> _jmxremote_ssl; |
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
477 |
DCmdArgument<char *> _jmxremote_registry_ssl; |
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
478 |
DCmdArgument<char *> _jmxremote_authenticate; |
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
479 |
DCmdArgument<char *> _jmxremote_password_file; |
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
480 |
DCmdArgument<char *> _jmxremote_access_file; |
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
481 |
DCmdArgument<char *> _jmxremote_login_config; |
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
482 |
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
|
483 |
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
|
484 |
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
|
485 |
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
|
486 |
|
15460
ac08a4bdd0f6
8002048: Protocol to discovery of manageable Java processes on a network
dsamersoff
parents:
15437
diff
changeset
|
487 |
// JDP support |
ac08a4bdd0f6
8002048: Protocol to discovery of manageable Java processes on a network
dsamersoff
parents:
15437
diff
changeset
|
488 |
// 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
|
489 |
// as property value to java level. |
ac08a4bdd0f6
8002048: Protocol to discovery of manageable Java processes on a network
dsamersoff
parents:
15437
diff
changeset
|
490 |
DCmdArgument<char *> _jmxremote_autodiscovery; |
ac08a4bdd0f6
8002048: Protocol to discovery of manageable Java processes on a network
dsamersoff
parents:
15437
diff
changeset
|
491 |
DCmdArgument<jlong> _jdp_port; |
ac08a4bdd0f6
8002048: Protocol to discovery of manageable Java processes on a network
dsamersoff
parents:
15437
diff
changeset
|
492 |
DCmdArgument<char *> _jdp_address; |
ac08a4bdd0f6
8002048: Protocol to discovery of manageable Java processes on a network
dsamersoff
parents:
15437
diff
changeset
|
493 |
DCmdArgument<char *> _jdp_source_addr; |
ac08a4bdd0f6
8002048: Protocol to discovery of manageable Java processes on a network
dsamersoff
parents:
15437
diff
changeset
|
494 |
DCmdArgument<jlong> _jdp_ttl; |
ac08a4bdd0f6
8002048: Protocol to discovery of manageable Java processes on a network
dsamersoff
parents:
15437
diff
changeset
|
495 |
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
|
496 |
DCmdArgument<char *> _jdp_name; |
15460
ac08a4bdd0f6
8002048: Protocol to discovery of manageable Java processes on a network
dsamersoff
parents:
15437
diff
changeset
|
497 |
|
11953
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
498 |
public: |
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
499 |
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
|
500 |
|
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
501 |
static const char *name() { |
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
502 |
return "ManagementAgent.start"; |
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
503 |
} |
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
504 |
|
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
505 |
static const char *description() { |
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
506 |
return "Start remote management agent."; |
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
507 |
} |
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
508 |
|
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
509 |
static int num_arguments(); |
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
510 |
|
17296
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
511 |
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
|
512 |
|
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
513 |
}; |
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
514 |
|
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
515 |
class JMXStartLocalDCmd : public DCmd { |
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
516 |
|
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
517 |
// 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
|
518 |
// 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
|
519 |
|
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
520 |
|
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
521 |
public: |
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
522 |
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
|
523 |
|
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
524 |
static const char *name() { |
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
525 |
return "ManagementAgent.start_local"; |
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
526 |
} |
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
527 |
|
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
528 |
static const char *description() { |
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
529 |
return "Start local management agent."; |
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
530 |
} |
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
531 |
|
17296
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
532 |
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
|
533 |
|
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
534 |
}; |
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
535 |
|
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
536 |
class JMXStopRemoteDCmd : public DCmd { |
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
537 |
public: |
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
538 |
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
|
539 |
DCmd(output, heap_allocated) { |
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
540 |
// Do Nothing |
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
541 |
} |
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
542 |
|
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
543 |
static const char *name() { |
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
544 |
return "ManagementAgent.stop"; |
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
545 |
} |
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
546 |
|
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
547 |
static const char *description() { |
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
548 |
return "Stop remote management agent."; |
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
549 |
} |
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
550 |
|
17296
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
551 |
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
|
552 |
}; |
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
553 |
|
30134
ecd7b08105e9
8023093: Add ManagementAgent.status diagnostic command
jbachorik
parents:
30121
diff
changeset
|
554 |
// Print the JMX system status |
ecd7b08105e9
8023093: Add ManagementAgent.status diagnostic command
jbachorik
parents:
30121
diff
changeset
|
555 |
class JMXStatusDCmd : public DCmd { |
ecd7b08105e9
8023093: Add ManagementAgent.status diagnostic command
jbachorik
parents:
30121
diff
changeset
|
556 |
public: |
ecd7b08105e9
8023093: Add ManagementAgent.status diagnostic command
jbachorik
parents:
30121
diff
changeset
|
557 |
JMXStatusDCmd(outputStream *output, bool heap_allocated); |
ecd7b08105e9
8023093: Add ManagementAgent.status diagnostic command
jbachorik
parents:
30121
diff
changeset
|
558 |
|
ecd7b08105e9
8023093: Add ManagementAgent.status diagnostic command
jbachorik
parents:
30121
diff
changeset
|
559 |
static const char *name() { |
ecd7b08105e9
8023093: Add ManagementAgent.status diagnostic command
jbachorik
parents:
30121
diff
changeset
|
560 |
return "ManagementAgent.status"; |
ecd7b08105e9
8023093: Add ManagementAgent.status diagnostic command
jbachorik
parents:
30121
diff
changeset
|
561 |
} |
ecd7b08105e9
8023093: Add ManagementAgent.status diagnostic command
jbachorik
parents:
30121
diff
changeset
|
562 |
|
ecd7b08105e9
8023093: Add ManagementAgent.status diagnostic command
jbachorik
parents:
30121
diff
changeset
|
563 |
static const char *description() { |
ecd7b08105e9
8023093: Add ManagementAgent.status diagnostic command
jbachorik
parents:
30121
diff
changeset
|
564 |
return "Print the management agent status."; |
ecd7b08105e9
8023093: Add ManagementAgent.status diagnostic command
jbachorik
parents:
30121
diff
changeset
|
565 |
} |
ecd7b08105e9
8023093: Add ManagementAgent.status diagnostic command
jbachorik
parents:
30121
diff
changeset
|
566 |
|
ecd7b08105e9
8023093: Add ManagementAgent.status diagnostic command
jbachorik
parents:
30121
diff
changeset
|
567 |
static const JavaPermission permission() { |
ecd7b08105e9
8023093: Add ManagementAgent.status diagnostic command
jbachorik
parents:
30121
diff
changeset
|
568 |
JavaPermission p = {"java.lang.management.ManagementPermission", |
ecd7b08105e9
8023093: Add ManagementAgent.status diagnostic command
jbachorik
parents:
30121
diff
changeset
|
569 |
"monitor", NULL}; |
ecd7b08105e9
8023093: Add ManagementAgent.status diagnostic command
jbachorik
parents:
30121
diff
changeset
|
570 |
return p; |
ecd7b08105e9
8023093: Add ManagementAgent.status diagnostic command
jbachorik
parents:
30121
diff
changeset
|
571 |
} |
ecd7b08105e9
8023093: Add ManagementAgent.status diagnostic command
jbachorik
parents:
30121
diff
changeset
|
572 |
|
ecd7b08105e9
8023093: Add ManagementAgent.status diagnostic command
jbachorik
parents:
30121
diff
changeset
|
573 |
virtual void execute(DCmdSource source, TRAPS); |
ecd7b08105e9
8023093: Add ManagementAgent.status diagnostic command
jbachorik
parents:
30121
diff
changeset
|
574 |
|
ecd7b08105e9
8023093: Add ManagementAgent.status diagnostic command
jbachorik
parents:
30121
diff
changeset
|
575 |
}; |
ecd7b08105e9
8023093: Add ManagementAgent.status diagnostic command
jbachorik
parents:
30121
diff
changeset
|
576 |
|
26587 | 577 |
class CompileQueueDCmd : public DCmd { |
578 |
public: |
|
579 |
CompileQueueDCmd(outputStream* output, bool heap) : DCmd(output, heap) {} |
|
580 |
static const char* name() { |
|
581 |
return "Compiler.queue"; |
|
582 |
} |
|
583 |
static const char* description() { |
|
584 |
return "Print methods queued for compilation."; |
|
585 |
} |
|
586 |
static const char* impact() { |
|
587 |
return "Low"; |
|
588 |
} |
|
589 |
static const JavaPermission permission() { |
|
590 |
JavaPermission p = {"java.lang.management.ManagementPermission", |
|
591 |
"monitor", NULL}; |
|
592 |
return p; |
|
593 |
} |
|
594 |
static int num_arguments() { return 0; } |
|
595 |
virtual void execute(DCmdSource source, TRAPS); |
|
596 |
}; |
|
597 |
||
598 |
class CodeListDCmd : public DCmd { |
|
599 |
public: |
|
600 |
CodeListDCmd(outputStream* output, bool heap) : DCmd(output, heap) {} |
|
601 |
static const char* name() { |
|
602 |
return "Compiler.codelist"; |
|
603 |
} |
|
604 |
static const char* description() { |
|
26807
843ea33eb963
8058461: serviceability/dcmd/CodelistTest.java and serviceability/dcmd/CompilerQueueTest.java SIGSEGV
neliasso
parents:
26587
diff
changeset
|
605 |
return "Print all compiled methods in code cache that are alive"; |
26587 | 606 |
} |
607 |
static const char* impact() { |
|
608 |
return "Medium"; |
|
609 |
} |
|
610 |
static const JavaPermission permission() { |
|
611 |
JavaPermission p = {"java.lang.management.ManagementPermission", |
|
612 |
"monitor", NULL}; |
|
613 |
return p; |
|
614 |
} |
|
615 |
static int num_arguments() { return 0; } |
|
616 |
virtual void execute(DCmdSource source, TRAPS); |
|
617 |
}; |
|
618 |
||
619 |
||
620 |
class CodeCacheDCmd : public DCmd { |
|
621 |
public: |
|
622 |
CodeCacheDCmd(outputStream* output, bool heap) : DCmd(output, heap) {} |
|
623 |
static const char* name() { |
|
624 |
return "Compiler.codecache"; |
|
625 |
} |
|
626 |
static const char* description() { |
|
627 |
return "Print code cache layout and bounds."; |
|
628 |
} |
|
629 |
static const char* impact() { |
|
630 |
return "Low"; |
|
631 |
} |
|
632 |
static const JavaPermission permission() { |
|
633 |
JavaPermission p = {"java.lang.management.ManagementPermission", |
|
634 |
"monitor", NULL}; |
|
635 |
return p; |
|
636 |
} |
|
637 |
static int num_arguments() { return 0; } |
|
638 |
virtual void execute(DCmdSource source, TRAPS); |
|
639 |
}; |
|
640 |
||
33451
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
641 |
class CompilerDirectivesPrintDCmd : public DCmd { |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
642 |
public: |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
643 |
CompilerDirectivesPrintDCmd(outputStream* output, bool heap) : DCmd(output, heap) {} |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
644 |
static const char* name() { |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
645 |
return "Compiler.directives_print"; |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
646 |
} |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
647 |
static const char* description() { |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
648 |
return "Print all active compiler directives."; |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
649 |
} |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
650 |
static const char* impact() { |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
651 |
return "Low"; |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
652 |
} |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
653 |
static const JavaPermission permission() { |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
654 |
JavaPermission p = {"java.lang.management.ManagementPermission", |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
655 |
"monitor", NULL}; |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
656 |
return p; |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
657 |
} |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
658 |
static int num_arguments() { return 0; } |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
659 |
virtual void execute(DCmdSource source, TRAPS); |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
660 |
}; |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
661 |
|
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
662 |
class CompilerDirectivesRemoveDCmd : public DCmd { |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
663 |
public: |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
664 |
CompilerDirectivesRemoveDCmd(outputStream* output, bool heap) : DCmd(output, heap) {} |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
665 |
static const char* name() { |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
666 |
return "Compiler.directives_remove"; |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
667 |
} |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
668 |
static const char* description() { |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
669 |
return "Remove latest added compiler directive."; |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
670 |
} |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
671 |
static const char* impact() { |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
672 |
return "Low"; |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
673 |
} |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
674 |
static const JavaPermission permission() { |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
675 |
JavaPermission p = {"java.lang.management.ManagementPermission", |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
676 |
"monitor", NULL}; |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
677 |
return p; |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
678 |
} |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
679 |
static int num_arguments() { return 0; } |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
680 |
virtual void execute(DCmdSource source, TRAPS); |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
681 |
}; |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
682 |
|
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
683 |
class CompilerDirectivesAddDCmd : public DCmdWithParser { |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
684 |
protected: |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
685 |
DCmdArgument<char*> _filename; |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
686 |
public: |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
687 |
CompilerDirectivesAddDCmd(outputStream* output, bool heap); |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
688 |
static const char* name() { |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
689 |
return "Compiler.directives_add"; |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
690 |
} |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
691 |
static const char* description() { |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
692 |
return "Add compiler directives from file."; |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
693 |
} |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
694 |
static const char* impact() { |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
695 |
return "Low"; |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
696 |
} |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
697 |
static const JavaPermission permission() { |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
698 |
JavaPermission p = {"java.lang.management.ManagementPermission", |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
699 |
"monitor", NULL}; |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
700 |
return p; |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
701 |
} |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
702 |
static int num_arguments(); |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
703 |
virtual void execute(DCmdSource source, TRAPS); |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
704 |
}; |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
705 |
|
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
706 |
class CompilerDirectivesClearDCmd : public DCmd { |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
707 |
public: |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
708 |
CompilerDirectivesClearDCmd(outputStream* output, bool heap) : DCmd(output, heap) {} |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
709 |
static const char* name() { |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
710 |
return "Compiler.directives_clear"; |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
711 |
} |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
712 |
static const char* description() { |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
713 |
return "Remove all compiler directives."; |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
714 |
} |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
715 |
static const char* impact() { |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
716 |
return "Low"; |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
717 |
} |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
718 |
static const JavaPermission permission() { |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
719 |
JavaPermission p = {"java.lang.management.ManagementPermission", |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
720 |
"monitor", NULL}; |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
721 |
return p; |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
722 |
} |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
723 |
static int num_arguments() { return 0; } |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
724 |
virtual void execute(DCmdSource source, TRAPS); |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
725 |
}; |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
726 |
|
11209 | 727 |
#endif // SHARE_VM_SERVICES_DIAGNOSTICCOMMAND_HPP |