< prev index next >

src/hotspot/share/classfile/systemDictionary.cpp

Print this page




2890   GCMutexLocker mu(SystemDictionary_lock);
2891 
2892   // Verify dictionary
2893   ClassLoaderDataGraph::verify_dictionary();
2894 
2895   placeholders()->verify();
2896 
2897   // Verify constraint table
2898   guarantee(constraints() != NULL, "Verify of loader constraints failed");
2899   constraints()->verify(placeholders());
2900 
2901   _pd_cache_table->verify();
2902 }
2903 
2904 void SystemDictionary::dump(outputStream *st, bool verbose) {
2905   assert_locked_or_safepoint(SystemDictionary_lock);
2906   if (verbose) {
2907     print_on(st);
2908   } else {
2909     CDS_ONLY(SystemDictionaryShared::print_table_statistics(st));
2910     ClassLoaderDataGraph::print_dictionary_statistics(st);
2911     placeholders()->print_table_statistics(st, "Placeholder Table");
2912     constraints()->print_table_statistics(st, "LoaderConstraints Table");
2913     _pd_cache_table->print_table_statistics(st, "ProtectionDomainCache Table");
2914   }
2915 }
2916 












2917 // Utility for dumping dictionaries.
2918 SystemDictionaryDCmd::SystemDictionaryDCmd(outputStream* output, bool heap) :
2919                                  DCmdWithParser(output, heap),
2920   _verbose("-verbose", "Dump the content of each dictionary entry for all class loaders",
2921            "BOOLEAN", false, "false") {
2922   _dcmdparser.add_dcmd_option(&_verbose);
2923 }
2924 
2925 void SystemDictionaryDCmd::execute(DCmdSource source, TRAPS) {
2926   VM_DumpHashtable dumper(output(), VM_DumpHashtable::DumpSysDict,
2927                          _verbose.value());
2928   VMThread::execute(&dumper);
2929 }
2930 
2931 int SystemDictionaryDCmd::num_arguments() {
2932   ResourceMark rm;
2933   SystemDictionaryDCmd* dcmd = new SystemDictionaryDCmd(NULL, false);
2934   if (dcmd != NULL) {
2935     DCmdMark mark(dcmd);
2936     return dcmd->_dcmdparser.num_arguments();


2890   GCMutexLocker mu(SystemDictionary_lock);
2891 
2892   // Verify dictionary
2893   ClassLoaderDataGraph::verify_dictionary();
2894 
2895   placeholders()->verify();
2896 
2897   // Verify constraint table
2898   guarantee(constraints() != NULL, "Verify of loader constraints failed");
2899   constraints()->verify(placeholders());
2900 
2901   _pd_cache_table->verify();
2902 }
2903 
2904 void SystemDictionary::dump(outputStream *st, bool verbose) {
2905   assert_locked_or_safepoint(SystemDictionary_lock);
2906   if (verbose) {
2907     print_on(st);
2908   } else {
2909     CDS_ONLY(SystemDictionaryShared::print_table_statistics(st));
2910     ClassLoaderDataGraph::print_table_statistics(st);
2911     placeholders()->print_table_statistics(st, "Placeholder Table");
2912     constraints()->print_table_statistics(st, "LoaderConstraints Table");
2913     pd_cache_table()->print_table_statistics(st, "ProtectionDomainCache Table");
2914   }
2915 }
2916 
2917 TableStatistics SystemDictionary::placeholders_statistics() {
2918   return placeholders()->statistics_calculate();
2919 }
2920 
2921 TableStatistics SystemDictionary::loader_constraints_statistics() {
2922   return constraints()->statistics_calculate();
2923 }
2924 
2925 TableStatistics SystemDictionary::protection_domain_cache_statistics() {
2926   return pd_cache_table()->statistics_calculate();
2927 }
2928 
2929 // Utility for dumping dictionaries.
2930 SystemDictionaryDCmd::SystemDictionaryDCmd(outputStream* output, bool heap) :
2931                                  DCmdWithParser(output, heap),
2932   _verbose("-verbose", "Dump the content of each dictionary entry for all class loaders",
2933            "BOOLEAN", false, "false") {
2934   _dcmdparser.add_dcmd_option(&_verbose);
2935 }
2936 
2937 void SystemDictionaryDCmd::execute(DCmdSource source, TRAPS) {
2938   VM_DumpHashtable dumper(output(), VM_DumpHashtable::DumpSysDict,
2939                          _verbose.value());
2940   VMThread::execute(&dumper);
2941 }
2942 
2943 int SystemDictionaryDCmd::num_arguments() {
2944   ResourceMark rm;
2945   SystemDictionaryDCmd* dcmd = new SystemDictionaryDCmd(NULL, false);
2946   if (dcmd != NULL) {
2947     DCmdMark mark(dcmd);
2948     return dcmd->_dcmdparser.num_arguments();
< prev index next >