--- old/src/share/vm/services/diagnosticCommand.hpp 2015-02-09 16:32:24.000000000 -0800 +++ new/src/share/vm/services/diagnosticCommand.hpp 2015-02-09 16:32:24.000000000 -0800 @@ -272,18 +272,25 @@ }; -class ClassHierarchyDCmd : public DCmd { +class ClassHierarchyDCmd : public DCmdWithParser { +protected: + DCmdArgument _print_interfaces; // true if inherited interfaces should be printed. + DCmdArgument _print_subclasses; // true subclasses of specified classname should be printed. + DCmdArgument _classname; // Optional single class name whose hierarchy should be printed. public: - ClassHierarchyDCmd(outputStream* output, bool heap) : DCmd(output, heap) { } + ClassHierarchyDCmd(outputStream* output, bool heap); static const char* name() { return "VM.class_hierarchy"; } static const char* description() { - return "Print a list of all loaded classes, indented to show the class hiearchy."; + return "Print a list of all loaded classes, indented to show the class hiearchy. " + "The name of each class is followed by the Klass* of its ClassLoader, " + "or \"null\" if loaded by the bootstrap class loader."; } static const char* impact() { return "Medium: Depends on number of loaded classes."; } + static int num_arguments(); virtual void execute(DCmdSource source, TRAPS); };