< prev index next >

src/hotspot/share/classfile/systemDictionary.cpp

Print this page




2832   GCMutexLocker mu(SystemDictionary_lock);
2833 
2834   // Verify dictionary
2835   ClassLoaderDataGraph::verify_dictionary();
2836 
2837   placeholders()->verify();
2838 
2839   // Verify constraint table
2840   guarantee(constraints() != NULL, "Verify of loader constraints failed");
2841   constraints()->verify(placeholders());
2842 
2843   _pd_cache_table->verify();
2844 }
2845 
2846 void SystemDictionary::dump(outputStream *st, bool verbose) {
2847   assert_locked_or_safepoint(SystemDictionary_lock);
2848   if (verbose) {
2849     print_on(st);
2850   } else {
2851     CDS_ONLY(SystemDictionaryShared::print_table_statistics(st));
2852     ClassLoaderDataGraph::print_dictionary_statistics(st);
2853     placeholders()->print_table_statistics(st, "Placeholder Table");
2854     constraints()->print_table_statistics(st, "LoaderConstraints Table");
2855     _pd_cache_table->print_table_statistics(st, "ProtectionDomainCache Table");
2856   }
2857 }
2858 












2859 // Utility for dumping dictionaries.
2860 SystemDictionaryDCmd::SystemDictionaryDCmd(outputStream* output, bool heap) :
2861                                  DCmdWithParser(output, heap),
2862   _verbose("-verbose", "Dump the content of each dictionary entry for all class loaders",
2863            "BOOLEAN", false, "false") {
2864   _dcmdparser.add_dcmd_option(&_verbose);
2865 }
2866 
2867 void SystemDictionaryDCmd::execute(DCmdSource source, TRAPS) {
2868   VM_DumpHashtable dumper(output(), VM_DumpHashtable::DumpSysDict,
2869                          _verbose.value());
2870   VMThread::execute(&dumper);
2871 }
2872 
2873 int SystemDictionaryDCmd::num_arguments() {
2874   ResourceMark rm;
2875   SystemDictionaryDCmd* dcmd = new SystemDictionaryDCmd(NULL, false);
2876   if (dcmd != NULL) {
2877     DCmdMark mark(dcmd);
2878     return dcmd->_dcmdparser.num_arguments();


2832   GCMutexLocker mu(SystemDictionary_lock);
2833 
2834   // Verify dictionary
2835   ClassLoaderDataGraph::verify_dictionary();
2836 
2837   placeholders()->verify();
2838 
2839   // Verify constraint table
2840   guarantee(constraints() != NULL, "Verify of loader constraints failed");
2841   constraints()->verify(placeholders());
2842 
2843   _pd_cache_table->verify();
2844 }
2845 
2846 void SystemDictionary::dump(outputStream *st, bool verbose) {
2847   assert_locked_or_safepoint(SystemDictionary_lock);
2848   if (verbose) {
2849     print_on(st);
2850   } else {
2851     CDS_ONLY(SystemDictionaryShared::print_table_statistics(st));
2852     ClassLoaderDataGraph::print_table_statistics(st);
2853     placeholders()->print_table_statistics(st, "Placeholder Table");
2854     constraints()->print_table_statistics(st, "LoaderConstraints Table");
2855     pd_cache_table()->print_table_statistics(st, "ProtectionDomainCache Table");
2856   }
2857 }
2858 
2859 TableStatistics SystemDictionary::placeholders_statistics() {
2860   return placeholders()->statistics_calculate();
2861 }
2862 
2863 TableStatistics SystemDictionary::loader_constraints_statistics() {
2864   return constraints()->statistics_calculate();
2865 }
2866 
2867 TableStatistics SystemDictionary::protection_domain_cache_statistics() {
2868   return pd_cache_table()->statistics_calculate();
2869 }
2870 
2871 // Utility for dumping dictionaries.
2872 SystemDictionaryDCmd::SystemDictionaryDCmd(outputStream* output, bool heap) :
2873                                  DCmdWithParser(output, heap),
2874   _verbose("-verbose", "Dump the content of each dictionary entry for all class loaders",
2875            "BOOLEAN", false, "false") {
2876   _dcmdparser.add_dcmd_option(&_verbose);
2877 }
2878 
2879 void SystemDictionaryDCmd::execute(DCmdSource source, TRAPS) {
2880   VM_DumpHashtable dumper(output(), VM_DumpHashtable::DumpSysDict,
2881                          _verbose.value());
2882   VMThread::execute(&dumper);
2883 }
2884 
2885 int SystemDictionaryDCmd::num_arguments() {
2886   ResourceMark rm;
2887   SystemDictionaryDCmd* dcmd = new SystemDictionaryDCmd(NULL, false);
2888   if (dcmd != NULL) {
2889     DCmdMark mark(dcmd);
2890     return dcmd->_dcmdparser.num_arguments();
< prev index next >