< prev index next >

src/hotspot/share/services/diagnosticCommand.cpp

Print this page

 101   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<CommandLineDCmd>(full_export, true, false));
 102   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<PrintSystemPropertiesDCmd>(full_export, true, false));
 103   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<PrintVMFlagsDCmd>(full_export, true, false));
 104   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<SetVMFlagDCmd>(full_export, true, false));
 105   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<VMDynamicLibrariesDCmd>(full_export, true, false));
 106   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<VMUptimeDCmd>(full_export, true, false));
 107   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<VMInfoDCmd>(full_export, true, false));
 108   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<SystemGCDCmd>(full_export, true, false));
 109   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<RunFinalizationDCmd>(full_export, true, false));
 110   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<HeapInfoDCmd>(full_export, true, false));
 111   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<FinalizerInfoDCmd>(full_export, true, false));
 112 #if INCLUDE_SERVICES
 113   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<HeapDumpDCmd>(DCmd_Source_Internal | DCmd_Source_AttachAPI, true, false));
 114   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<ClassHistogramDCmd>(full_export, true, false));
 115   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<SystemDictionaryDCmd>(full_export, true, false));
 116   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<ClassHierarchyDCmd>(full_export, true, false));
 117   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<ClassesDCmd>(full_export, true, false));
 118   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<SymboltableDCmd>(full_export, true, false));
 119   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<StringtableDCmd>(full_export, true, false));
 120   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<metaspace::MetaspaceDCmd>(full_export, true, false));

 121   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<EventLogDCmd>(full_export, true, false));
 122 #if INCLUDE_JVMTI // Both JVMTI and SERVICES have to be enabled to have this dcmd
 123   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<JVMTIAgentLoadDCmd>(full_export, true, false));
 124 #endif // INCLUDE_JVMTI
 125 #endif // INCLUDE_SERVICES
 126 #if INCLUDE_JVMTI
 127   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<JVMTIDataDumpDCmd>(full_export, true, false));
 128 #endif // INCLUDE_JVMTI
 129   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<ThreadDumpDCmd>(full_export, true, false));
 130   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<ThreadDumpToFileDCmd>(full_export, true, false));
 131   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<VThreadSchedulerDCmd>(full_export, true, false));
 132   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<VThreadPollersDCmd>(full_export, true, false));
 133   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<ClassLoaderStatsDCmd>(full_export, true, false));
 134   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<ClassLoaderHierarchyDCmd>(full_export, true, false));
 135   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<CompileQueueDCmd>(full_export, true, false));
 136   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<CodeListDCmd>(full_export, true, false));
 137   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<CodeCacheDCmd>(full_export, true, false));
 138 #ifdef LINUX
 139   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<PerfMapDCmd>(full_export, true, false));
 140   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<TrimCLibcHeapDCmd>(full_export, true, false));

 929 #if INCLUDE_SERVICES
 930 ClassHierarchyDCmd::ClassHierarchyDCmd(outputStream* output, bool heap) :
 931                                        DCmdWithParser(output, heap),
 932   _print_interfaces("-i", "Inherited interfaces should be printed.", "BOOLEAN", false, "false"),
 933   _print_subclasses("-s", "If a classname is specified, print its subclasses "
 934                     "in addition to its superclasses. Without this option only the "
 935                     "superclasses will be printed.", "BOOLEAN", false, "false"),
 936   _classname("classname", "Name of class whose hierarchy should be printed. "
 937              "If not specified, all class hierarchies are printed.",
 938              "STRING", false) {
 939   _dcmdparser.add_dcmd_option(&_print_interfaces);
 940   _dcmdparser.add_dcmd_option(&_print_subclasses);
 941   _dcmdparser.add_dcmd_argument(&_classname);
 942 }
 943 
 944 void ClassHierarchyDCmd::execute(DCmdSource source, TRAPS) {
 945   VM_PrintClassHierarchy printClassHierarchyOp(output(), _print_interfaces.value(),
 946                                                _print_subclasses.value(), _classname.value());
 947   VMThread::execute(&printClassHierarchyOp);
 948 }
 949 #endif
























 950 
 951 ClassesDCmd::ClassesDCmd(outputStream* output, bool heap) :
 952                                      DCmdWithParser(output, heap),
 953   _verbose("-verbose",
 954            "Dump the detailed content of a Java class. "
 955            "Some classes are annotated with flags: "
 956            "F = has, or inherits, a non-empty finalize method, "
 957            "f = has final method, "
 958            "W = methods rewritten, "
 959            "C = marked with @Contended annotation, "
 960            "R = has been redefined, "
 961            "S = is shared class",
 962            "BOOLEAN", false, "false") {
 963   _dcmdparser.add_dcmd_option(&_verbose);
 964 }
 965 
 966 class VM_PrintClasses : public VM_Operation {
 967 private:
 968   outputStream* _out;
 969   bool _verbose;

 101   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<CommandLineDCmd>(full_export, true, false));
 102   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<PrintSystemPropertiesDCmd>(full_export, true, false));
 103   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<PrintVMFlagsDCmd>(full_export, true, false));
 104   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<SetVMFlagDCmd>(full_export, true, false));
 105   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<VMDynamicLibrariesDCmd>(full_export, true, false));
 106   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<VMUptimeDCmd>(full_export, true, false));
 107   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<VMInfoDCmd>(full_export, true, false));
 108   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<SystemGCDCmd>(full_export, true, false));
 109   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<RunFinalizationDCmd>(full_export, true, false));
 110   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<HeapInfoDCmd>(full_export, true, false));
 111   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<FinalizerInfoDCmd>(full_export, true, false));
 112 #if INCLUDE_SERVICES
 113   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<HeapDumpDCmd>(DCmd_Source_Internal | DCmd_Source_AttachAPI, true, false));
 114   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<ClassHistogramDCmd>(full_export, true, false));
 115   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<SystemDictionaryDCmd>(full_export, true, false));
 116   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<ClassHierarchyDCmd>(full_export, true, false));
 117   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<ClassesDCmd>(full_export, true, false));
 118   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<SymboltableDCmd>(full_export, true, false));
 119   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<StringtableDCmd>(full_export, true, false));
 120   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<metaspace::MetaspaceDCmd>(full_export, true, false));
 121   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<PrintClassLayoutDCmd>(full_export, true, false));
 122   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<EventLogDCmd>(full_export, true, false));
 123 #if INCLUDE_JVMTI // Both JVMTI and SERVICES have to be enabled to have this dcmd
 124   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<JVMTIAgentLoadDCmd>(full_export, true, false));
 125 #endif // INCLUDE_JVMTI
 126 #endif // INCLUDE_SERVICES
 127 #if INCLUDE_JVMTI
 128   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<JVMTIDataDumpDCmd>(full_export, true, false));
 129 #endif // INCLUDE_JVMTI
 130   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<ThreadDumpDCmd>(full_export, true, false));
 131   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<ThreadDumpToFileDCmd>(full_export, true, false));
 132   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<VThreadSchedulerDCmd>(full_export, true, false));
 133   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<VThreadPollersDCmd>(full_export, true, false));
 134   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<ClassLoaderStatsDCmd>(full_export, true, false));
 135   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<ClassLoaderHierarchyDCmd>(full_export, true, false));
 136   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<CompileQueueDCmd>(full_export, true, false));
 137   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<CodeListDCmd>(full_export, true, false));
 138   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<CodeCacheDCmd>(full_export, true, false));
 139 #ifdef LINUX
 140   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<PerfMapDCmd>(full_export, true, false));
 141   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<TrimCLibcHeapDCmd>(full_export, true, false));

 930 #if INCLUDE_SERVICES
 931 ClassHierarchyDCmd::ClassHierarchyDCmd(outputStream* output, bool heap) :
 932                                        DCmdWithParser(output, heap),
 933   _print_interfaces("-i", "Inherited interfaces should be printed.", "BOOLEAN", false, "false"),
 934   _print_subclasses("-s", "If a classname is specified, print its subclasses "
 935                     "in addition to its superclasses. Without this option only the "
 936                     "superclasses will be printed.", "BOOLEAN", false, "false"),
 937   _classname("classname", "Name of class whose hierarchy should be printed. "
 938              "If not specified, all class hierarchies are printed.",
 939              "STRING", false) {
 940   _dcmdparser.add_dcmd_option(&_print_interfaces);
 941   _dcmdparser.add_dcmd_option(&_print_subclasses);
 942   _dcmdparser.add_dcmd_argument(&_classname);
 943 }
 944 
 945 void ClassHierarchyDCmd::execute(DCmdSource source, TRAPS) {
 946   VM_PrintClassHierarchy printClassHierarchyOp(output(), _print_interfaces.value(),
 947                                                _print_subclasses.value(), _classname.value());
 948   VMThread::execute(&printClassHierarchyOp);
 949 }
 950 
 951 PrintClassLayoutDCmd::PrintClassLayoutDCmd(outputStream* output, bool heap) :
 952                                        DCmdWithParser(output, heap),
 953   _classname("classname", "Name of class whose layout should be printed. ",
 954              "STRING", true) {
 955   _dcmdparser.add_dcmd_argument(&_classname);
 956 }
 957 
 958 void PrintClassLayoutDCmd::execute(DCmdSource source, TRAPS) {
 959   VM_PrintClassLayout printClassLayoutOp(output(), _classname.value());
 960   VMThread::execute(&printClassLayoutOp);
 961 }
 962 
 963 int PrintClassLayoutDCmd::num_arguments() {
 964   ResourceMark rm;
 965   PrintClassLayoutDCmd* dcmd = new PrintClassLayoutDCmd(nullptr, false);
 966   if (dcmd != nullptr) {
 967     DCmdMark mark(dcmd);
 968     return dcmd->_dcmdparser.num_arguments();
 969   } else {
 970     return 0;
 971   }
 972 }
 973 
 974 #endif // INCLUDE_SERVICES
 975 
 976 ClassesDCmd::ClassesDCmd(outputStream* output, bool heap) :
 977                                      DCmdWithParser(output, heap),
 978   _verbose("-verbose",
 979            "Dump the detailed content of a Java class. "
 980            "Some classes are annotated with flags: "
 981            "F = has, or inherits, a non-empty finalize method, "
 982            "f = has final method, "
 983            "W = methods rewritten, "
 984            "C = marked with @Contended annotation, "
 985            "R = has been redefined, "
 986            "S = is shared class",
 987            "BOOLEAN", false, "false") {
 988   _dcmdparser.add_dcmd_option(&_verbose);
 989 }
 990 
 991 class VM_PrintClasses : public VM_Operation {
 992 private:
 993   outputStream* _out;
 994   bool _verbose;
< prev index next >