Mercurial > hg > truffle
comparison src/share/vm/services/diagnosticCommand.hpp @ 6275:957c266d8bc5
Merge with http://hg.openjdk.java.net/hsx/hsx24/hotspot/
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Tue, 21 Aug 2012 10:39:19 +0200 |
parents | 5a1f452f8f90 |
children | fb19af007ffc |
comparison
equal
deleted
inserted
replaced
5891:fd8832ae511d | 6275:957c266d8bc5 |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * | 4 * |
5 * This code is free software; you can redistribute it and/or modify it | 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 | 6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
46 static const char* description() { | 46 static const char* description() { |
47 return "For more information about a specific command use 'help <command>'. " | 47 return "For more information about a specific command use 'help <command>'. " |
48 "With no argument this will show a list of available commands. " | 48 "With no argument this will show a list of available commands. " |
49 "'help all' will show help for all commands."; | 49 "'help all' will show help for all commands."; |
50 } | 50 } |
51 static const char* impact() { return "Low: "; } | 51 static const char* impact() { return "Low"; } |
52 static int num_arguments(); | 52 static int num_arguments(); |
53 virtual void execute(TRAPS); | 53 virtual void execute(TRAPS); |
54 }; | 54 }; |
55 | 55 |
56 class VersionDCmd : public DCmd { | 56 class VersionDCmd : public DCmd { |
58 VersionDCmd(outputStream* output, bool heap) : DCmd(output,heap) { } | 58 VersionDCmd(outputStream* output, bool heap) : DCmd(output,heap) { } |
59 static const char* name() { return "VM.version"; } | 59 static const char* name() { return "VM.version"; } |
60 static const char* description() { | 60 static const char* description() { |
61 return "Print JVM version information."; | 61 return "Print JVM version information."; |
62 } | 62 } |
63 static const char* impact() { return "Low: "; } | 63 static const char* impact() { return "Low"; } |
64 static int num_arguments() { return 0; } | 64 static int num_arguments() { return 0; } |
65 virtual void execute(TRAPS); | 65 virtual void execute(TRAPS); |
66 }; | 66 }; |
67 | 67 |
68 class CommandLineDCmd : public DCmd { | 68 class CommandLineDCmd : public DCmd { |
70 CommandLineDCmd(outputStream* output, bool heap) : DCmd(output, heap) { } | 70 CommandLineDCmd(outputStream* output, bool heap) : DCmd(output, heap) { } |
71 static const char* name() { return "VM.command_line"; } | 71 static const char* name() { return "VM.command_line"; } |
72 static const char* description() { | 72 static const char* description() { |
73 return "Print the command line used to start this VM instance."; | 73 return "Print the command line used to start this VM instance."; |
74 } | 74 } |
75 static const char* impact() { return "Low: "; } | 75 static const char* impact() { return "Low"; } |
76 static int num_arguments() { return 0; } | 76 static int num_arguments() { return 0; } |
77 virtual void execute(TRAPS) { | 77 virtual void execute(TRAPS) { |
78 Arguments::print_on(_output); | 78 Arguments::print_on(_output); |
79 } | 79 } |
80 }; | 80 }; |
86 static const char* name() { return "VM.system_properties"; } | 86 static const char* name() { return "VM.system_properties"; } |
87 static const char* description() { | 87 static const char* description() { |
88 return "Print system properties."; | 88 return "Print system properties."; |
89 } | 89 } |
90 static const char* impact() { | 90 static const char* impact() { |
91 return "Low: "; | 91 return "Low"; |
92 } | 92 } |
93 static int num_arguments() { return 0; } | 93 static int num_arguments() { return 0; } |
94 virtual void execute(TRAPS); | 94 virtual void execute(TRAPS); |
95 }; | 95 }; |
96 | 96 |
103 static const char* name() { return "VM.flags"; } | 103 static const char* name() { return "VM.flags"; } |
104 static const char* description() { | 104 static const char* description() { |
105 return "Print VM flag options and their current values."; | 105 return "Print VM flag options and their current values."; |
106 } | 106 } |
107 static const char* impact() { | 107 static const char* impact() { |
108 return "Low: "; | 108 return "Low"; |
109 } | 109 } |
110 static int num_arguments(); | 110 static int num_arguments(); |
111 virtual void execute(TRAPS); | 111 virtual void execute(TRAPS); |
112 }; | 112 }; |
113 | 113 |
119 static const char* name() { return "VM.uptime"; } | 119 static const char* name() { return "VM.uptime"; } |
120 static const char* description() { | 120 static const char* description() { |
121 return "Print VM uptime."; | 121 return "Print VM uptime."; |
122 } | 122 } |
123 static const char* impact() { | 123 static const char* impact() { |
124 return "Low: "; | 124 return "Low"; |
125 } | 125 } |
126 static int num_arguments(); | 126 static int num_arguments(); |
127 virtual void execute(TRAPS); | 127 virtual void execute(TRAPS); |
128 }; | 128 }; |
129 | 129 |
212 } | 212 } |
213 static int num_arguments(); | 213 static int num_arguments(); |
214 virtual void execute(TRAPS); | 214 virtual void execute(TRAPS); |
215 }; | 215 }; |
216 | 216 |
217 // Enhanced JMX Agent support | |
218 | |
219 class JMXStartRemoteDCmd : public DCmdWithParser { | |
220 | |
221 // Explicitly list all properties that could be | |
222 // passed to Agent.startRemoteManagementAgent() | |
223 // com.sun.management is omitted | |
224 | |
225 DCmdArgument<char *> _config_file; | |
226 DCmdArgument<char *> _jmxremote_port; | |
227 DCmdArgument<char *> _jmxremote_rmi_port; | |
228 DCmdArgument<char *> _jmxremote_ssl; | |
229 DCmdArgument<char *> _jmxremote_registry_ssl; | |
230 DCmdArgument<char *> _jmxremote_authenticate; | |
231 DCmdArgument<char *> _jmxremote_password_file; | |
232 DCmdArgument<char *> _jmxremote_access_file; | |
233 DCmdArgument<char *> _jmxremote_login_config; | |
234 DCmdArgument<char *> _jmxremote_ssl_enabled_cipher_suites; | |
235 DCmdArgument<char *> _jmxremote_ssl_enabled_protocols; | |
236 DCmdArgument<char *> _jmxremote_ssl_need_client_auth; | |
237 DCmdArgument<char *> _jmxremote_ssl_config_file; | |
238 | |
239 public: | |
240 JMXStartRemoteDCmd(outputStream *output, bool heap_allocated); | |
241 | |
242 static const char *name() { | |
243 return "ManagementAgent.start"; | |
244 } | |
245 | |
246 static const char *description() { | |
247 return "Start remote management agent."; | |
248 } | |
249 | |
250 static int num_arguments(); | |
251 | |
252 virtual void execute(TRAPS); | |
253 | |
254 }; | |
255 | |
256 class JMXStartLocalDCmd : public DCmd { | |
257 | |
258 // Explicitly request start of local agent, | |
259 // it will not be started by start dcmd | |
260 | |
261 | |
262 public: | |
263 JMXStartLocalDCmd(outputStream *output, bool heap_allocated); | |
264 | |
265 static const char *name() { | |
266 return "ManagementAgent.start_local"; | |
267 } | |
268 | |
269 static const char *description() { | |
270 return "Start local management agent."; | |
271 } | |
272 | |
273 virtual void execute(TRAPS); | |
274 | |
275 }; | |
276 | |
277 class JMXStopRemoteDCmd : public DCmd { | |
278 public: | |
279 JMXStopRemoteDCmd(outputStream *output, bool heap_allocated) : | |
280 DCmd(output, heap_allocated) { | |
281 // Do Nothing | |
282 } | |
283 | |
284 static const char *name() { | |
285 return "ManagementAgent.stop"; | |
286 } | |
287 | |
288 static const char *description() { | |
289 return "Stop remote management agent."; | |
290 } | |
291 | |
292 virtual void execute(TRAPS); | |
293 }; | |
294 | |
217 #endif // SHARE_VM_SERVICES_DIAGNOSTICCOMMAND_HPP | 295 #endif // SHARE_VM_SERVICES_DIAGNOSTICCOMMAND_HPP |