hotspot/src/share/vm/services/diagnosticCommand.hpp
changeset 29071 73f45d04ad7a
parent 26807 843ea33eb963
child 30121 cc43664a0ad7
equal deleted inserted replaced
29069:938c1c97ad3b 29071:73f45d04ad7a
     1 /*
     1 /*
     2  * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2011, 2015, 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.
   269   }
   269   }
   270   static int num_arguments();
   270   static int num_arguments();
   271   virtual void execute(DCmdSource source, TRAPS);
   271   virtual void execute(DCmdSource source, TRAPS);
   272 };
   272 };
   273 
   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 if subclasses of the 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 ClassLoaderData* 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 const JavaPermission permission() {
       
   294     JavaPermission p = {"java.lang.management.ManagementPermission",
       
   295                         "monitor", NULL};
       
   296     return p;
       
   297   }
       
   298   static int num_arguments();
       
   299   virtual void execute(DCmdSource source, TRAPS);
       
   300 };
       
   301 
   274 // See also: thread_dump in attachListener.cpp
   302 // See also: thread_dump in attachListener.cpp
   275 class ThreadDumpDCmd : public DCmdWithParser {
   303 class ThreadDumpDCmd : public DCmdWithParser {
   276 protected:
   304 protected:
   277   DCmdArgument<bool> _locks;
   305   DCmdArgument<bool> _locks;
   278 public:
   306 public: