--- old/src/hotspot/share/classfile/classLoaderDataGraph.cpp 2019-04-04 14:46:39.000000000 -0500 +++ new/src/hotspot/share/classfile/classLoaderDataGraph.cpp 2019-04-04 14:46:38.000000000 -0500 @@ -442,7 +442,7 @@ } } -void ClassLoaderDataGraph::print_dictionary_statistics(outputStream* st) { +void ClassLoaderDataGraph::print_table_statistics(outputStream* st) { FOR_ALL_DICTIONARY(cld) { ResourceMark rm; stringStream tempst; --- old/src/hotspot/share/classfile/classLoaderDataGraph.hpp 2019-04-04 14:46:39.000000000 -0500 +++ new/src/hotspot/share/classfile/classLoaderDataGraph.hpp 2019-04-04 14:46:39.000000000 -0500 @@ -112,7 +112,7 @@ static void verify_dictionary(); static void print_dictionary(outputStream* st); - static void print_dictionary_statistics(outputStream* st); + static void print_table_statistics(outputStream* st); // CMS support. static void remember_new_clds(bool remember) { _saved_head = (remember ? _head : NULL); } --- old/src/hotspot/share/classfile/stringTable.cpp 2019-04-04 14:46:40.000000000 -0500 +++ new/src/hotspot/share/classfile/stringTable.cpp 2019-04-04 14:46:40.000000000 -0500 @@ -579,6 +579,11 @@ }; }; +TableStatistics StringTable::get_table_statistics() { + SizeFunc sz; + return _local_table->statistics_calculate(Thread::current(), sz); +} + void StringTable::print_table_statistics(outputStream* st, const char* table_name) { SizeFunc sz; --- old/src/hotspot/share/classfile/stringTable.hpp 2019-04-04 14:46:41.000000000 -0500 +++ new/src/hotspot/share/classfile/stringTable.hpp 2019-04-04 14:46:40.000000000 -0500 @@ -99,6 +99,7 @@ // The string table static StringTable* the_table() { return _the_table; } size_t table_size(); + TableStatistics get_table_statistics(); static OopStorage* weak_storage() { return the_table()->_weak_handles; } --- old/src/hotspot/share/classfile/symbolTable.cpp 2019-04-04 14:46:41.000000000 -0500 +++ new/src/hotspot/share/classfile/symbolTable.cpp 2019-04-04 14:46:41.000000000 -0500 @@ -503,6 +503,11 @@ }; }; +TableStatistics SymbolTable::get_table_statistics() { + SizeFunc sz; + return _local_table->statistics_calculate(Thread::current(), sz); +} + void SymbolTable::print_table_statistics(outputStream* st, const char* table_name) { SizeFunc sz; --- old/src/hotspot/share/classfile/symbolTable.hpp 2019-04-04 14:46:42.000000000 -0500 +++ new/src/hotspot/share/classfile/symbolTable.hpp 2019-04-04 14:46:41.000000000 -0500 @@ -171,6 +171,7 @@ // The symbol table static SymbolTable* the_table() { return _the_table; } size_t table_size(); + TableStatistics get_table_statistics(); enum { symbol_alloc_batch_size = 8, --- old/src/hotspot/share/classfile/systemDictionary.cpp 2019-04-04 14:46:42.000000000 -0500 +++ new/src/hotspot/share/classfile/systemDictionary.cpp 2019-04-04 14:46:42.000000000 -0500 @@ -2907,13 +2907,25 @@ print_on(st); } else { CDS_ONLY(SystemDictionaryShared::print_table_statistics(st)); - ClassLoaderDataGraph::print_dictionary_statistics(st); + ClassLoaderDataGraph::print_table_statistics(st); placeholders()->print_table_statistics(st, "Placeholder Table"); constraints()->print_table_statistics(st, "LoaderConstraints Table"); - _pd_cache_table->print_table_statistics(st, "ProtectionDomainCache Table"); + pd_cache_table()->print_table_statistics(st, "ProtectionDomainCache Table"); } } +TableStatistics SystemDictionary::placeholders_statistics() { + return placeholders()->statistics_calculate(); +} + +TableStatistics SystemDictionary::loader_constraints_statistics() { + return constraints()->statistics_calculate(); +} + +TableStatistics SystemDictionary::protection_domain_cache_statistics() { + return pd_cache_table()->statistics_calculate(); +} + // Utility for dumping dictionaries. SystemDictionaryDCmd::SystemDictionaryDCmd(outputStream* output, bool heap) : DCmdWithParser(output, heap), --- old/src/hotspot/share/classfile/systemDictionary.hpp 2019-04-04 14:46:43.000000000 -0500 +++ new/src/hotspot/share/classfile/systemDictionary.hpp 2019-04-04 14:46:43.000000000 -0500 @@ -701,6 +701,11 @@ static oop _java_platform_loader; static bool _has_checkPackageAccess; + +public: + static TableStatistics placeholders_statistics(); + static TableStatistics loader_constraints_statistics(); + static TableStatistics protection_domain_cache_statistics(); }; #endif // SHARE_CLASSFILE_SYSTEMDICTIONARY_HPP --- old/src/hotspot/share/jfr/metadata/metadata.xml 2019-04-04 14:46:44.000000000 -0500 +++ new/src/hotspot/share/jfr/metadata/metadata.xml 2019-04-04 14:46:43.000000000 -0500 @@ -1,7 +1,7 @@