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
919 DCmdArgument<char*> _filepath;
920 public:
921 static int num_arguments() { return 3; }
922 ThreadDumpToFileDCmd(outputStream *output, bool heap);
923 static const char *name() {
924 return "Thread.dump_to_file";
925 }
926 static const char *description() {
927 return "Dump threads, with stack traces, to a file in plain text or JSON format.";
928 }
929 static const char* impact() {
930 return "Medium: Depends on the number of threads.";
931 }
932 static const JavaPermission permission() {
933 JavaPermission p = {"java.lang.management.ManagementPermission", "monitor", nullptr};
934 return p;
935 }
936 virtual void execute(DCmdSource source, TRAPS);
937 };
938
939 class CompilationMemoryStatisticDCmd: public DCmdWithParser {
940 protected:
941 DCmdArgument<bool> _human_readable;
942 DCmdArgument<MemorySizeArgument> _minsize;
943 public:
944 static int num_arguments() { return 2; }
945 CompilationMemoryStatisticDCmd(outputStream* output, bool heap);
946 static const char* name() {
947 return "Compiler.memory";
948 }
949 static const char* description() {
950 return "Print compilation footprint";
951 }
952 static const char* impact() {
953 return "Medium: Pause time depends on number of compiled methods";
954 }
955 static const JavaPermission permission() {
956 JavaPermission p = {"java.lang.management.ManagementPermission",
957 "monitor", nullptr};
958 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
919 DCmdArgument<char*> _filepath;
920 public:
921 static int num_arguments() { return 3; }
922 ThreadDumpToFileDCmd(outputStream *output, bool heap);
923 static const char *name() {
924 return "Thread.dump_to_file";
925 }
926 static const char *description() {
927 return "Dump threads, with stack traces, to a file in plain text or JSON format.";
928 }
929 static const char* impact() {
930 return "Medium: Depends on the number of threads.";
931 }
932 static const JavaPermission permission() {
933 JavaPermission p = {"java.lang.management.ManagementPermission", "monitor", nullptr};
934 return p;
935 }
936 virtual void execute(DCmdSource source, TRAPS);
937 };
938
939 class VThreadSummaryDCmd : public DCmd {
940 public:
941 VThreadSummaryDCmd(outputStream* output, bool heap) : DCmd(output, heap) { }
942 static const char* name() {
943 return "Thread.vthread_summary";
944 }
945 static const char* description() {
946 return "Print the virtual thread scheduler, timeout schedulers, I/O pollers, and thread groupings.";
947 }
948 static const char* impact() { return "Low"; }
949 virtual void execute(DCmdSource source, TRAPS);
950 };
951
952 class CompilationMemoryStatisticDCmd: public DCmdWithParser {
953 protected:
954 DCmdArgument<bool> _human_readable;
955 DCmdArgument<MemorySizeArgument> _minsize;
956 public:
957 static int num_arguments() { return 2; }
958 CompilationMemoryStatisticDCmd(outputStream* output, bool heap);
959 static const char* name() {
960 return "Compiler.memory";
961 }
962 static const char* description() {
963 return "Print compilation footprint";
964 }
965 static const char* impact() {
966 return "Medium: Pause time depends on number of compiled methods";
967 }
968 static const JavaPermission permission() {
969 JavaPermission p = {"java.lang.management.ManagementPermission",
970 "monitor", nullptr};
971 return p;
|