< prev index next >

src/hotspot/share/services/diagnosticCommand.cpp

Print this page




  79   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<CommandLineDCmd>(full_export, true, false));
  80   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<PrintSystemPropertiesDCmd>(full_export, true, false));
  81   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<PrintVMFlagsDCmd>(full_export, true, false));
  82   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<SetVMFlagDCmd>(full_export, true, false));
  83   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<VMDynamicLibrariesDCmd>(full_export, true, false));
  84   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<VMUptimeDCmd>(full_export, true, false));
  85   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<VMInfoDCmd>(full_export, true, false));
  86   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<SystemGCDCmd>(full_export, true, false));
  87   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<RunFinalizationDCmd>(full_export, true, false));
  88   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<HeapInfoDCmd>(full_export, true, false));
  89   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<FinalizerInfoDCmd>(full_export, true, false));
  90 #if INCLUDE_SERVICES
  91   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<HeapDumpDCmd>(DCmd_Source_Internal | DCmd_Source_AttachAPI, true, false));
  92   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<ClassHistogramDCmd>(full_export, true, false));
  93   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<ClassStatsDCmd>(full_export, true, false));
  94   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<SystemDictionaryDCmd>(full_export, true, false));
  95   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<ClassHierarchyDCmd>(full_export, true, false));
  96   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<SymboltableDCmd>(full_export, true, false));
  97   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<StringtableDCmd>(full_export, true, false));
  98   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<metaspace::MetaspaceDCmd>(full_export, true, false));

  99   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<EventLogDCmd>(full_export, true, false));
 100 #if INCLUDE_JVMTI // Both JVMTI and SERVICES have to be enabled to have this dcmd
 101   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<JVMTIAgentLoadDCmd>(full_export, true, false));
 102 #endif // INCLUDE_JVMTI
 103 #endif // INCLUDE_SERVICES
 104 #if INCLUDE_JVMTI
 105   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<JVMTIDataDumpDCmd>(full_export, true, false));
 106 #endif // INCLUDE_JVMTI
 107   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<ThreadDumpDCmd>(full_export, true, false));
 108   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<ClassLoaderStatsDCmd>(full_export, true, false));
 109   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<ClassLoaderHierarchyDCmd>(full_export, true, false));
 110   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<CompileQueueDCmd>(full_export, true, false));
 111   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<CodeListDCmd>(full_export, true, false));
 112   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<CodeCacheDCmd>(full_export, true, false));
 113   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<TouchedMethodsDCmd>(full_export, true, false));
 114   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<CodeHeapAnalyticsDCmd>(full_export, true, false));
 115 
 116   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<CompilerDirectivesPrintDCmd>(full_export, true, false));
 117   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<CompilerDirectivesAddDCmd>(full_export, true, false));
 118   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<CompilerDirectivesRemoveDCmd>(full_export, true, false));


1060 
1061 void ClassHierarchyDCmd::execute(DCmdSource source, TRAPS) {
1062   VM_PrintClassHierarchy printClassHierarchyOp(output(), _print_interfaces.value(),
1063                                                _print_subclasses.value(), _classname.value());
1064   VMThread::execute(&printClassHierarchyOp);
1065 }
1066 
1067 int ClassHierarchyDCmd::num_arguments() {
1068   ResourceMark rm;
1069   ClassHierarchyDCmd* dcmd = new ClassHierarchyDCmd(NULL, false);
1070   if (dcmd != NULL) {
1071     DCmdMark mark(dcmd);
1072     return dcmd->_dcmdparser.num_arguments();
1073   } else {
1074     return 0;
1075   }
1076 }
1077 
1078 #endif
1079 























