< 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<ClassLoaderStatsDCmd>(full_export, true, false));
 132   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<ClassLoaderHierarchyDCmd>(full_export, true, false));
 133   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<CompileQueueDCmd>(full_export, true, false));
 134   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<CodeListDCmd>(full_export, true, false));
 135   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<CodeCacheDCmd>(full_export, true, false));
 136 #ifdef LINUX
 137   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<PerfMapDCmd>(full_export, true, false));
 138   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<TrimCLibcHeapDCmd>(full_export, true, false));
 139   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<MallocInfoDcmd>(full_export, true, false));
 140 #endif // LINUX

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
























 953 
 954 ClassesDCmd::ClassesDCmd(outputStream* output, bool heap) :
 955                                      DCmdWithParser(output, heap),
 956   _verbose("-verbose",
 957            "Dump the detailed content of a Java class. "
 958            "Some classes are annotated with flags: "
 959            "F = has, or inherits, a non-empty finalize method, "
 960            "f = has final method, "
 961            "W = methods rewritten, "
 962            "C = marked with @Contended annotation, "
 963            "R = has been redefined, "
 964            "S = is shared class",
 965            "BOOLEAN", false, "false") {
 966   _dcmdparser.add_dcmd_option(&_verbose);
 967 }
 968 
 969 class VM_PrintClasses : public VM_Operation {
 970 private:
 971   outputStream* _out;
 972   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<ClassLoaderStatsDCmd>(full_export, true, false));
 133   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<ClassLoaderHierarchyDCmd>(full_export, true, false));
 134   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<CompileQueueDCmd>(full_export, true, false));
 135   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<CodeListDCmd>(full_export, true, false));
 136   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<CodeCacheDCmd>(full_export, true, false));
 137 #ifdef LINUX
 138   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<PerfMapDCmd>(full_export, true, false));
 139   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<TrimCLibcHeapDCmd>(full_export, true, false));
 140   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<MallocInfoDcmd>(full_export, true, false));
 141 #endif // LINUX

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