< prev index next >

src/hotspot/share/services/diagnosticCommand.cpp

Print this page
rev 49285 : [mq]: 8198691.patch


  87   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<ClassHistogramDCmd>(full_export, true, false));
  88   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<ClassStatsDCmd>(full_export, true, false));
  89   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<SystemDictionaryDCmd>(full_export, true, false));
  90   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<ClassHierarchyDCmd>(full_export, true, false));
  91   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<SymboltableDCmd>(full_export, true, false));
  92   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<StringtableDCmd>(full_export, true, false));
  93   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<MetaspaceDCmd>(full_export, true, false));
  94 #if INCLUDE_JVMTI // Both JVMTI and SERVICES have to be enabled to have this dcmd
  95   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<JVMTIAgentLoadDCmd>(full_export, true, false));
  96 #endif // INCLUDE_JVMTI
  97 #endif // INCLUDE_SERVICES
  98 #if INCLUDE_JVMTI
  99   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<JVMTIDataDumpDCmd>(full_export, true, false));
 100 #endif // INCLUDE_JVMTI
 101   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<ThreadDumpDCmd>(full_export, true, false));
 102   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<ClassLoaderStatsDCmd>(full_export, true, false));
 103   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<CompileQueueDCmd>(full_export, true, false));
 104   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<CodeListDCmd>(full_export, true, false));
 105   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<CodeCacheDCmd>(full_export, true, false));
 106   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<TouchedMethodsDCmd>(full_export, true, false));

 107 
 108   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<CompilerDirectivesPrintDCmd>(full_export, true, false));
 109   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<CompilerDirectivesAddDCmd>(full_export, true, false));
 110   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<CompilerDirectivesRemoveDCmd>(full_export, true, false));
 111   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<CompilerDirectivesClearDCmd>(full_export, true, false));
 112 
 113   // Enhanced JMX Agent Support
 114   // These commands won't be exported via the DiagnosticCommandMBean until an
 115   // appropriate permission is created for them
 116   uint32_t jmx_agent_export_flags = DCmd_Source_Internal | DCmd_Source_AttachAPI;
 117   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<JMXStartRemoteDCmd>(jmx_agent_export_flags, true,false));
 118   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<JMXStartLocalDCmd>(jmx_agent_export_flags, true,false));
 119   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<JMXStopRemoteDCmd>(jmx_agent_export_flags, true,false));
 120   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<JMXStatusDCmd>(jmx_agent_export_flags, true,false));
 121 
 122 }
 123 
 124 #ifndef HAVE_EXTRA_DCMD
 125 void DCmdRegistrant::register_dcmds_ext(){
 126    // Do nothing here


 902   // do nothing
 903 }
 904 
 905 void VMDynamicLibrariesDCmd::execute(DCmdSource source, TRAPS) {
 906   os::print_dll_info(output());
 907   output()->cr();
 908 }
 909 
 910 void CompileQueueDCmd::execute(DCmdSource source, TRAPS) {
 911   VM_PrintCompileQueue printCompileQueueOp(output());
 912   VMThread::execute(&printCompileQueueOp);
 913 }
 914 
 915 void CodeListDCmd::execute(DCmdSource source, TRAPS) {
 916   CodeCache::print_codelist(output());
 917 }
 918 
 919 void CodeCacheDCmd::execute(DCmdSource source, TRAPS) {
 920   CodeCache::print_layout(output());
 921 }

























 922 
 923 void CompilerDirectivesPrintDCmd::execute(DCmdSource source, TRAPS) {
 924   DirectivesStack::print(output());
 925 }
 926 
 927 CompilerDirectivesAddDCmd::CompilerDirectivesAddDCmd(outputStream* output, bool heap) :
 928                            DCmdWithParser(output, heap),
 929   _filename("filename","Name of the directives file", "STRING",true) {
 930   _dcmdparser.add_dcmd_argument(&_filename);
 931 }
 932 
 933 void CompilerDirectivesAddDCmd::execute(DCmdSource source, TRAPS) {
 934   DirectivesParser::parse_from_file(_filename.value(), output());
 935 }
 936 
 937 int CompilerDirectivesAddDCmd::num_arguments() {
 938   ResourceMark rm;
 939   CompilerDirectivesAddDCmd* dcmd = new CompilerDirectivesAddDCmd(NULL, false);
 940   if (dcmd != NULL) {
 941     DCmdMark mark(dcmd);




  87   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<ClassHistogramDCmd>(full_export, true, false));
  88   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<ClassStatsDCmd>(full_export, true, false));
  89   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<SystemDictionaryDCmd>(full_export, true, false));
  90   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<ClassHierarchyDCmd>(full_export, true, false));
  91   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<SymboltableDCmd>(full_export, true, false));
  92   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<StringtableDCmd>(full_export, true, false));
  93   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<MetaspaceDCmd>(full_export, true, false));
  94 #if INCLUDE_JVMTI // Both JVMTI and SERVICES have to be enabled to have this dcmd
  95   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<JVMTIAgentLoadDCmd>(full_export, true, false));
  96 #endif // INCLUDE_JVMTI
  97 #endif // INCLUDE_SERVICES
  98 #if INCLUDE_JVMTI
  99   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<JVMTIDataDumpDCmd>(full_export, true, false));
 100 #endif // INCLUDE_JVMTI
 101   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<ThreadDumpDCmd>(full_export, true, false));
 102   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<ClassLoaderStatsDCmd>(full_export, true, false));
 103   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<CompileQueueDCmd>(full_export, true, false));
 104   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<CodeListDCmd>(full_export, true, false));
 105   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<CodeCacheDCmd>(full_export, true, false));
 106   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<TouchedMethodsDCmd>(full_export, true, false));
 107   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<CodeHeapAnalyticsDCmd>(full_export, true, false));
 108 
 109   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<CompilerDirectivesPrintDCmd>(full_export, true, false));
 110   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<CompilerDirectivesAddDCmd>(full_export, true, false));
 111   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<CompilerDirectivesRemoveDCmd>(full_export, true, false));
 112   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<CompilerDirectivesClearDCmd>(full_export, true, false));
 113 
 114   // Enhanced JMX Agent Support
 115   // These commands won't be exported via the DiagnosticCommandMBean until an
 116   // appropriate permission is created for them
 117   uint32_t jmx_agent_export_flags = DCmd_Source_Internal | DCmd_Source_AttachAPI;
 118   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<JMXStartRemoteDCmd>(jmx_agent_export_flags, true,false));
 119   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<JMXStartLocalDCmd>(jmx_agent_export_flags, true,false));
 120   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<JMXStopRemoteDCmd>(jmx_agent_export_flags, true,false));
 121   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<JMXStatusDCmd>(jmx_agent_export_flags, true,false));
 122 
 123 }
 124 
 125 #ifndef HAVE_EXTRA_DCMD
 126 void DCmdRegistrant::register_dcmds_ext(){
 127    // Do nothing here


 903   // do nothing
 904 }
 905 
 906 void VMDynamicLibrariesDCmd::execute(DCmdSource source, TRAPS) {
 907   os::print_dll_info(output());
 908   output()->cr();
 909 }
 910 
 911 void CompileQueueDCmd::execute(DCmdSource source, TRAPS) {
 912   VM_PrintCompileQueue printCompileQueueOp(output());
 913   VMThread::execute(&printCompileQueueOp);
 914 }
 915 
 916 void CodeListDCmd::execute(DCmdSource source, TRAPS) {
 917   CodeCache::print_codelist(output());
 918 }
 919 
 920 void CodeCacheDCmd::execute(DCmdSource source, TRAPS) {
 921   CodeCache::print_layout(output());
 922 }
 923 
 924 //---<  BEGIN  >--- CodeHeap State Analytics.
 925 CodeHeapAnalyticsDCmd::CodeHeapAnalyticsDCmd(outputStream* output, bool heap) :
 926                                              DCmdWithParser(output, heap),
 927   _function("function", "Function to be performed (aggregate, UsedSpace, FreeSpace, MethodCount, MethodSpace, MethodAge, MethodNames, discard", "STRING", false, "all"),
 928   _granularity("granularity", "Detail level - smaller value -> more detail", "STRING", false, "4096") {
 929   _dcmdparser.add_dcmd_argument(&_function);
 930   _dcmdparser.add_dcmd_argument(&_granularity);
 931 }
 932 
 933 void CodeHeapAnalyticsDCmd::execute(DCmdSource source, TRAPS) {
 934   CompileBroker::print_heapinfo(output(), _function.value(), _granularity.value());
 935 }
 936 
 937 int CodeHeapAnalyticsDCmd::num_arguments() {
 938   ResourceMark rm;
 939   CodeHeapAnalyticsDCmd* dcmd = new CodeHeapAnalyticsDCmd(NULL, false);
 940   if (dcmd != NULL) {
 941     DCmdMark mark(dcmd);
 942     return dcmd->_dcmdparser.num_arguments();
 943   } else {
 944     return 0;
 945   }
 946 }
 947 //---<  END  >--- CodeHeap State Analytics.
 948 
 949 void CompilerDirectivesPrintDCmd::execute(DCmdSource source, TRAPS) {
 950   DirectivesStack::print(output());
 951 }
 952 
 953 CompilerDirectivesAddDCmd::CompilerDirectivesAddDCmd(outputStream* output, bool heap) :
 954                            DCmdWithParser(output, heap),
 955   _filename("filename","Name of the directives file", "STRING",true) {
 956   _dcmdparser.add_dcmd_argument(&_filename);
 957 }
 958 
 959 void CompilerDirectivesAddDCmd::execute(DCmdSource source, TRAPS) {
 960   DirectivesParser::parse_from_file(_filename.value(), output());
 961 }
 962 
 963 int CompilerDirectivesAddDCmd::num_arguments() {
 964   ResourceMark rm;
 965   CompilerDirectivesAddDCmd* dcmd = new CompilerDirectivesAddDCmd(NULL, false);
 966   if (dcmd != NULL) {
 967     DCmdMark mark(dcmd);


< prev index next >