788 protected:
789 DCmdArgument<char*> _log;
790 DCmdArgument<jlong> _max;
791 public:
792 static int num_arguments() { return 2; }
793 EventLogDCmd(outputStream* output, bool heap);
794 static const char* name() {
795 return "VM.events";
796 }
797 static const char* description() {
798 return "Print VM event logs";
799 }
800 static const char* impact() {
801 return "Low: Depends on event log size. ";
802 }
803 virtual void execute(DCmdSource source, TRAPS);
804 };
805
806 class ThreadDumpToFileDCmd : public DCmdWithParser {
807 private:
808 void dumpToFile(Symbol* name, Symbol* signature, const char* path, bool overwrite, TRAPS);
809 protected:
810 DCmdArgument<bool> _overwrite;
811 DCmdArgument<char*> _format;
812 DCmdArgument<char*> _filepath;
813 public:
814 static int num_arguments() { return 3; }
815 ThreadDumpToFileDCmd(outputStream *output, bool heap);
816 static const char *name() {
817 return "Thread.dump_to_file";
818 }
819 static const char *description() {
820 return "Dump all threads, with stack traces, "
821 "to a file in plain text or JSON format.";
822 }
823 static const char* impact() {
824 return "Medium: Depends on the number of threads.";
825 }
826 virtual void execute(DCmdSource source, TRAPS);
827 };
828
829 class VThreadSchedulerDCmd : public DCmd {
830 public:
831 VThreadSchedulerDCmd(outputStream* output, bool heap) : DCmd(output, heap) { }
832 static const char* name() {
833 return "Thread.vthread_scheduler";
834 }
|
788 protected:
789 DCmdArgument<char*> _log;
790 DCmdArgument<jlong> _max;
791 public:
792 static int num_arguments() { return 2; }
793 EventLogDCmd(outputStream* output, bool heap);
794 static const char* name() {
795 return "VM.events";
796 }
797 static const char* description() {
798 return "Print VM event logs";
799 }
800 static const char* impact() {
801 return "Low: Depends on event log size. ";
802 }
803 virtual void execute(DCmdSource source, TRAPS);
804 };
805
806 class ThreadDumpToFileDCmd : public DCmdWithParser {
807 private:
808 void dumpToFile(Symbol* name, Symbol* signature, const char* path, bool overwrite, bool no_prettyprint, TRAPS);
809 protected:
810 DCmdArgument<char*> _format;
811 DCmdArgument<bool> _no_prettyprint;
812 DCmdArgument<char*> _filepath;
813 DCmdArgument<bool> _overwrite;
814 public:
815 static int num_arguments() { return 4; }
816 ThreadDumpToFileDCmd(outputStream *output, bool heap);
817 static const char *name() {
818 return "Thread.dump_to_file";
819 }
820 static const char *description() {
821 return "Dump all threads, with stack traces, "
822 "to a file in plain text or JSON format.";
823 }
824 static const char* impact() {
825 return "Medium: Depends on the number of threads.";
826 }
827 virtual void execute(DCmdSource source, TRAPS);
828 };
829
830 class VThreadSchedulerDCmd : public DCmd {
831 public:
832 VThreadSchedulerDCmd(outputStream* output, bool heap) : DCmd(output, heap) { }
833 static const char* name() {
834 return "Thread.vthread_scheduler";
835 }
|