< prev index next >

src/hotspot/share/services/diagnosticCommand.hpp

Print this page
@@ -900,6 +900,32 @@
      return p;
    }
    virtual void execute(DCmdSource source, TRAPS);
  };
  
+ class JavaThreadDumpDCmd : public DCmdWithParser {
+ private:
+   void dumpToFile(Symbol* name, Symbol* signature, const char* path, bool overwrite, TRAPS);
+ protected:
+   DCmdArgument<bool> _overwrite;
+   DCmdArgument<char*> _format;
+   DCmdArgument<char*> _filepath;
+ public:
+   JavaThreadDumpDCmd(outputStream *output, bool heap);
+   static const char *name() {
+     return "JavaThread.dump";
+   }
+   static const char *description() {
+     return "Java thread dump in plain text or JSON format.";
+   }
+   static const char* impact() {
+     return "Medium: Depends on the number of threads.";
+   }
+   static const JavaPermission permission() {
+     JavaPermission p = {"java.lang.management.ManagementPermission", "monitor", NULL};
+     return p;
+   }
+   static int num_arguments();
+   virtual void execute(DCmdSource source, TRAPS);
+ };
+ 
  #endif // SHARE_SERVICES_DIAGNOSTICCOMMAND_HPP
< prev index next >