src/share/vm/services/diagnosticCommand.hpp

Print this page




 255   DCmdArgument<bool> _all;
 256   DCmdArgument<bool> _csv;
 257   DCmdArgument<bool> _help;
 258   DCmdArgument<char*> _columns;
 259 public:
 260   ClassStatsDCmd(outputStream* output, bool heap);
 261   static const char* name() {
 262     return "GC.class_stats";
 263   }
 264   static const char* description() {
 265     return "Provide statistics about Java class meta data. Requires -XX:+UnlockDiagnosticVMOptions.";
 266   }
 267   static const char* impact() {
 268     return "High: Depends on Java heap size and content.";
 269   }
 270   static int num_arguments();
 271   virtual void execute(DCmdSource source, TRAPS);
 272 };
 273 
 274 
 275 class ClassHierarchyDCmd : public DCmd {




 276 public:
 277   ClassHierarchyDCmd(outputStream* output, bool heap) : DCmd(output, heap) { }
 278   static const char* name() {
 279     return "VM.class_hierarchy";
 280   }
 281   static const char* description() {
 282     return "Print a list of all loaded classes, indented to show the class hiearchy.";


 283   }
 284   static const char* impact() {
 285       return "Medium: Depends on number of loaded classes.";
 286   }

 287   virtual void execute(DCmdSource source, TRAPS);
 288 };
 289 
 290 // See also: thread_dump in attachListener.cpp
 291 class ThreadDumpDCmd : public DCmdWithParser {
 292 protected:
 293   DCmdArgument<bool> _locks;
 294 public:
 295   ThreadDumpDCmd(outputStream* output, bool heap);
 296   static const char* name() { return "Thread.print"; }
 297   static const char* description() {
 298     return "Print all threads with stacktraces.";
 299   }
 300   static const char* impact() {
 301     return "Medium: Depends on the number of threads.";
 302   }
 303   static const JavaPermission permission() {
 304     JavaPermission p = {"java.lang.management.ManagementPermission",
 305                         "monitor", NULL};
 306     return p;




 255   DCmdArgument<bool> _all;
 256   DCmdArgument<bool> _csv;
 257   DCmdArgument<bool> _help;
 258   DCmdArgument<char*> _columns;
 259 public:
 260   ClassStatsDCmd(outputStream* output, bool heap);
 261   static const char* name() {
 262     return "GC.class_stats";
 263   }
 264   static const char* description() {
 265     return "Provide statistics about Java class meta data. Requires -XX:+UnlockDiagnosticVMOptions.";
 266   }
 267   static const char* impact() {
 268     return "High: Depends on Java heap size and content.";
 269   }
 270   static int num_arguments();
 271   virtual void execute(DCmdSource source, TRAPS);
 272 };
 273 
 274 
 275 class ClassHierarchyDCmd : public DCmdWithParser {
 276 protected:
 277   DCmdArgument<bool> _print_interfaces; // true if inherited interfaces should be printed.
 278   DCmdArgument<bool> _print_subclasses; // true subclasses of specified classname should be printed.
 279   DCmdArgument<char*> _classname; // Optional single class name whose hierarchy should be printed.
 280 public:
 281   ClassHierarchyDCmd(outputStream* output, bool heap);
 282   static const char* name() {
 283     return "VM.class_hierarchy";
 284   }
 285   static const char* description() {
 286     return "Print a list of all loaded classes, indented to show the class hiearchy. "
 287            "The name of each class is followed by the Klass* of its ClassLoader, "
 288            "or \"null\" if loaded by the bootstrap class loader.";
 289   }
 290   static const char* impact() {
 291       return "Medium: Depends on number of loaded classes.";
 292   }
 293   static int num_arguments();
 294   virtual void execute(DCmdSource source, TRAPS);
 295 };
 296 
 297 // See also: thread_dump in attachListener.cpp
 298 class ThreadDumpDCmd : public DCmdWithParser {
 299 protected:
 300   DCmdArgument<bool> _locks;
 301 public:
 302   ThreadDumpDCmd(outputStream* output, bool heap);
 303   static const char* name() { return "Thread.print"; }
 304   static const char* description() {
 305     return "Print all threads with stacktraces.";
 306   }
 307   static const char* impact() {
 308     return "Medium: Depends on the number of threads.";
 309   }
 310   static const JavaPermission permission() {
 311     JavaPermission p = {"java.lang.management.ManagementPermission",
 312                         "monitor", NULL};
 313     return p;