< prev index next >

src/hotspot/share/classfile/systemDictionary.cpp

Print this page
rev 52316 : 8185525: Add JFR event for DictionarySizes
Summary: Added TableStatistics event
Reviewed-by: egahlin, coleenp


2919   // Verify dictionary
2920   ClassLoaderDataGraph::verify_dictionary();
2921 
2922   placeholders()->verify();
2923 
2924   // Verify constraint table
2925   guarantee(constraints() != NULL, "Verify of loader constraints failed");
2926   constraints()->verify(placeholders());
2927 
2928   _pd_cache_table->verify();
2929 }
2930 
2931 void SystemDictionary::dump(outputStream *st, bool verbose) {
2932   assert_locked_or_safepoint(SystemDictionary_lock);
2933   if (verbose) {
2934     print_on(st);
2935   } else {
2936     if (shared_dictionary() != NULL) {
2937       shared_dictionary()->print_table_statistics(st, "Shared Dictionary");
2938     }
2939     ClassLoaderDataGraph::print_dictionary_statistics(st);
2940     placeholders()->print_table_statistics(st, "Placeholder Table");
2941     constraints()->print_table_statistics(st, "LoaderConstraints Table");
2942     _pd_cache_table->print_table_statistics(st, "ProtectionDomainCache Table");
2943   }












2944 }
2945 
2946 // Utility for dumping dictionaries.
2947 SystemDictionaryDCmd::SystemDictionaryDCmd(outputStream* output, bool heap) :
2948                                  DCmdWithParser(output, heap),
2949   _verbose("-verbose", "Dump the content of each dictionary entry for all class loaders",
2950            "BOOLEAN", false, "false") {
2951   _dcmdparser.add_dcmd_option(&_verbose);
2952 }
2953 
2954 void SystemDictionaryDCmd::execute(DCmdSource source, TRAPS) {
2955   VM_DumpHashtable dumper(output(), VM_DumpHashtable::DumpSysDict,
2956                          _verbose.value());
2957   VMThread::execute(&dumper);
2958 }
2959 
2960 int SystemDictionaryDCmd::num_arguments() {
2961   ResourceMark rm;
2962   SystemDictionaryDCmd* dcmd = new SystemDictionaryDCmd(NULL, false);
2963   if (dcmd != NULL) {




2919   // Verify dictionary
2920   ClassLoaderDataGraph::verify_dictionary();
2921 
2922   placeholders()->verify();
2923 
2924   // Verify constraint table
2925   guarantee(constraints() != NULL, "Verify of loader constraints failed");
2926   constraints()->verify(placeholders());
2927 
2928   _pd_cache_table->verify();
2929 }
2930 
2931 void SystemDictionary::dump(outputStream *st, bool verbose) {
2932   assert_locked_or_safepoint(SystemDictionary_lock);
2933   if (verbose) {
2934     print_on(st);
2935   } else {
2936     if (shared_dictionary() != NULL) {
2937       shared_dictionary()->print_table_statistics(st, "Shared Dictionary");
2938     }
2939     ClassLoaderDataGraph::print_table_statistics(st);
2940     placeholders()->print_table_statistics(st, "Placeholder Table");
2941     constraints()->print_table_statistics(st, "LoaderConstraints Table");
2942     pd_cache_table()->print_table_statistics(st, "ProtectionDomainCache Table");
2943   }
2944 }
2945 
2946 TableStatistics SystemDictionary::placeholders_statistics() {
2947   return placeholders()->statistics_calculate();
2948 }
2949 
2950 TableStatistics SystemDictionary::loader_constraints_statistics() {
2951   return constraints()->statistics_calculate();
2952 }
2953 
2954 TableStatistics SystemDictionary::protection_domain_cache_statistics() {
2955   return pd_cache_table()->statistics_calculate();
2956 }
2957 
2958 // Utility for dumping dictionaries.
2959 SystemDictionaryDCmd::SystemDictionaryDCmd(outputStream* output, bool heap) :
2960                                  DCmdWithParser(output, heap),
2961   _verbose("-verbose", "Dump the content of each dictionary entry for all class loaders",
2962            "BOOLEAN", false, "false") {
2963   _dcmdparser.add_dcmd_option(&_verbose);
2964 }
2965 
2966 void SystemDictionaryDCmd::execute(DCmdSource source, TRAPS) {
2967   VM_DumpHashtable dumper(output(), VM_DumpHashtable::DumpSysDict,
2968                          _verbose.value());
2969   VMThread::execute(&dumper);
2970 }
2971 
2972 int SystemDictionaryDCmd::num_arguments() {
2973   ResourceMark rm;
2974   SystemDictionaryDCmd* dcmd = new SystemDictionaryDCmd(NULL, false);
2975   if (dcmd != NULL) {


< prev index next >