src/share/vm/services/diagnosticFramework.hpp
Print this page
rev 3388 : imported patch dcmd-fixes
*** 236,245 ****
--- 236,255 ----
}
static const char* name() { return "No Name";}
static const char* description() { return "No Help";}
static const char* disabled_message() { return "Diagnostic command currently disabled"; }
+ // The impact() method returns a description of the intrusiveness of the diagnostic
+ // command on the Java Virtual Machine behavior. The rational for this method is that some
+ // diagnostic commands can seriously disrupt the behavior of the Java Virtual Machine
+ // (for instance a Thread Dump for an application with several tens of thousands of threads,
+ // or a Head Dump with a 40GB+ heap size) and other diagnostic commands have no serious
+ // impact on the JVM (for instance, getting the command line arguments or the JVM version).
+ // The recommended format for the description is <impact level>: [longer description],
+ // where the impact level is selected among this list: {Low, Medium, High}. The optional
+ // longer description can provide more specific details like the fact that Thread Dump
+ // impact depends on the heap size.
static const char* impact() { return "Low: No impact"; }
static int num_arguments() { return 0; }
outputStream* output() { return _output; }
bool is_heap_allocated() { return _is_heap_allocated; }
virtual void print_help(const char* name) {
*** 248,258 ****
virtual void parse(CmdLine* line, char delim, TRAPS) {
DCmdArgIter iter(line->args_addr(), line->args_len(), delim);
bool has_arg = iter.next(CHECK);
if (has_arg) {
THROW_MSG(vmSymbols::java_lang_IllegalArgumentException(),
! "Unknown argument in diagnostic command");
}
}
virtual void execute(TRAPS) { }
virtual void reset(TRAPS) { }
virtual void cleanup() { }
--- 258,268 ----
virtual void parse(CmdLine* line, char delim, TRAPS) {
DCmdArgIter iter(line->args_addr(), line->args_len(), delim);
bool has_arg = iter.next(CHECK);
if (has_arg) {
THROW_MSG(vmSymbols::java_lang_IllegalArgumentException(),
! "Argument list of diagnostic command should be empty.");
}
}
virtual void execute(TRAPS) { }
virtual void reset(TRAPS) { }
virtual void cleanup() { }