author | chegar |
Thu, 17 Oct 2019 20:54:25 +0100 | |
branch | datagramsocketimpl-branch |
changeset 58679 | 9c3209ff7550 |
parent 58678 | 9cf78a70fa4f |
parent 55560 | cb0131439e9d |
permissions | -rw-r--r-- |
11209 | 1 |
/* |
53244
9807daeb47c4
8216167: Update include guards to reflect correct directories
coleenp
parents:
53079
diff
changeset
|
2 |
* Copyright (c) 2011, 2019, 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 |
||
53244
9807daeb47c4
8216167: Update include guards to reflect correct directories
coleenp
parents:
53079
diff
changeset
|
25 |
#ifndef SHARE_SERVICES_DIAGNOSTICCOMMAND_HPP |
9807daeb47c4
8216167: Update include guards to reflect correct directories
coleenp
parents:
53079
diff
changeset
|
26 |
#define SHARE_SERVICES_DIAGNOSTICCOMMAND_HPP |
11209 | 27 |
|
46742 | 28 |
#include "classfile/stringTable.hpp" |
29 |
#include "classfile/symbolTable.hpp" |
|
30 |
#include "classfile/systemDictionary.hpp" |
|
25715
d5a8dbdc5150
8049325: Introduce and clean up umbrella headers for the files in the cpu subdirectories.
goetz
parents:
23517
diff
changeset
|
31 |
#include "classfile/vmSymbols.hpp" |
11209 | 32 |
#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
|
33 |
#include "runtime/os.hpp" |
11209 | 34 |
#include "runtime/vmThread.hpp" |
35 |
#include "services/diagnosticArgument.hpp" |
|
36 |
#include "services/diagnosticCommand.hpp" |
|
37 |
#include "services/diagnosticFramework.hpp" |
|
15482
470d0b0c09f1
8005915: Unify SERIALGC and INCLUDE_ALTERNATE_GCS
jprovino
parents:
13975
diff
changeset
|
38 |
#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
|
39 |
#include "utilities/ostream.hpp" |
31790 | 40 |
#include "oops/method.hpp" |
11209 | 41 |
|
11441 | 42 |
class HelpDCmd : public DCmdWithParser { |
11209 | 43 |
protected: |
44 |
DCmdArgument<bool> _all; |
|
45 |
DCmdArgument<char*> _cmd; |
|
46 |
public: |
|
47 |
HelpDCmd(outputStream* output, bool heap); |
|
48 |
static const char* name() { return "help"; } |
|
49 |
static const char* description() { |
|
50 |
return "For more information about a specific command use 'help <command>'. " |
|
51 |
"With no argument this will show a list of available commands. " |
|
52 |
"'help all' will show help for all commands."; |
|
53 |
} |
|
13200
7b506e7b406e
7178703: Fix handling of quoted arguments and better error messages in dcmd
sla
parents:
11953
diff
changeset
|
54 |
static const char* impact() { return "Low"; } |
11209 | 55 |
static int num_arguments(); |
17296
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
56 |
virtual void execute(DCmdSource source, TRAPS); |
11209 | 57 |
}; |
58 |
||
59 |
class VersionDCmd : public DCmd { |
|
60 |
public: |
|
61 |
VersionDCmd(outputStream* output, bool heap) : DCmd(output,heap) { } |
|
62 |
static const char* name() { return "VM.version"; } |
|
63 |
static const char* description() { |
|
64 |
return "Print JVM version information."; |
|
65 |
} |
|
13200
7b506e7b406e
7178703: Fix handling of quoted arguments and better error messages in dcmd
sla
parents:
11953
diff
changeset
|
66 |
static const char* impact() { return "Low"; } |
17296
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
67 |
static const JavaPermission permission() { |
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
68 |
JavaPermission p = {"java.util.PropertyPermission", |
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
69 |
"java.vm.version", "read"}; |
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
70 |
return p; |
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
71 |
} |
11209 | 72 |
static int num_arguments() { return 0; } |
17296
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
73 |
virtual void execute(DCmdSource source, TRAPS); |
11441 | 74 |
}; |
75 |
||
76 |
class CommandLineDCmd : public DCmd { |
|
77 |
public: |
|
78 |
CommandLineDCmd(outputStream* output, bool heap) : DCmd(output, heap) { } |
|
79 |
static const char* name() { return "VM.command_line"; } |
|
80 |
static const char* description() { |
|
81 |
return "Print the command line used to start this VM instance."; |
|
82 |
} |
|
13200
7b506e7b406e
7178703: Fix handling of quoted arguments and better error messages in dcmd
sla
parents:
11953
diff
changeset
|
83 |
static const char* impact() { return "Low"; } |
17296
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
84 |
static const JavaPermission permission() { |
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
85 |
JavaPermission p = {"java.lang.management.ManagementPermission", |
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
86 |
"monitor", NULL}; |
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
87 |
return p; |
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
88 |
} |
11441 | 89 |
static int num_arguments() { return 0; } |
17296
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
90 |
virtual void execute(DCmdSource source, TRAPS) { |
11441 | 91 |
Arguments::print_on(_output); |
92 |
} |
|
93 |
}; |
|
94 |
||
95 |
// See also: get_system_properties in attachListener.cpp |
|
96 |
class PrintSystemPropertiesDCmd : public DCmd { |
|
97 |
public: |
|
98 |
PrintSystemPropertiesDCmd(outputStream* output, bool heap) : DCmd(output, heap) { } |
|
99 |
static const char* name() { return "VM.system_properties"; } |
|
100 |
static const char* description() { |
|
101 |
return "Print system properties."; |
|
102 |
} |
|
103 |
static const char* impact() { |
|
13200
7b506e7b406e
7178703: Fix handling of quoted arguments and better error messages in dcmd
sla
parents:
11953
diff
changeset
|
104 |
return "Low"; |
11441 | 105 |
} |
17296
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
106 |
static const JavaPermission permission() { |
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
107 |
JavaPermission p = {"java.util.PropertyPermission", |
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
108 |
"*", "read"}; |
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
109 |
return p; |
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
110 |
} |
11441 | 111 |
static int num_arguments() { return 0; } |
17296
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
112 |
virtual void execute(DCmdSource source, TRAPS); |
11441 | 113 |
}; |
114 |
||
115 |
// See also: print_flag in attachListener.cpp |
|
116 |
class PrintVMFlagsDCmd : public DCmdWithParser { |
|
117 |
protected: |
|
118 |
DCmdArgument<bool> _all; |
|
119 |
public: |
|
120 |
PrintVMFlagsDCmd(outputStream* output, bool heap); |
|
121 |
static const char* name() { return "VM.flags"; } |
|
122 |
static const char* description() { |
|
123 |
return "Print VM flag options and their current values."; |
|
124 |
} |
|
125 |
static const char* impact() { |
|
13200
7b506e7b406e
7178703: Fix handling of quoted arguments and better error messages in dcmd
sla
parents:
11953
diff
changeset
|
126 |
return "Low"; |
11441 | 127 |
} |
17296
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
128 |
static const JavaPermission permission() { |
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
129 |
JavaPermission p = {"java.lang.management.ManagementPermission", |
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
130 |
"monitor", NULL}; |
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
131 |
return p; |
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
132 |
} |
11441 | 133 |
static int num_arguments(); |
17296
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
134 |
virtual void execute(DCmdSource source, TRAPS); |
11441 | 135 |
}; |
136 |
||
30121
cc43664a0ad7
8054890: Serviceability: New diagnostic commands 'VM.set_flag' and 'JVMTI.data_dump'
jbachorik
parents:
29071
diff
changeset
|
137 |
class SetVMFlagDCmd : public DCmdWithParser { |
cc43664a0ad7
8054890: Serviceability: New diagnostic commands 'VM.set_flag' and 'JVMTI.data_dump'
jbachorik
parents:
29071
diff
changeset
|
138 |
protected: |
cc43664a0ad7
8054890: Serviceability: New diagnostic commands 'VM.set_flag' and 'JVMTI.data_dump'
jbachorik
parents:
29071
diff
changeset
|
139 |
DCmdArgument<char*> _flag; |
cc43664a0ad7
8054890: Serviceability: New diagnostic commands 'VM.set_flag' and 'JVMTI.data_dump'
jbachorik
parents:
29071
diff
changeset
|
140 |
DCmdArgument<char*> _value; |
cc43664a0ad7
8054890: Serviceability: New diagnostic commands 'VM.set_flag' and 'JVMTI.data_dump'
jbachorik
parents:
29071
diff
changeset
|
141 |
|
cc43664a0ad7
8054890: Serviceability: New diagnostic commands 'VM.set_flag' and 'JVMTI.data_dump'
jbachorik
parents:
29071
diff
changeset
|
142 |
public: |
cc43664a0ad7
8054890: Serviceability: New diagnostic commands 'VM.set_flag' and 'JVMTI.data_dump'
jbachorik
parents:
29071
diff
changeset
|
143 |
SetVMFlagDCmd(outputStream* output, bool heap); |
cc43664a0ad7
8054890: Serviceability: New diagnostic commands 'VM.set_flag' and 'JVMTI.data_dump'
jbachorik
parents:
29071
diff
changeset
|
144 |
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
|
145 |
static const char* description() { |
cc43664a0ad7
8054890: Serviceability: New diagnostic commands 'VM.set_flag' and 'JVMTI.data_dump'
jbachorik
parents:
29071
diff
changeset
|
146 |
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
|
147 |
} |
cc43664a0ad7
8054890: Serviceability: New diagnostic commands 'VM.set_flag' and 'JVMTI.data_dump'
jbachorik
parents:
29071
diff
changeset
|
148 |
static const char* impact() { |
cc43664a0ad7
8054890: Serviceability: New diagnostic commands 'VM.set_flag' and 'JVMTI.data_dump'
jbachorik
parents:
29071
diff
changeset
|
149 |
return "Low"; |
cc43664a0ad7
8054890: Serviceability: New diagnostic commands 'VM.set_flag' and 'JVMTI.data_dump'
jbachorik
parents:
29071
diff
changeset
|
150 |
} |
cc43664a0ad7
8054890: Serviceability: New diagnostic commands 'VM.set_flag' and 'JVMTI.data_dump'
jbachorik
parents:
29071
diff
changeset
|
151 |
static const JavaPermission permission() { |
cc43664a0ad7
8054890: Serviceability: New diagnostic commands 'VM.set_flag' and 'JVMTI.data_dump'
jbachorik
parents:
29071
diff
changeset
|
152 |
JavaPermission p = {"java.lang.management.ManagementPermission", |
cc43664a0ad7
8054890: Serviceability: New diagnostic commands 'VM.set_flag' and 'JVMTI.data_dump'
jbachorik
parents:
29071
diff
changeset
|
153 |
"control", NULL}; |
cc43664a0ad7
8054890: Serviceability: New diagnostic commands 'VM.set_flag' and 'JVMTI.data_dump'
jbachorik
parents:
29071
diff
changeset
|
154 |
return p; |
cc43664a0ad7
8054890: Serviceability: New diagnostic commands 'VM.set_flag' and 'JVMTI.data_dump'
jbachorik
parents:
29071
diff
changeset
|
155 |
} |
cc43664a0ad7
8054890: Serviceability: New diagnostic commands 'VM.set_flag' and 'JVMTI.data_dump'
jbachorik
parents:
29071
diff
changeset
|
156 |
static int num_arguments(); |
cc43664a0ad7
8054890: Serviceability: New diagnostic commands 'VM.set_flag' and 'JVMTI.data_dump'
jbachorik
parents:
29071
diff
changeset
|
157 |
virtual void execute(DCmdSource source, TRAPS); |
cc43664a0ad7
8054890: Serviceability: New diagnostic commands 'VM.set_flag' and 'JVMTI.data_dump'
jbachorik
parents:
29071
diff
changeset
|
158 |
}; |
cc43664a0ad7
8054890: Serviceability: New diagnostic commands 'VM.set_flag' and 'JVMTI.data_dump'
jbachorik
parents:
29071
diff
changeset
|
159 |
|
cc43664a0ad7
8054890: Serviceability: New diagnostic commands 'VM.set_flag' and 'JVMTI.data_dump'
jbachorik
parents:
29071
diff
changeset
|
160 |
class JVMTIDataDumpDCmd : public DCmd { |
cc43664a0ad7
8054890: Serviceability: New diagnostic commands 'VM.set_flag' and 'JVMTI.data_dump'
jbachorik
parents:
29071
diff
changeset
|
161 |
public: |
cc43664a0ad7
8054890: Serviceability: New diagnostic commands 'VM.set_flag' and 'JVMTI.data_dump'
jbachorik
parents:
29071
diff
changeset
|
162 |
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
|
163 |
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
|
164 |
static const char* description() { |
cc43664a0ad7
8054890: Serviceability: New diagnostic commands 'VM.set_flag' and 'JVMTI.data_dump'
jbachorik
parents:
29071
diff
changeset
|
165 |
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
|
166 |
} |
cc43664a0ad7
8054890: Serviceability: New diagnostic commands 'VM.set_flag' and 'JVMTI.data_dump'
jbachorik
parents:
29071
diff
changeset
|
167 |
static const char* impact() { |
cc43664a0ad7
8054890: Serviceability: New diagnostic commands 'VM.set_flag' and 'JVMTI.data_dump'
jbachorik
parents:
29071
diff
changeset
|
168 |
return "High"; |
cc43664a0ad7
8054890: Serviceability: New diagnostic commands 'VM.set_flag' and 'JVMTI.data_dump'
jbachorik
parents:
29071
diff
changeset
|
169 |
} |
cc43664a0ad7
8054890: Serviceability: New diagnostic commands 'VM.set_flag' and 'JVMTI.data_dump'
jbachorik
parents:
29071
diff
changeset
|
170 |
static const JavaPermission permission() { |
cc43664a0ad7
8054890: Serviceability: New diagnostic commands 'VM.set_flag' and 'JVMTI.data_dump'
jbachorik
parents:
29071
diff
changeset
|
171 |
JavaPermission p = {"java.lang.management.ManagementPermission", |
cc43664a0ad7
8054890: Serviceability: New diagnostic commands 'VM.set_flag' and 'JVMTI.data_dump'
jbachorik
parents:
29071
diff
changeset
|
172 |
"monitor", NULL}; |
cc43664a0ad7
8054890: Serviceability: New diagnostic commands 'VM.set_flag' and 'JVMTI.data_dump'
jbachorik
parents:
29071
diff
changeset
|
173 |
return p; |
cc43664a0ad7
8054890: Serviceability: New diagnostic commands 'VM.set_flag' and 'JVMTI.data_dump'
jbachorik
parents:
29071
diff
changeset
|
174 |
} |
cc43664a0ad7
8054890: Serviceability: New diagnostic commands 'VM.set_flag' and 'JVMTI.data_dump'
jbachorik
parents:
29071
diff
changeset
|
175 |
static int num_arguments() { return 0; } |
cc43664a0ad7
8054890: Serviceability: New diagnostic commands 'VM.set_flag' and 'JVMTI.data_dump'
jbachorik
parents:
29071
diff
changeset
|
176 |
virtual void execute(DCmdSource source, TRAPS); |
cc43664a0ad7
8054890: Serviceability: New diagnostic commands 'VM.set_flag' and 'JVMTI.data_dump'
jbachorik
parents:
29071
diff
changeset
|
177 |
}; |
cc43664a0ad7
8054890: Serviceability: New diagnostic commands 'VM.set_flag' and 'JVMTI.data_dump'
jbachorik
parents:
29071
diff
changeset
|
178 |
|
37195
88b6f1271f64
8151991: jvmti diagnostics commands requires INCLUDE_SERVICES
dsamersoff
parents:
36188
diff
changeset
|
179 |
#if INCLUDE_SERVICES |
88b6f1271f64
8151991: jvmti diagnostics commands requires INCLUDE_SERVICES
dsamersoff
parents:
36188
diff
changeset
|
180 |
#if INCLUDE_JVMTI |
36188
99b6836dd3e8
8147388: Add diagnostic commands to attach JVMTI agent.
ysuenaga
parents:
35186
diff
changeset
|
181 |
class JVMTIAgentLoadDCmd : public DCmdWithParser { |
99b6836dd3e8
8147388: Add diagnostic commands to attach JVMTI agent.
ysuenaga
parents:
35186
diff
changeset
|
182 |
protected: |
99b6836dd3e8
8147388: Add diagnostic commands to attach JVMTI agent.
ysuenaga
parents:
35186
diff
changeset
|
183 |
DCmdArgument<char*> _libpath; |
99b6836dd3e8
8147388: Add diagnostic commands to attach JVMTI agent.
ysuenaga
parents:
35186
diff
changeset
|
184 |
DCmdArgument<char*> _option; |
99b6836dd3e8
8147388: Add diagnostic commands to attach JVMTI agent.
ysuenaga
parents:
35186
diff
changeset
|
185 |
public: |
99b6836dd3e8
8147388: Add diagnostic commands to attach JVMTI agent.
ysuenaga
parents:
35186
diff
changeset
|
186 |
JVMTIAgentLoadDCmd(outputStream* output, bool heap); |
99b6836dd3e8
8147388: Add diagnostic commands to attach JVMTI agent.
ysuenaga
parents:
35186
diff
changeset
|
187 |
static const char* name() { return "JVMTI.agent_load"; } |
99b6836dd3e8
8147388: Add diagnostic commands to attach JVMTI agent.
ysuenaga
parents:
35186
diff
changeset
|
188 |
static const char* description() { |
99b6836dd3e8
8147388: Add diagnostic commands to attach JVMTI agent.
ysuenaga
parents:
35186
diff
changeset
|
189 |
return "Load JVMTI native agent."; |
99b6836dd3e8
8147388: Add diagnostic commands to attach JVMTI agent.
ysuenaga
parents:
35186
diff
changeset
|
190 |
} |
99b6836dd3e8
8147388: Add diagnostic commands to attach JVMTI agent.
ysuenaga
parents:
35186
diff
changeset
|
191 |
static const char* impact() { return "Low"; } |
99b6836dd3e8
8147388: Add diagnostic commands to attach JVMTI agent.
ysuenaga
parents:
35186
diff
changeset
|
192 |
static const JavaPermission permission() { |
99b6836dd3e8
8147388: Add diagnostic commands to attach JVMTI agent.
ysuenaga
parents:
35186
diff
changeset
|
193 |
JavaPermission p = {"java.lang.management.ManagementPermission", |
99b6836dd3e8
8147388: Add diagnostic commands to attach JVMTI agent.
ysuenaga
parents:
35186
diff
changeset
|
194 |
"control", NULL}; |
99b6836dd3e8
8147388: Add diagnostic commands to attach JVMTI agent.
ysuenaga
parents:
35186
diff
changeset
|
195 |
return p; |
99b6836dd3e8
8147388: Add diagnostic commands to attach JVMTI agent.
ysuenaga
parents:
35186
diff
changeset
|
196 |
} |
99b6836dd3e8
8147388: Add diagnostic commands to attach JVMTI agent.
ysuenaga
parents:
35186
diff
changeset
|
197 |
static int num_arguments(); |
99b6836dd3e8
8147388: Add diagnostic commands to attach JVMTI agent.
ysuenaga
parents:
35186
diff
changeset
|
198 |
virtual void execute(DCmdSource source, TRAPS); |
99b6836dd3e8
8147388: Add diagnostic commands to attach JVMTI agent.
ysuenaga
parents:
35186
diff
changeset
|
199 |
}; |
37195
88b6f1271f64
8151991: jvmti diagnostics commands requires INCLUDE_SERVICES
dsamersoff
parents:
36188
diff
changeset
|
200 |
#endif // INCLUDE_JVMTI |
88b6f1271f64
8151991: jvmti diagnostics commands requires INCLUDE_SERVICES
dsamersoff
parents:
36188
diff
changeset
|
201 |
#endif // INCLUDE_SERVICES |
36188
99b6836dd3e8
8147388: Add diagnostic commands to attach JVMTI agent.
ysuenaga
parents:
35186
diff
changeset
|
202 |
|
22490
039128291aa6
8031304: Add dcmd to print all loaded dynamic libraries.
farvidsson
parents:
21076
diff
changeset
|
203 |
class VMDynamicLibrariesDCmd : public DCmd { |
039128291aa6
8031304: Add dcmd to print all loaded dynamic libraries.
farvidsson
parents:
21076
diff
changeset
|
204 |
public: |
039128291aa6
8031304: Add dcmd to print all loaded dynamic libraries.
farvidsson
parents:
21076
diff
changeset
|
205 |
VMDynamicLibrariesDCmd(outputStream* output, bool heap); |
039128291aa6
8031304: Add dcmd to print all loaded dynamic libraries.
farvidsson
parents:
21076
diff
changeset
|
206 |
static const char* name() { |
039128291aa6
8031304: Add dcmd to print all loaded dynamic libraries.
farvidsson
parents:
21076
diff
changeset
|
207 |
return "VM.dynlibs"; |
039128291aa6
8031304: Add dcmd to print all loaded dynamic libraries.
farvidsson
parents:
21076
diff
changeset
|
208 |
} |
039128291aa6
8031304: Add dcmd to print all loaded dynamic libraries.
farvidsson
parents:
21076
diff
changeset
|
209 |
static const char* description() { |
039128291aa6
8031304: Add dcmd to print all loaded dynamic libraries.
farvidsson
parents:
21076
diff
changeset
|
210 |
return "Print loaded dynamic libraries."; |
039128291aa6
8031304: Add dcmd to print all loaded dynamic libraries.
farvidsson
parents:
21076
diff
changeset
|
211 |
} |
039128291aa6
8031304: Add dcmd to print all loaded dynamic libraries.
farvidsson
parents:
21076
diff
changeset
|
212 |
static const char* impact() { |
039128291aa6
8031304: Add dcmd to print all loaded dynamic libraries.
farvidsson
parents:
21076
diff
changeset
|
213 |
return "Low"; |
039128291aa6
8031304: Add dcmd to print all loaded dynamic libraries.
farvidsson
parents:
21076
diff
changeset
|
214 |
} |
039128291aa6
8031304: Add dcmd to print all loaded dynamic libraries.
farvidsson
parents:
21076
diff
changeset
|
215 |
static const JavaPermission permission() { |
039128291aa6
8031304: Add dcmd to print all loaded dynamic libraries.
farvidsson
parents:
21076
diff
changeset
|
216 |
JavaPermission p = {"java.lang.management.ManagementPermission", |
039128291aa6
8031304: Add dcmd to print all loaded dynamic libraries.
farvidsson
parents:
21076
diff
changeset
|
217 |
"monitor", NULL}; |
039128291aa6
8031304: Add dcmd to print all loaded dynamic libraries.
farvidsson
parents:
21076
diff
changeset
|
218 |
return p; |
039128291aa6
8031304: Add dcmd to print all loaded dynamic libraries.
farvidsson
parents:
21076
diff
changeset
|
219 |
} |
039128291aa6
8031304: Add dcmd to print all loaded dynamic libraries.
farvidsson
parents:
21076
diff
changeset
|
220 |
static int num_arguments() { |
039128291aa6
8031304: Add dcmd to print all loaded dynamic libraries.
farvidsson
parents:
21076
diff
changeset
|
221 |
return 0; |
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 |
virtual void execute(DCmdSource source, TRAPS); |
039128291aa6
8031304: Add dcmd to print all loaded dynamic libraries.
farvidsson
parents:
21076
diff
changeset
|
224 |
}; |
039128291aa6
8031304: Add dcmd to print all loaded dynamic libraries.
farvidsson
parents:
21076
diff
changeset
|
225 |
|
11441 | 226 |
class VMUptimeDCmd : public DCmdWithParser { |
227 |
protected: |
|
228 |
DCmdArgument<bool> _date; |
|
229 |
public: |
|
230 |
VMUptimeDCmd(outputStream* output, bool heap); |
|
231 |
static const char* name() { return "VM.uptime"; } |
|
232 |
static const char* description() { |
|
233 |
return "Print VM uptime."; |
|
234 |
} |
|
235 |
static const char* impact() { |
|
13200
7b506e7b406e
7178703: Fix handling of quoted arguments and better error messages in dcmd
sla
parents:
11953
diff
changeset
|
236 |
return "Low"; |
11441 | 237 |
} |
238 |
static int num_arguments(); |
|
17296
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
239 |
virtual void execute(DCmdSource source, TRAPS); |
11441 | 240 |
}; |
241 |
||
34139
0728fe06ccf8
8027429: Add diagnostic command VM.info to get hs_err print-out
coleenp
parents:
33451
diff
changeset
|
242 |
class VMInfoDCmd : public DCmd { |
0728fe06ccf8
8027429: Add diagnostic command VM.info to get hs_err print-out
coleenp
parents:
33451
diff
changeset
|
243 |
public: |
0728fe06ccf8
8027429: Add diagnostic command VM.info to get hs_err print-out
coleenp
parents:
33451
diff
changeset
|
244 |
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
|
245 |
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
|
246 |
static const char* description() { |
0728fe06ccf8
8027429: Add diagnostic command VM.info to get hs_err print-out
coleenp
parents:
33451
diff
changeset
|
247 |
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
|
248 |
} |
0728fe06ccf8
8027429: Add diagnostic command VM.info to get hs_err print-out
coleenp
parents:
33451
diff
changeset
|
249 |
static const char* impact() { return "Low"; } |
0728fe06ccf8
8027429: Add diagnostic command VM.info to get hs_err print-out
coleenp
parents:
33451
diff
changeset
|
250 |
static const JavaPermission permission() { |
0728fe06ccf8
8027429: Add diagnostic command VM.info to get hs_err print-out
coleenp
parents:
33451
diff
changeset
|
251 |
JavaPermission p = {"java.lang.management.ManagementPermission", |
0728fe06ccf8
8027429: Add diagnostic command VM.info to get hs_err print-out
coleenp
parents:
33451
diff
changeset
|
252 |
"monitor", NULL}; |
0728fe06ccf8
8027429: Add diagnostic command VM.info to get hs_err print-out
coleenp
parents:
33451
diff
changeset
|
253 |
return p; |
0728fe06ccf8
8027429: Add diagnostic command VM.info to get hs_err print-out
coleenp
parents:
33451
diff
changeset
|
254 |
} |
0728fe06ccf8
8027429: Add diagnostic command VM.info to get hs_err print-out
coleenp
parents:
33451
diff
changeset
|
255 |
static int num_arguments() { return 0; } |
0728fe06ccf8
8027429: Add diagnostic command VM.info to get hs_err print-out
coleenp
parents:
33451
diff
changeset
|
256 |
virtual void execute(DCmdSource source, TRAPS); |
0728fe06ccf8
8027429: Add diagnostic command VM.info to get hs_err print-out
coleenp
parents:
33451
diff
changeset
|
257 |
}; |
0728fe06ccf8
8027429: Add diagnostic command VM.info to get hs_err print-out
coleenp
parents:
33451
diff
changeset
|
258 |
|
11441 | 259 |
class SystemGCDCmd : public DCmd { |
260 |
public: |
|
261 |
SystemGCDCmd(outputStream* output, bool heap) : DCmd(output, heap) { } |
|
262 |
static const char* name() { return "GC.run"; } |
|
263 |
static const char* description() { |
|
264 |
return "Call java.lang.System.gc()."; |
|
265 |
} |
|
266 |
static const char* impact() { |
|
267 |
return "Medium: Depends on Java heap size and content."; |
|
268 |
} |
|
269 |
static int num_arguments() { return 0; } |
|
17296
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
270 |
virtual void execute(DCmdSource source, TRAPS); |
11441 | 271 |
}; |
272 |
||
273 |
class RunFinalizationDCmd : public DCmd { |
|
274 |
public: |
|
275 |
RunFinalizationDCmd(outputStream* output, bool heap) : DCmd(output, heap) { } |
|
276 |
static const char* name() { return "GC.run_finalization"; } |
|
277 |
static const char* description() { |
|
278 |
return "Call java.lang.System.runFinalization()."; |
|
279 |
} |
|
280 |
static const char* impact() { |
|
281 |
return "Medium: Depends on Java content."; |
|
282 |
} |
|
283 |
static int num_arguments() { return 0; } |
|
17296
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
284 |
virtual void execute(DCmdSource source, TRAPS); |
11441 | 285 |
}; |
286 |
||
32072
bc13add2c295
8059036: Implement Diagnostic Commands for heap and finalizerinfo
dsamersoff
parents:
31790
diff
changeset
|
287 |
class HeapInfoDCmd : public DCmd { |
bc13add2c295
8059036: Implement Diagnostic Commands for heap and finalizerinfo
dsamersoff
parents:
31790
diff
changeset
|
288 |
public: |
bc13add2c295
8059036: Implement Diagnostic Commands for heap and finalizerinfo
dsamersoff
parents:
31790
diff
changeset
|
289 |
HeapInfoDCmd(outputStream* output, bool heap) : DCmd(output, heap) { } |
bc13add2c295
8059036: Implement Diagnostic Commands for heap and finalizerinfo
dsamersoff
parents:
31790
diff
changeset
|
290 |
static const char* name() { return "GC.heap_info"; } |
bc13add2c295
8059036: Implement Diagnostic Commands for heap and finalizerinfo
dsamersoff
parents:
31790
diff
changeset
|
291 |
static const char* description() { |
bc13add2c295
8059036: Implement Diagnostic Commands for heap and finalizerinfo
dsamersoff
parents:
31790
diff
changeset
|
292 |
return "Provide generic Java heap information."; |
bc13add2c295
8059036: Implement Diagnostic Commands for heap and finalizerinfo
dsamersoff
parents:
31790
diff
changeset
|
293 |
} |
bc13add2c295
8059036: Implement Diagnostic Commands for heap and finalizerinfo
dsamersoff
parents:
31790
diff
changeset
|
294 |
static const char* impact() { |
bc13add2c295
8059036: Implement Diagnostic Commands for heap and finalizerinfo
dsamersoff
parents:
31790
diff
changeset
|
295 |
return "Medium"; |
bc13add2c295
8059036: Implement Diagnostic Commands for heap and finalizerinfo
dsamersoff
parents:
31790
diff
changeset
|
296 |
} |
bc13add2c295
8059036: Implement Diagnostic Commands for heap and finalizerinfo
dsamersoff
parents:
31790
diff
changeset
|
297 |
static int num_arguments() { return 0; } |
bc13add2c295
8059036: Implement Diagnostic Commands for heap and finalizerinfo
dsamersoff
parents:
31790
diff
changeset
|
298 |
static const JavaPermission permission() { |
bc13add2c295
8059036: Implement Diagnostic Commands for heap and finalizerinfo
dsamersoff
parents:
31790
diff
changeset
|
299 |
JavaPermission p = {"java.lang.management.ManagementPermission", |
bc13add2c295
8059036: Implement Diagnostic Commands for heap and finalizerinfo
dsamersoff
parents:
31790
diff
changeset
|
300 |
"monitor", NULL}; |
bc13add2c295
8059036: Implement Diagnostic Commands for heap and finalizerinfo
dsamersoff
parents:
31790
diff
changeset
|
301 |
return p; |
bc13add2c295
8059036: Implement Diagnostic Commands for heap and finalizerinfo
dsamersoff
parents:
31790
diff
changeset
|
302 |
} |
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 |
virtual void execute(DCmdSource source, TRAPS); |
bc13add2c295
8059036: Implement Diagnostic Commands for heap and finalizerinfo
dsamersoff
parents:
31790
diff
changeset
|
305 |
}; |
bc13add2c295
8059036: Implement Diagnostic Commands for heap and finalizerinfo
dsamersoff
parents:
31790
diff
changeset
|
306 |
|
bc13add2c295
8059036: Implement Diagnostic Commands for heap and finalizerinfo
dsamersoff
parents:
31790
diff
changeset
|
307 |
class FinalizerInfoDCmd : public DCmd { |
bc13add2c295
8059036: Implement Diagnostic Commands for heap and finalizerinfo
dsamersoff
parents:
31790
diff
changeset
|
308 |
public: |
bc13add2c295
8059036: Implement Diagnostic Commands for heap and finalizerinfo
dsamersoff
parents:
31790
diff
changeset
|
309 |
FinalizerInfoDCmd(outputStream* output, bool heap) : DCmd(output, heap) { } |
bc13add2c295
8059036: Implement Diagnostic Commands for heap and finalizerinfo
dsamersoff
parents:
31790
diff
changeset
|
310 |
static const char* name() { return "GC.finalizer_info"; } |
bc13add2c295
8059036: Implement Diagnostic Commands for heap and finalizerinfo
dsamersoff
parents:
31790
diff
changeset
|
311 |
static const char* description() { |
bc13add2c295
8059036: Implement Diagnostic Commands for heap and finalizerinfo
dsamersoff
parents:
31790
diff
changeset
|
312 |
return "Provide information about Java finalization queue."; |
bc13add2c295
8059036: Implement Diagnostic Commands for heap and finalizerinfo
dsamersoff
parents:
31790
diff
changeset
|
313 |
} |
bc13add2c295
8059036: Implement Diagnostic Commands for heap and finalizerinfo
dsamersoff
parents:
31790
diff
changeset
|
314 |
static const char* impact() { |
bc13add2c295
8059036: Implement Diagnostic Commands for heap and finalizerinfo
dsamersoff
parents:
31790
diff
changeset
|
315 |
return "Medium"; |
bc13add2c295
8059036: Implement Diagnostic Commands for heap and finalizerinfo
dsamersoff
parents:
31790
diff
changeset
|
316 |
} |
bc13add2c295
8059036: Implement Diagnostic Commands for heap and finalizerinfo
dsamersoff
parents:
31790
diff
changeset
|
317 |
static int num_arguments() { return 0; } |
bc13add2c295
8059036: Implement Diagnostic Commands for heap and finalizerinfo
dsamersoff
parents:
31790
diff
changeset
|
318 |
static const JavaPermission permission() { |
bc13add2c295
8059036: Implement Diagnostic Commands for heap and finalizerinfo
dsamersoff
parents:
31790
diff
changeset
|
319 |
JavaPermission p = {"java.lang.management.ManagementPermission", |
bc13add2c295
8059036: Implement Diagnostic Commands for heap and finalizerinfo
dsamersoff
parents:
31790
diff
changeset
|
320 |
"monitor", NULL}; |
bc13add2c295
8059036: Implement Diagnostic Commands for heap and finalizerinfo
dsamersoff
parents:
31790
diff
changeset
|
321 |
return p; |
bc13add2c295
8059036: Implement Diagnostic Commands for heap and finalizerinfo
dsamersoff
parents:
31790
diff
changeset
|
322 |
} |
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 |
virtual void execute(DCmdSource source, TRAPS); |
bc13add2c295
8059036: Implement Diagnostic Commands for heap and finalizerinfo
dsamersoff
parents:
31790
diff
changeset
|
325 |
}; |
bc13add2c295
8059036: Implement Diagnostic Commands for heap and finalizerinfo
dsamersoff
parents:
31790
diff
changeset
|
326 |
|
13975
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
13200
diff
changeset
|
327 |
#if INCLUDE_SERVICES // Heap dumping supported |
11441 | 328 |
// See also: dump_heap in attachListener.cpp |
329 |
class HeapDumpDCmd : public DCmdWithParser { |
|
330 |
protected: |
|
331 |
DCmdArgument<char*> _filename; |
|
332 |
DCmdArgument<bool> _all; |
|
333 |
public: |
|
334 |
HeapDumpDCmd(outputStream* output, bool heap); |
|
335 |
static const char* name() { |
|
336 |
return "GC.heap_dump"; |
|
337 |
} |
|
338 |
static const char* description() { |
|
339 |
return "Generate a HPROF format dump of the Java heap."; |
|
340 |
} |
|
341 |
static const char* impact() { |
|
342 |
return "High: Depends on Java heap size and content. " |
|
343 |
"Request a full GC unless the '-all' option is specified."; |
|
344 |
} |
|
17296
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
345 |
static const JavaPermission permission() { |
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
346 |
JavaPermission p = {"java.lang.management.ManagementPermission", |
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
347 |
"monitor", NULL}; |
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
348 |
return p; |
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
349 |
} |
11441 | 350 |
static int num_arguments(); |
17296
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
351 |
virtual void execute(DCmdSource source, TRAPS); |
11441 | 352 |
}; |
13975
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
13200
diff
changeset
|
353 |
#endif // INCLUDE_SERVICES |
11441 | 354 |
|
15437 | 355 |
// See also: inspectheap in attachListener.cpp |
11441 | 356 |
class ClassHistogramDCmd : public DCmdWithParser { |
357 |
protected: |
|
358 |
DCmdArgument<bool> _all; |
|
359 |
public: |
|
360 |
ClassHistogramDCmd(outputStream* output, bool heap); |
|
361 |
static const char* name() { |
|
362 |
return "GC.class_histogram"; |
|
363 |
} |
|
364 |
static const char* description() { |
|
365 |
return "Provide statistics about the Java heap usage."; |
|
366 |
} |
|
367 |
static const char* impact() { |
|
368 |
return "High: Depends on Java heap size and content."; |
|
369 |
} |
|
17296
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
370 |
static const JavaPermission permission() { |
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
371 |
JavaPermission p = {"java.lang.management.ManagementPermission", |
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
372 |
"monitor", NULL}; |
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
373 |
return p; |
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
374 |
} |
11441 | 375 |
static int num_arguments(); |
17296
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
376 |
virtual void execute(DCmdSource source, TRAPS); |
11441 | 377 |
}; |
378 |
||
15437 | 379 |
class ClassStatsDCmd : public DCmdWithParser { |
380 |
protected: |
|
381 |
DCmdArgument<bool> _all; |
|
382 |
DCmdArgument<bool> _csv; |
|
383 |
DCmdArgument<bool> _help; |
|
384 |
DCmdArgument<char*> _columns; |
|
385 |
public: |
|
386 |
ClassStatsDCmd(outputStream* output, bool heap); |
|
387 |
static const char* name() { |
|
388 |
return "GC.class_stats"; |
|
389 |
} |
|
390 |
static const char* description() { |
|
42075
e5b263ac8c2e
8168305: GC.class_stats should not require -XX:+UnlockDiagnosticVMOptions
sla
parents:
37195
diff
changeset
|
391 |
return "Provide statistics about Java class meta data."; |
15437 | 392 |
} |
393 |
static const char* impact() { |
|
394 |
return "High: Depends on Java heap size and content."; |
|
395 |
} |
|
396 |
static int num_arguments(); |
|
17296
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
397 |
virtual void execute(DCmdSource source, TRAPS); |
15437 | 398 |
}; |
399 |
||
29071
73f45d04ad7a
8054888: Runtime: Add Diagnostic Command that prints the class hierarchy
cjplummer
parents:
26807
diff
changeset
|
400 |
|
73f45d04ad7a
8054888: Runtime: Add Diagnostic Command that prints the class hierarchy
cjplummer
parents:
26807
diff
changeset
|
401 |
class ClassHierarchyDCmd : public DCmdWithParser { |
73f45d04ad7a
8054888: Runtime: Add Diagnostic Command that prints the class hierarchy
cjplummer
parents:
26807
diff
changeset
|
402 |
protected: |
73f45d04ad7a
8054888: Runtime: Add Diagnostic Command that prints the class hierarchy
cjplummer
parents:
26807
diff
changeset
|
403 |
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
|
404 |
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
|
405 |
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
|
406 |
public: |
73f45d04ad7a
8054888: Runtime: Add Diagnostic Command that prints the class hierarchy
cjplummer
parents:
26807
diff
changeset
|
407 |
ClassHierarchyDCmd(outputStream* output, bool heap); |
73f45d04ad7a
8054888: Runtime: Add Diagnostic Command that prints the class hierarchy
cjplummer
parents:
26807
diff
changeset
|
408 |
static const char* name() { |
73f45d04ad7a
8054888: Runtime: Add Diagnostic Command that prints the class hierarchy
cjplummer
parents:
26807
diff
changeset
|
409 |
return "VM.class_hierarchy"; |
73f45d04ad7a
8054888: Runtime: Add Diagnostic Command that prints the class hierarchy
cjplummer
parents:
26807
diff
changeset
|
410 |
} |
73f45d04ad7a
8054888: Runtime: Add Diagnostic Command that prints the class hierarchy
cjplummer
parents:
26807
diff
changeset
|
411 |
static const char* description() { |
73f45d04ad7a
8054888: Runtime: Add Diagnostic Command that prints the class hierarchy
cjplummer
parents:
26807
diff
changeset
|
412 |
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
|
413 |
"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
|
414 |
"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
|
415 |
} |
73f45d04ad7a
8054888: Runtime: Add Diagnostic Command that prints the class hierarchy
cjplummer
parents:
26807
diff
changeset
|
416 |
static const char* impact() { |
73f45d04ad7a
8054888: Runtime: Add Diagnostic Command that prints the class hierarchy
cjplummer
parents:
26807
diff
changeset
|
417 |
return "Medium: Depends on number of loaded classes."; |
73f45d04ad7a
8054888: Runtime: Add Diagnostic Command that prints the class hierarchy
cjplummer
parents:
26807
diff
changeset
|
418 |
} |
73f45d04ad7a
8054888: Runtime: Add Diagnostic Command that prints the class hierarchy
cjplummer
parents:
26807
diff
changeset
|
419 |
static const JavaPermission permission() { |
73f45d04ad7a
8054888: Runtime: Add Diagnostic Command that prints the class hierarchy
cjplummer
parents:
26807
diff
changeset
|
420 |
JavaPermission p = {"java.lang.management.ManagementPermission", |
73f45d04ad7a
8054888: Runtime: Add Diagnostic Command that prints the class hierarchy
cjplummer
parents:
26807
diff
changeset
|
421 |
"monitor", NULL}; |
73f45d04ad7a
8054888: Runtime: Add Diagnostic Command that prints the class hierarchy
cjplummer
parents:
26807
diff
changeset
|
422 |
return p; |
73f45d04ad7a
8054888: Runtime: Add Diagnostic Command that prints the class hierarchy
cjplummer
parents:
26807
diff
changeset
|
423 |
} |
73f45d04ad7a
8054888: Runtime: Add Diagnostic Command that prints the class hierarchy
cjplummer
parents:
26807
diff
changeset
|
424 |
static int num_arguments(); |
73f45d04ad7a
8054888: Runtime: Add Diagnostic Command that prints the class hierarchy
cjplummer
parents:
26807
diff
changeset
|
425 |
virtual void execute(DCmdSource source, TRAPS); |
73f45d04ad7a
8054888: Runtime: Add Diagnostic Command that prints the class hierarchy
cjplummer
parents:
26807
diff
changeset
|
426 |
}; |
73f45d04ad7a
8054888: Runtime: Add Diagnostic Command that prints the class hierarchy
cjplummer
parents:
26807
diff
changeset
|
427 |
|
31790 | 428 |
class TouchedMethodsDCmd : public DCmdWithParser { |
429 |
public: |
|
430 |
TouchedMethodsDCmd(outputStream* output, bool heap); |
|
431 |
static const char* name() { |
|
432 |
return "VM.print_touched_methods"; |
|
433 |
} |
|
434 |
static const char* description() { |
|
435 |
return "Print all methods that have ever been touched during the lifetime of this JVM."; |
|
436 |
} |
|
437 |
static const char* impact() { |
|
438 |
return "Medium: Depends on Java content."; |
|
439 |
} |
|
440 |
static int num_arguments(); |
|
441 |
virtual void execute(DCmdSource source, TRAPS); |
|
442 |
}; |
|
443 |
||
11441 | 444 |
// See also: thread_dump in attachListener.cpp |
445 |
class ThreadDumpDCmd : public DCmdWithParser { |
|
446 |
protected: |
|
447 |
DCmdArgument<bool> _locks; |
|
50785
d1b24f2ceca5
8200720: Print additional information in thread dump (times, allocated bytes etc.)
ghaug
parents:
49980
diff
changeset
|
448 |
DCmdArgument<bool> _extended; |
11441 | 449 |
public: |
450 |
ThreadDumpDCmd(outputStream* output, bool heap); |
|
451 |
static const char* name() { return "Thread.print"; } |
|
452 |
static const char* description() { |
|
453 |
return "Print all threads with stacktraces."; |
|
454 |
} |
|
455 |
static const char* impact() { |
|
456 |
return "Medium: Depends on the number of threads."; |
|
457 |
} |
|
17296
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
458 |
static const JavaPermission permission() { |
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
459 |
JavaPermission p = {"java.lang.management.ManagementPermission", |
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
460 |
"monitor", NULL}; |
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
461 |
return p; |
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
462 |
} |
11441 | 463 |
static int num_arguments(); |
17296
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
464 |
virtual void execute(DCmdSource source, TRAPS); |
11209 | 465 |
}; |
466 |
||
11953
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
467 |
// Enhanced JMX Agent support |
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
468 |
|
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
469 |
class JMXStartRemoteDCmd : public DCmdWithParser { |
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
470 |
|
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
471 |
// 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
|
472 |
// passed to Agent.startRemoteManagementAgent() |
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
473 |
// com.sun.management is omitted |
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
474 |
|
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
475 |
DCmdArgument<char *> _config_file; |
35186
89076d5121c0
6425769: Allow specifying an address to bind JMX remote connector
sgehwolf
parents:
35061
diff
changeset
|
476 |
DCmdArgument<char *> _jmxremote_host; |
11953
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
477 |
DCmdArgument<char *> _jmxremote_port; |
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
478 |
DCmdArgument<char *> _jmxremote_rmi_port; |
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
479 |
DCmdArgument<char *> _jmxremote_ssl; |
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
480 |
DCmdArgument<char *> _jmxremote_registry_ssl; |
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
481 |
DCmdArgument<char *> _jmxremote_authenticate; |
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
482 |
DCmdArgument<char *> _jmxremote_password_file; |
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
483 |
DCmdArgument<char *> _jmxremote_access_file; |
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
484 |
DCmdArgument<char *> _jmxremote_login_config; |
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
485 |
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
|
486 |
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
|
487 |
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
|
488 |
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
|
489 |
|
15460
ac08a4bdd0f6
8002048: Protocol to discovery of manageable Java processes on a network
dsamersoff
parents:
15437
diff
changeset
|
490 |
// JDP support |
ac08a4bdd0f6
8002048: Protocol to discovery of manageable Java processes on a network
dsamersoff
parents:
15437
diff
changeset
|
491 |
// 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
|
492 |
// as property value to java level. |
ac08a4bdd0f6
8002048: Protocol to discovery of manageable Java processes on a network
dsamersoff
parents:
15437
diff
changeset
|
493 |
DCmdArgument<char *> _jmxremote_autodiscovery; |
ac08a4bdd0f6
8002048: Protocol to discovery of manageable Java processes on a network
dsamersoff
parents:
15437
diff
changeset
|
494 |
DCmdArgument<jlong> _jdp_port; |
ac08a4bdd0f6
8002048: Protocol to discovery of manageable Java processes on a network
dsamersoff
parents:
15437
diff
changeset
|
495 |
DCmdArgument<char *> _jdp_address; |
ac08a4bdd0f6
8002048: Protocol to discovery of manageable Java processes on a network
dsamersoff
parents:
15437
diff
changeset
|
496 |
DCmdArgument<char *> _jdp_source_addr; |
ac08a4bdd0f6
8002048: Protocol to discovery of manageable Java processes on a network
dsamersoff
parents:
15437
diff
changeset
|
497 |
DCmdArgument<jlong> _jdp_ttl; |
ac08a4bdd0f6
8002048: Protocol to discovery of manageable Java processes on a network
dsamersoff
parents:
15437
diff
changeset
|
498 |
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
|
499 |
DCmdArgument<char *> _jdp_name; |
15460
ac08a4bdd0f6
8002048: Protocol to discovery of manageable Java processes on a network
dsamersoff
parents:
15437
diff
changeset
|
500 |
|
11953
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
501 |
public: |
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
502 |
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
|
503 |
|
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
504 |
static const char *name() { |
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
505 |
return "ManagementAgent.start"; |
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
506 |
} |
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 |
static const char *description() { |
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
509 |
return "Start remote management agent."; |
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
510 |
} |
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
511 |
|
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
512 |
static int num_arguments(); |
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
513 |
|
17296
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
514 |
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
|
515 |
|
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 |
|
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
518 |
class JMXStartLocalDCmd : public 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 |
// 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
|
521 |
// 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
|
522 |
|
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 |
public: |
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
525 |
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
|
526 |
|
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
527 |
static const char *name() { |
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
528 |
return "ManagementAgent.start_local"; |
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
529 |
} |
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 |
static const char *description() { |
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
532 |
return "Start local management agent."; |
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 |
|
17296
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
535 |
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
|
536 |
|
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
537 |
}; |
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
538 |
|
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
539 |
class JMXStopRemoteDCmd : public DCmd { |
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
540 |
public: |
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
541 |
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
|
542 |
DCmd(output, heap_allocated) { |
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
543 |
// Do Nothing |
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
544 |
} |
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 |
static const char *name() { |
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
547 |
return "ManagementAgent.stop"; |
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
548 |
} |
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 |
static const char *description() { |
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
551 |
return "Stop remote management agent."; |
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 |
|
17296
68557efd8583
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
15484
diff
changeset
|
554 |
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
|
555 |
}; |
d06edd28ba62
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
11598
diff
changeset
|
556 |
|
30134
ecd7b08105e9
8023093: Add ManagementAgent.status diagnostic command
jbachorik
parents:
30121
diff
changeset
|
557 |
// Print the JMX system status |
ecd7b08105e9
8023093: Add ManagementAgent.status diagnostic command
jbachorik
parents:
30121
diff
changeset
|
558 |
class JMXStatusDCmd : public DCmd { |
ecd7b08105e9
8023093: Add ManagementAgent.status diagnostic command
jbachorik
parents:
30121
diff
changeset
|
559 |
public: |
ecd7b08105e9
8023093: Add ManagementAgent.status diagnostic command
jbachorik
parents:
30121
diff
changeset
|
560 |
JMXStatusDCmd(outputStream *output, bool heap_allocated); |
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 |
static const char *name() { |
ecd7b08105e9
8023093: Add ManagementAgent.status diagnostic command
jbachorik
parents:
30121
diff
changeset
|
563 |
return "ManagementAgent.status"; |
ecd7b08105e9
8023093: Add ManagementAgent.status diagnostic command
jbachorik
parents:
30121
diff
changeset
|
564 |
} |
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 |
static const char *description() { |
ecd7b08105e9
8023093: Add ManagementAgent.status diagnostic command
jbachorik
parents:
30121
diff
changeset
|
567 |
return "Print the management agent status."; |
ecd7b08105e9
8023093: Add ManagementAgent.status diagnostic command
jbachorik
parents:
30121
diff
changeset
|
568 |
} |
ecd7b08105e9
8023093: Add ManagementAgent.status diagnostic command
jbachorik
parents:
30121
diff
changeset
|
569 |
|
ecd7b08105e9
8023093: Add ManagementAgent.status diagnostic command
jbachorik
parents:
30121
diff
changeset
|
570 |
static const JavaPermission permission() { |
ecd7b08105e9
8023093: Add ManagementAgent.status diagnostic command
jbachorik
parents:
30121
diff
changeset
|
571 |
JavaPermission p = {"java.lang.management.ManagementPermission", |
ecd7b08105e9
8023093: Add ManagementAgent.status diagnostic command
jbachorik
parents:
30121
diff
changeset
|
572 |
"monitor", NULL}; |
ecd7b08105e9
8023093: Add ManagementAgent.status diagnostic command
jbachorik
parents:
30121
diff
changeset
|
573 |
return p; |
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 |
virtual void execute(DCmdSource source, TRAPS); |
ecd7b08105e9
8023093: Add ManagementAgent.status diagnostic command
jbachorik
parents:
30121
diff
changeset
|
577 |
|
ecd7b08105e9
8023093: Add ManagementAgent.status diagnostic command
jbachorik
parents:
30121
diff
changeset
|
578 |
}; |
ecd7b08105e9
8023093: Add ManagementAgent.status diagnostic command
jbachorik
parents:
30121
diff
changeset
|
579 |
|
26587 | 580 |
class CompileQueueDCmd : public DCmd { |
581 |
public: |
|
582 |
CompileQueueDCmd(outputStream* output, bool heap) : DCmd(output, heap) {} |
|
583 |
static const char* name() { |
|
584 |
return "Compiler.queue"; |
|
585 |
} |
|
586 |
static const char* description() { |
|
587 |
return "Print methods queued for compilation."; |
|
588 |
} |
|
589 |
static const char* impact() { |
|
590 |
return "Low"; |
|
591 |
} |
|
592 |
static const JavaPermission permission() { |
|
593 |
JavaPermission p = {"java.lang.management.ManagementPermission", |
|
594 |
"monitor", NULL}; |
|
595 |
return p; |
|
596 |
} |
|
597 |
static int num_arguments() { return 0; } |
|
598 |
virtual void execute(DCmdSource source, TRAPS); |
|
599 |
}; |
|
600 |
||
601 |
class CodeListDCmd : public DCmd { |
|
602 |
public: |
|
603 |
CodeListDCmd(outputStream* output, bool heap) : DCmd(output, heap) {} |
|
604 |
static const char* name() { |
|
605 |
return "Compiler.codelist"; |
|
606 |
} |
|
607 |
static const char* description() { |
|
26807
843ea33eb963
8058461: serviceability/dcmd/CodelistTest.java and serviceability/dcmd/CompilerQueueTest.java SIGSEGV
neliasso
parents:
26587
diff
changeset
|
608 |
return "Print all compiled methods in code cache that are alive"; |
26587 | 609 |
} |
610 |
static const char* impact() { |
|
611 |
return "Medium"; |
|
612 |
} |
|
613 |
static const JavaPermission permission() { |
|
614 |
JavaPermission p = {"java.lang.management.ManagementPermission", |
|
615 |
"monitor", NULL}; |
|
616 |
return p; |
|
617 |
} |
|
618 |
static int num_arguments() { return 0; } |
|
619 |
virtual void execute(DCmdSource source, TRAPS); |
|
620 |
}; |
|
621 |
||
622 |
||
623 |
class CodeCacheDCmd : public DCmd { |
|
624 |
public: |
|
625 |
CodeCacheDCmd(outputStream* output, bool heap) : DCmd(output, heap) {} |
|
626 |
static const char* name() { |
|
627 |
return "Compiler.codecache"; |
|
628 |
} |
|
629 |
static const char* description() { |
|
630 |
return "Print code cache layout and bounds."; |
|
631 |
} |
|
632 |
static const char* impact() { |
|
633 |
return "Low"; |
|
634 |
} |
|
635 |
static const JavaPermission permission() { |
|
636 |
JavaPermission p = {"java.lang.management.ManagementPermission", |
|
637 |
"monitor", NULL}; |
|
638 |
return p; |
|
639 |
} |
|
640 |
static int num_arguments() { return 0; } |
|
641 |
virtual void execute(DCmdSource source, TRAPS); |
|
642 |
}; |
|
643 |
||
49611 | 644 |
//---< BEGIN >--- CodeHeap State Analytics. |
645 |
class CodeHeapAnalyticsDCmd : public DCmdWithParser { |
|
646 |
protected: |
|
647 |
DCmdArgument<char*> _function; |
|
55294
3493c1bc59fd
8225388: Running jcmd Compiler.CodeHeap_Analytics all 0 cause crash.
lmesnik
parents:
55217
diff
changeset
|
648 |
DCmdArgument<jlong> _granularity; |
49611 | 649 |
public: |
650 |
CodeHeapAnalyticsDCmd(outputStream* output, bool heap); |
|
651 |
static const char* name() { |
|
652 |
return "Compiler.CodeHeap_Analytics"; |
|
653 |
} |
|
654 |
static const char* description() { |
|
655 |
return "Print CodeHeap analytics"; |
|
656 |
} |
|
657 |
static const char* impact() { |
|
658 |
return "Low: Depends on code heap size and content. " |
|
659 |
"Holds CodeCache_lock during analysis step, usually sub-second duration."; |
|
660 |
} |
|
661 |
static const JavaPermission permission() { |
|
662 |
JavaPermission p = {"java.lang.management.ManagementPermission", |
|
663 |
"monitor", NULL}; |
|
664 |
return p; |
|
665 |
} |
|
666 |
static int num_arguments(); |
|
667 |
virtual void execute(DCmdSource source, TRAPS); |
|
668 |
}; |
|
669 |
//---< END >--- CodeHeap State Analytics. |
|
670 |
||
33451
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
671 |
class CompilerDirectivesPrintDCmd : public DCmd { |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
672 |
public: |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
673 |
CompilerDirectivesPrintDCmd(outputStream* output, bool heap) : DCmd(output, heap) {} |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
674 |
static const char* name() { |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
675 |
return "Compiler.directives_print"; |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
676 |
} |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
677 |
static const char* description() { |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
678 |
return "Print all active compiler directives."; |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
679 |
} |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
680 |
static const char* impact() { |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
681 |
return "Low"; |
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 |
static const JavaPermission permission() { |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
684 |
JavaPermission p = {"java.lang.management.ManagementPermission", |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
685 |
"monitor", NULL}; |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
686 |
return p; |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
687 |
} |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
688 |
static int num_arguments() { return 0; } |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
689 |
virtual void execute(DCmdSource source, TRAPS); |
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 |
|
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
692 |
class CompilerDirectivesRemoveDCmd : public DCmd { |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
693 |
public: |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
694 |
CompilerDirectivesRemoveDCmd(outputStream* output, bool heap) : DCmd(output, heap) {} |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
695 |
static const char* name() { |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
696 |
return "Compiler.directives_remove"; |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
697 |
} |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
698 |
static const char* description() { |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
699 |
return "Remove latest added compiler directive."; |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
700 |
} |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
701 |
static const char* impact() { |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
702 |
return "Low"; |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
703 |
} |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
704 |
static const JavaPermission permission() { |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
705 |
JavaPermission p = {"java.lang.management.ManagementPermission", |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
706 |
"monitor", NULL}; |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
707 |
return p; |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
708 |
} |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
709 |
static int num_arguments() { return 0; } |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
710 |
virtual void execute(DCmdSource source, TRAPS); |
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 |
|
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
713 |
class CompilerDirectivesAddDCmd : public DCmdWithParser { |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
714 |
protected: |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
715 |
DCmdArgument<char*> _filename; |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
716 |
public: |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
717 |
CompilerDirectivesAddDCmd(outputStream* output, bool heap); |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
718 |
static const char* name() { |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
719 |
return "Compiler.directives_add"; |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
720 |
} |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
721 |
static const char* description() { |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
722 |
return "Add compiler directives from file."; |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
723 |
} |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
724 |
static const char* impact() { |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
725 |
return "Low"; |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
726 |
} |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
727 |
static const JavaPermission permission() { |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
728 |
JavaPermission p = {"java.lang.management.ManagementPermission", |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
729 |
"monitor", NULL}; |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
730 |
return p; |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
731 |
} |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
732 |
static int num_arguments(); |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
733 |
virtual void execute(DCmdSource source, TRAPS); |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
734 |
}; |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
735 |
|
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
736 |
class CompilerDirectivesClearDCmd : public DCmd { |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
737 |
public: |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
738 |
CompilerDirectivesClearDCmd(outputStream* output, bool heap) : DCmd(output, heap) {} |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
739 |
static const char* name() { |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
740 |
return "Compiler.directives_clear"; |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
741 |
} |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
742 |
static const char* description() { |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
743 |
return "Remove all compiler directives."; |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
744 |
} |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
745 |
static const char* impact() { |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
746 |
return "Low"; |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
747 |
} |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
748 |
static const JavaPermission permission() { |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
749 |
JavaPermission p = {"java.lang.management.ManagementPermission", |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
750 |
"monitor", NULL}; |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
751 |
return p; |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
752 |
} |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
753 |
static int num_arguments() { return 0; } |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
754 |
virtual void execute(DCmdSource source, TRAPS); |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
755 |
}; |
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32072
diff
changeset
|
756 |
|
46742 | 757 |
/////////////////////////////////////////////////////////////////////// |
758 |
// |
|
759 |
// jcmd command support for symbol table, string table and system dictionary dumping: |
|
760 |
// VM.symboltable -verbose: for dumping the symbol table |
|
761 |
// VM.stringtable -verbose: for dumping the string table |
|
762 |
// VM.systemdictionary -verbose: for dumping the system dictionary table |
|
763 |
// |
|
764 |
class VM_DumpHashtable : public VM_Operation { |
|
765 |
private: |
|
766 |
outputStream* _out; |
|
767 |
int _which; |
|
768 |
bool _verbose; |
|
769 |
public: |
|
770 |
enum { |
|
771 |
DumpSymbols = 1 << 0, |
|
772 |
DumpStrings = 1 << 1, |
|
773 |
DumpSysDict = 1 << 2 // not implemented yet |
|
774 |
}; |
|
775 |
VM_DumpHashtable(outputStream* out, int which, bool verbose) { |
|
776 |
_out = out; |
|
777 |
_which = which; |
|
778 |
_verbose = verbose; |
|
779 |
} |
|
780 |
||
781 |
virtual VMOp_Type type() const { return VMOp_DumpHashtable; } |
|
782 |
||
783 |
virtual void doit() { |
|
784 |
switch (_which) { |
|
785 |
case DumpSymbols: |
|
786 |
SymbolTable::dump(_out, _verbose); |
|
787 |
break; |
|
788 |
case DumpStrings: |
|
789 |
StringTable::dump(_out, _verbose); |
|
790 |
break; |
|
791 |
case DumpSysDict: |
|
792 |
SystemDictionary::dump(_out, _verbose); |
|
793 |
break; |
|
794 |
default: |
|
795 |
ShouldNotReachHere(); |
|
796 |
} |
|
797 |
} |
|
798 |
}; |
|
799 |
||
800 |
class SymboltableDCmd : public DCmdWithParser { |
|
801 |
protected: |
|
802 |
DCmdArgument<bool> _verbose; |
|
803 |
public: |
|
804 |
SymboltableDCmd(outputStream* output, bool heap); |
|
805 |
static const char* name() { |
|
806 |
return "VM.symboltable"; |
|
807 |
} |
|
808 |
static const char* description() { |
|
809 |
return "Dump symbol table."; |
|
810 |
} |
|
811 |
static const char* impact() { |
|
812 |
return "Medium: Depends on Java content."; |
|
813 |
} |
|
814 |
static const JavaPermission permission() { |
|
815 |
JavaPermission p = {"java.lang.management.ManagementPermission", |
|
816 |
"monitor", NULL}; |
|
817 |
return p; |
|
818 |
} |
|
819 |
static int num_arguments(); |
|
820 |
virtual void execute(DCmdSource source, TRAPS); |
|
821 |
}; |
|
822 |
||
823 |
class StringtableDCmd : public DCmdWithParser { |
|
824 |
protected: |
|
825 |
DCmdArgument<bool> _verbose; |
|
826 |
public: |
|
827 |
StringtableDCmd(outputStream* output, bool heap); |
|
828 |
static const char* name() { |
|
829 |
return "VM.stringtable"; |
|
830 |
} |
|
831 |
static const char* description() { |
|
832 |
return "Dump string table."; |
|
833 |
} |
|
834 |
static const char* impact() { |
|
835 |
return "Medium: Depends on Java content."; |
|
836 |
} |
|
837 |
static const JavaPermission permission() { |
|
838 |
JavaPermission p = {"java.lang.management.ManagementPermission", |
|
839 |
"monitor", NULL}; |
|
840 |
return p; |
|
841 |
} |
|
842 |
static int num_arguments(); |
|
843 |
virtual void execute(DCmdSource source, TRAPS); |
|
844 |
}; |
|
845 |
||
846 |
class SystemDictionaryDCmd : public DCmdWithParser { |
|
847 |
protected: |
|
848 |
DCmdArgument<bool> _verbose; |
|
849 |
public: |
|
850 |
SystemDictionaryDCmd(outputStream* output, bool heap); |
|
851 |
static const char* name() { |
|
852 |
return "VM.systemdictionary"; |
|
853 |
} |
|
854 |
static const char* description() { |
|
855 |
return "Prints the statistics for dictionary hashtable sizes and bucket length"; |
|
856 |
} |
|
857 |
static const char* impact() { |
|
858 |
return "Medium: Depends on Java content."; |
|
859 |
} |
|
860 |
static const JavaPermission permission() { |
|
861 |
JavaPermission p = {"java.lang.management.ManagementPermission", |
|
862 |
"monitor", NULL}; |
|
863 |
return p; |
|
864 |
} |
|
865 |
static int num_arguments(); |
|
866 |
virtual void execute(DCmdSource source, TRAPS); |
|
867 |
}; |
|
868 |
||
52976 | 869 |
#if INCLUDE_JVMTI |
870 |
class DebugOnCmdStartDCmd : public DCmdWithParser { |
|
871 |
public: |
|
872 |
DebugOnCmdStartDCmd(outputStream* output, bool heap); |
|
873 |
static const char* name() { |
|
874 |
return "VM.start_java_debugging"; |
|
875 |
} |
|
876 |
static const char* description() { |
|
877 |
return "Starts up the Java debugging if the jdwp agentlib was enabled with the option onjcmd=y."; |
|
878 |
} |
|
879 |
static const char* impact() { |
|
880 |
return "High: Switches the VM into Java debug mode."; |
|
881 |
} |
|
882 |
static const JavaPermission permission() { |
|
55560
cb0131439e9d
8224673: Adjust permission for delayed starting of debugging
rschmelter
parents:
55294
diff
changeset
|
883 |
JavaPermission p = { "java.lang.management.ManagementPermission", "control", NULL }; |
52976 | 884 |
return p; |
885 |
} |
|
886 |
static int num_arguments() { return 0; } |
|
887 |
virtual void execute(DCmdSource source, TRAPS); |
|
888 |
}; |
|
889 |
#endif // INCLUDE_JVMTI |
|
890 |
||
55217 | 891 |
class EventLogDCmd : public DCmdWithParser { |
892 |
protected: |
|
893 |
DCmdArgument<char*> _log; |
|
894 |
DCmdArgument<char*> _max; |
|
895 |
public: |
|
896 |
EventLogDCmd(outputStream* output, bool heap); |
|
897 |
static const char* name() { |
|
898 |
return "VM.events"; |
|
899 |
} |
|
900 |
static const char* description() { |
|
901 |
return "Print VM event logs"; |
|
902 |
} |
|
903 |
static const char* impact() { |
|
904 |
return "Low: Depends on event log size. "; |
|
905 |
} |
|
906 |
static const JavaPermission permission() { |
|
907 |
JavaPermission p = {"java.lang.management.ManagementPermission", |
|
908 |
"monitor", NULL}; |
|
909 |
return p; |
|
910 |
} |
|
911 |
static int num_arguments(); |
|
912 |
virtual void execute(DCmdSource source, TRAPS); |
|
913 |
}; |
|
914 |
||
53244
9807daeb47c4
8216167: Update include guards to reflect correct directories
coleenp
parents:
53079
diff
changeset
|
915 |
#endif // SHARE_SERVICES_DIAGNOSTICCOMMAND_HPP |