1080 class VM_DumpTouchedMethods : public VM_Operation {
1081 private:
1082   outputStream* _out;
1083 public:
1084   VM_DumpTouchedMethods(outputStream* out) {
1085     _out = out;
1086   }
1087 
1088   virtual VMOp_Type type() const { return VMOp_DumpTouchedMethods; }
1089 
1090   virtual void doit() {
1091     Method::print_touched_methods(_out);
1092   }
1093 };
1094 
1095 TouchedMethodsDCmd::TouchedMethodsDCmd(outputStream* output, bool heap) :
1096                                        DCmdWithParser(output, heap)
1097 {}
1098 
1099 void TouchedMethodsDCmd::execute(DCmdSource source, TRAPS) {




  79   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<CommandLineDCmd>(full_export, true, false));
  80   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<PrintSystemPropertiesDCmd>(full_export, true, false));
  81   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<PrintVMFlagsDCmd>(full_export, true, false));
  82   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<SetVMFlagDCmd>(full_export, true, false));
  83   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<VMDynamicLibrariesDCmd>(full_export, true, false));
  84   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<VMUptimeDCmd>(full_export, true, false));
  85   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<VMInfoDCmd>(full_export, true, false));
  86   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<SystemGCDCmd>(full_export, true, false));
  87   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<RunFinalizationDCmd>(full_export, true, false));
  88   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<HeapInfoDCmd>(full_export, true, false));
  89   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<FinalizerInfoDCmd>(full_export, true, false));
  90 #if INCLUDE_SERVICES
  91   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<HeapDumpDCmd>(DCmd_Source_Internal | DCmd_Source_AttachAPI, true, false));
  92   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<ClassHistogramDCmd>(full_export, true, false));
  93   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<ClassStatsDCmd>(full_export, true, false));
  94   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<SystemDictionaryDCmd>(full_export, true, false));
  95   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<ClassHierarchyDCmd>(full_export, true, false));
  96   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<SymboltableDCmd>(full_export, true, false));
  97   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<StringtableDCmd>(full_export, true, false));
  98   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<metaspace::MetaspaceDCmd>(full_export, true, false));
  99   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<PrintClassLayoutDCmd>(full_export, true, false));
 100   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<EventLogDCmd>(full_export, true, false));
 101 #if INCLUDE_JVMTI // Both JVMTI and SERVICES have to be enabled to have this dcmd
 102   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<JVMTIAgentLoadDCmd>(full_export, true, false));
 103 #endif // INCLUDE_JVMTI
 104 #endif // INCLUDE_SERVICES
 105 #if INCLUDE_JVMTI
 106   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<JVMTIDataDumpDCmd>(full_export, true, false));
 107 #endif // INCLUDE_JVMTI
 108   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<ThreadDumpDCmd>(full_export, true, false));
 109   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<ClassLoaderStatsDCmd>(full_export, true, false));
 110   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<ClassLoaderHierarchyDCmd>(full_export, true, false));
 111   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<CompileQueueDCmd>(full_export, true, false));
 112   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<CodeListDCmd>(full_export, true, false));
 113   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<CodeCacheDCmd>(full_export, true, false));
 114   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<TouchedMethodsDCmd>(full_export, true, false));
 115   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<CodeHeapAnalyticsDCmd>(full_export, true, false));
 116 
 117   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<CompilerDirectivesPrintDCmd>(full_export, true, false));
 118   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<CompilerDirectivesAddDCmd>(full_export, true, false));
 119   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<CompilerDirectivesRemoveDCmd>(full_export, true, false));


1061 
1062 void ClassHierarchyDCmd::execute(DCmdSource source, TRAPS) {
1063   VM_PrintClassHierarchy printClassHierarchyOp(output(), _print_interfaces.value(),
1064                                                _print_subclasses.value(), _classname.value());
1065   VMThread::execute(&printClassHierarchyOp);
1066 }
1067 
1068 int ClassHierarchyDCmd::num_arguments() {
1069   ResourceMark rm;
1070   ClassHierarchyDCmd* dcmd = new ClassHierarchyDCmd(NULL, false);
1071   if (dcmd != NULL) {
1072     DCmdMark mark(dcmd);
1073     return dcmd->_dcmdparser.num_arguments();
1074   } else {
1075     return 0;
1076   }
1077 }
1078 
1079 #endif
1080 
1081 PrintClassLayoutDCmd::PrintClassLayoutDCmd(outputStream* output, bool heap) :
1082                                        DCmdWithParser(output, heap),
1083   _classname("classname", "Name of class whose layout should be printed. ",
1084              "STRING", true) {
1085   _dcmdparser.add_dcmd_argument(&_classname);
1086 }
1087 
1088 void PrintClassLayoutDCmd::execute(DCmdSource source, TRAPS) {
1089   VM_PrintClassLayout printClassLayoutOp(output(), _classname.value());
1090   VMThread::execute(&printClassLayoutOp);
1091 }
1092 
1093 int PrintClassLayoutDCmd::num_arguments() {
1094   ResourceMark rm;
1095   PrintClassLayoutDCmd* dcmd = new PrintClassLayoutDCmd(NULL, false);
1096   if (dcmd != NULL) {
1097     DCmdMark mark(dcmd);
1098     return dcmd->_dcmdparser.num_arguments();
1099   } else {
1100     return 0;
1101   }
1102 }
1103 
1104 class VM_DumpTouchedMethods : public VM_Operation {
1105 private:
1106   outputStream* _out;
1107 public:
1108   VM_DumpTouchedMethods(outputStream* out) {
1109     _out = out;
1110   }
1111 
1112   virtual VMOp_Type type() const { return VMOp_DumpTouchedMethods; }
1113 
1114   virtual void doit() {
1115     Method::print_touched_methods(_out);
1116   }
1117 };
1118 
1119 TouchedMethodsDCmd::TouchedMethodsDCmd(outputStream* output, bool heap) :
1120                                        DCmdWithParser(output, heap)
1121 {}
1122 
1123 void TouchedMethodsDCmd::execute(DCmdSource source, TRAPS) {


< prev index next >