--- old/src/hotspot/share/utilities/concurrentHashTable.hpp 2019-04-04 14:46:45.000000000 -0500 +++ new/src/hotspot/share/utilities/concurrentHashTable.hpp 2019-04-04 14:46:45.000000000 -0500 @@ -28,6 +28,7 @@ #include "memory/allocation.hpp" #include "utilities/globalCounter.hpp" #include "utilities/globalDefinitions.hpp" +#include "utilities/statistics.hpp" // A mostly concurrent-hash-table where the read-side is wait-free, inserts are // CAS and deletes mutual exclude each other on per bucket-basis. VALUE is the @@ -380,6 +381,8 @@ ~ConcurrentHashTable(); + TableRateStatistics _stats_rate; + size_t get_size_log2(Thread* thread); size_t get_node_size() const { return sizeof(Node); } bool is_max_size_reached() { return _size_limit_reached; } @@ -454,6 +457,10 @@ template void bulk_delete(Thread* thread, EVALUATE_FUNC& eval_f, DELETE_FUNC& del_f); + // Calcuate statistics. Item sizes are calculated with VALUE_SIZE_FUNC. + template + TableStatistics statistics_calculate(Thread* thread, VALUE_SIZE_FUNC& vs_f); + // Writes statistics to the outputStream. Item sizes are calculated with // VALUE_SIZE_FUNC. template