< prev index next >

src/hotspot/share/classfile/systemDictionary.cpp

Print this page




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


2844   guarantee(constraints() != NULL, "Verify of loader constraints failed");
2845   constraints()->verify(placeholders());
2846 
2847   _pd_cache_table->verify();
2848 }
2849 
2850 void SystemDictionary::dump(outputStream *st, bool verbose) {
2851   assert_locked_or_safepoint(SystemDictionary_lock);
2852   if (verbose) {
2853     print_on(st);
2854   } else {
2855     CDS_ONLY(SystemDictionaryShared::print_table_statistics(st));
2856     ClassLoaderDataGraph::print_table_statistics(st);
2857     placeholders()->print_table_statistics(st, "Placeholder Table");
2858     constraints()->print_table_statistics(st, "LoaderConstraints Table");
2859     pd_cache_table()->print_table_statistics(st, "ProtectionDomainCache Table");
2860   }
2861 }
2862 
2863 TableStatistics SystemDictionary::placeholders_statistics() {

2864   return placeholders()->statistics_calculate();
2865 }
2866 
2867 TableStatistics SystemDictionary::loader_constraints_statistics() {

2868   return constraints()->statistics_calculate();
2869 }
2870 
2871 TableStatistics SystemDictionary::protection_domain_cache_statistics() {

2872   return pd_cache_table()->statistics_calculate();
2873 }
2874 
2875 // Utility for dumping dictionaries.
2876 SystemDictionaryDCmd::SystemDictionaryDCmd(outputStream* output, bool heap) :
2877                                  DCmdWithParser(output, heap),
2878   _verbose("-verbose", "Dump the content of each dictionary entry for all class loaders",
2879            "BOOLEAN", false, "false") {
2880   _dcmdparser.add_dcmd_option(&_verbose);
2881 }
2882 
2883 void SystemDictionaryDCmd::execute(DCmdSource source, TRAPS) {
2884   VM_DumpHashtable dumper(output(), VM_DumpHashtable::DumpSysDict,
2885                          _verbose.value());
2886   VMThread::execute(&dumper);
2887 }
2888 
2889 int SystemDictionaryDCmd::num_arguments() {
2890   ResourceMark rm;
2891   SystemDictionaryDCmd* dcmd = new SystemDictionaryDCmd(NULL, false);
< prev index next >