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