--- old/src/share/vm/utilities/hashtable.hpp 2019-09-02 18:09:54.037864400 +0300 +++ new/src/share/vm/utilities/hashtable.hpp 2019-09-02 18:09:53.148727300 +0300 @@ -30,6 +30,7 @@ #include "oops/oop.hpp" #include "oops/symbol.hpp" #include "runtime/handles.hpp" +#include "utilities/tableStatistics.hpp" // This is a generic hashtable, designed to be used for the symbol // and string tables. @@ -178,6 +179,8 @@ void verify_lookup_length(double load); #endif + TableRateStatistics _stats_rate; + void initialize(int table_size, int entry_size, int number_of_entries); // Accessor @@ -267,6 +270,8 @@ // addresses, and appear first in the list. void reverse(void* boundary = NULL); + TableStatistics statistics_calculate(T (*literal_load_barrier)(HashtableEntry*) = NULL); + protected: unsigned int compute_hash(Symbol* name) { @@ -317,16 +322,6 @@ static bool use_alternate_hashcode() { return _seed != 0; } static juint seed() { return _seed; } - static int literal_size(Symbol *symbol); - static int literal_size(oop oop); - - // The following two are currently not used, but are needed anyway because some - // C++ compilers (MacOS and Solaris) force the instantiation of - // Hashtable::dump_table() even though we never call this function - // in the VM code. - static int literal_size(ConstantPool *cp) {Unimplemented(); return 0;} - static int literal_size(Klass *k) {Unimplemented(); return 0;} - void dump_table(outputStream* st, const char *table_name); private: