414 }
415 static const JavaPermission permission() {
416 JavaPermission p = {"java.lang.management.ManagementPermission",
417 "monitor", nullptr};
418 return p;
419 }
420 virtual void execute(DCmdSource source, TRAPS);
421 };
422 #endif // INCLUDE_CDS
423
424 // See also: thread_dump in attachListener.cpp
425 class ThreadDumpDCmd : public DCmdWithParser {
426 protected:
427 DCmdArgument<bool> _locks;
428 DCmdArgument<bool> _extended;
429 public:
430 static int num_arguments() { return 2; }
431 ThreadDumpDCmd(outputStream* output, bool heap);
432 static const char* name() { return "Thread.print"; }
433 static const char* description() {
434 return "Print all threads with stacktraces.";
435 }
436 static const char* impact() {
437 return "Medium: Depends on the number of threads.";
438 }
439 static const JavaPermission permission() {
440 JavaPermission p = {"java.lang.management.ManagementPermission",
441 "monitor", nullptr};
442 return p;
443 }
444 virtual void execute(DCmdSource source, TRAPS);
445 };
446
447 // Enhanced JMX Agent support
448
449 class JMXStartRemoteDCmd : public DCmdWithParser {
450
451 // Explicitly list all properties that could be
452 // passed to Agent.startRemoteManagementAgent()
453 // com.sun.management is omitted
454
940 DCmdArgument<char*> _filepath;
941 public:
942 static int num_arguments() { return 3; }
943 ThreadDumpToFileDCmd(outputStream *output, bool heap);
944 static const char *name() {
945 return "Thread.dump_to_file";
946 }
947 static const char *description() {
948 return "Dump threads, with stack traces, to a file in plain text or JSON format.";
949 }
950 static const char* impact() {
951 return "Medium: Depends on the number of threads.";
952 }
953 static const JavaPermission permission() {
954 JavaPermission p = {"java.lang.management.ManagementPermission", "monitor", nullptr};
955 return p;
956 }
957 virtual void execute(DCmdSource source, TRAPS);
958 };
959
960 class CompilationMemoryStatisticDCmd: public DCmdWithParser {
961 protected:
962 DCmdArgument<bool> _human_readable;
963 DCmdArgument<MemorySizeArgument> _minsize;
964 public:
965 static int num_arguments() { return 2; }
966 CompilationMemoryStatisticDCmd(outputStream* output, bool heap);
967 static const char* name() {
968 return "Compiler.memory";
969 }
970 static const char* description() {
971 return "Print compilation footprint";
972 }
973 static const char* impact() {
974 return "Medium: Pause time depends on number of compiled methods";
975 }
976 static const JavaPermission permission() {
977 JavaPermission p = {"java.lang.management.ManagementPermission",
978 "monitor", nullptr};
979 return p;
|
414 }
415 static const JavaPermission permission() {
416 JavaPermission p = {"java.lang.management.ManagementPermission",
417 "monitor", nullptr};
418 return p;
419 }
420 virtual void execute(DCmdSource source, TRAPS);
421 };
422 #endif // INCLUDE_CDS
423
424 // See also: thread_dump in attachListener.cpp
425 class ThreadDumpDCmd : public DCmdWithParser {
426 protected:
427 DCmdArgument<bool> _locks;
428 DCmdArgument<bool> _extended;
429 public:
430 static int num_arguments() { return 2; }
431 ThreadDumpDCmd(outputStream* output, bool heap);
432 static const char* name() { return "Thread.print"; }
433 static const char* description() {
434 return "Print all platform threads with stacktraces.";
435 }
436 static const char* impact() {
437 return "Medium: Depends on the number of threads.";
438 }
439 static const JavaPermission permission() {
440 JavaPermission p = {"java.lang.management.ManagementPermission",
441 "monitor", nullptr};
442 return p;
443 }
444 virtual void execute(DCmdSource source, TRAPS);
445 };
446
447 // Enhanced JMX Agent support
448
449 class JMXStartRemoteDCmd : public DCmdWithParser {
450
451 // Explicitly list all properties that could be
452 // passed to Agent.startRemoteManagementAgent()
453 // com.sun.management is omitted
454
940 DCmdArgument<char*> _filepath;
941 public:
942 static int num_arguments() { return 3; }
943 ThreadDumpToFileDCmd(outputStream *output, bool heap);
944 static const char *name() {
945 return "Thread.dump_to_file";
946 }
947 static const char *description() {
948 return "Dump threads, with stack traces, to a file in plain text or JSON format.";
949 }
950 static const char* impact() {
951 return "Medium: Depends on the number of threads.";
952 }
953 static const JavaPermission permission() {
954 JavaPermission p = {"java.lang.management.ManagementPermission", "monitor", nullptr};
955 return p;
956 }
957 virtual void execute(DCmdSource source, TRAPS);
958 };
959
960 class VThreadSummaryDCmd : public DCmd {
961 public:
962 VThreadSummaryDCmd(outputStream* output, bool heap) : DCmd(output, heap) { }
963 static const char* name() {
964 return "Thread.vthread_summary";
965 }
966 static const char* description() {
967 return "Print virtual thread summary";
968 }
969 static const char* impact() { return "Low"; }
970 virtual void execute(DCmdSource source, TRAPS);
971 };
972
973 class CompilationMemoryStatisticDCmd: public DCmdWithParser {
974 protected:
975 DCmdArgument<bool> _human_readable;
976 DCmdArgument<MemorySizeArgument> _minsize;
977 public:
978 static int num_arguments() { return 2; }
979 CompilationMemoryStatisticDCmd(outputStream* output, bool heap);
980 static const char* name() {
981 return "Compiler.memory";
982 }
983 static const char* description() {
984 return "Print compilation footprint";
985 }
986 static const char* impact() {
987 return "Medium: Pause time depends on number of compiled methods";
988 }
989 static const JavaPermission permission() {
990 JavaPermission p = {"java.lang.management.ManagementPermission",
991 "monitor", nullptr};
992 return p;
|