768 protected:
769 DCmdArgument<char*> _log;
770 DCmdArgument<jlong> _max;
771 public:
772 static int num_arguments() { return 2; }
773 EventLogDCmd(outputStream* output, bool heap);
774 static const char* name() {
775 return "VM.events";
776 }
777 static const char* description() {
778 return "Print VM event logs";
779 }
780 static const char* impact() {
781 return "Low: Depends on event log size. ";
782 }
783 virtual void execute(DCmdSource source, TRAPS);
784 };
785
786 class ThreadDumpToFileDCmd : public DCmdWithParser {
787 private:
788 void dumpToFile(Symbol* name, Symbol* signature, const char* path, bool overwrite, TRAPS);
789 protected:
790 DCmdArgument<bool> _overwrite;
791 DCmdArgument<char*> _format;
792 DCmdArgument<char*> _filepath;
793 public:
794 static int num_arguments() { return 3; }
795 ThreadDumpToFileDCmd(outputStream *output, bool heap);
796 static const char *name() {
797 return "Thread.dump_to_file";
798 }
799 static const char *description() {
800 return "Dump all threads, with stack traces, "
801 "to a file in plain text or JSON format.";
802 }
803 static const char* impact() {
804 return "Medium: Depends on the number of threads.";
805 }
806 virtual void execute(DCmdSource source, TRAPS);
807 };
808
809 class VThreadSchedulerDCmd : public DCmd {
810 public:
811 VThreadSchedulerDCmd(outputStream* output, bool heap) : DCmd(output, heap) { }
812 static const char* name() {
813 return "Thread.vthread_scheduler";
814 }
|
768 protected:
769 DCmdArgument<char*> _log;
770 DCmdArgument<jlong> _max;
771 public:
772 static int num_arguments() { return 2; }
773 EventLogDCmd(outputStream* output, bool heap);
774 static const char* name() {
775 return "VM.events";
776 }
777 static const char* description() {
778 return "Print VM event logs";
779 }
780 static const char* impact() {
781 return "Low: Depends on event log size. ";
782 }
783 virtual void execute(DCmdSource source, TRAPS);
784 };
785
786 class ThreadDumpToFileDCmd : public DCmdWithParser {
787 private:
788 void dumpToFile(Symbol* name, Symbol* signature, const char* path, bool overwrite, bool no_prettyprint, TRAPS);
789 protected:
790 DCmdArgument<char*> _format;
791 DCmdArgument<bool> _no_prettyprint;
792 DCmdArgument<char*> _filepath;
793 DCmdArgument<bool> _overwrite;
794 public:
795 static int num_arguments() { return 4; }
796 ThreadDumpToFileDCmd(outputStream *output, bool heap);
797 static const char *name() {
798 return "Thread.dump_to_file";
799 }
800 static const char *description() {
801 return "Dump all threads, with stack traces, "
802 "to a file in plain text or JSON format.";
803 }
804 static const char* impact() {
805 return "Medium: Depends on the number of threads.";
806 }
807 virtual void execute(DCmdSource source, TRAPS);
808 };
809
810 class VThreadSchedulerDCmd : public DCmd {
811 public:
812 VThreadSchedulerDCmd(outputStream* output, bool heap) : DCmd(output, heap) { }
813 static const char* name() {
814 return "Thread.vthread_scheduler";
815 }
|