< prev index next >

src/hotspot/share/utilities/concurrentHashTable.hpp

Print this page

        

*** 26,35 **** --- 26,36 ---- #define SHARE_UTILITIES_CONCURRENTHASHTABLE_HPP #include "memory/allocation.hpp" #include "utilities/globalCounter.hpp" #include "utilities/globalDefinitions.hpp" + #include "utilities/tableStatistics.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 // type kept inside each Node and CONFIG contains hash and allocation methods. // A CALLBACK_FUNC and LOOKUP_FUNC needs to be provided for get and insert.
*** 378,387 **** --- 379,390 ---- size_t log2size_limit = DEFAULT_MAX_SIZE_LOG2, size_t grow_hint = DEFAULT_GROW_HINT); ~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; } // This means no paused bucket resize operation is going to resume
*** 452,461 **** --- 455,473 ---- // Destroying items matching EVALUATE_FUNC, before destroying items // DELETE_FUNC is called, when the resize lock is successfully obtained. template <typename EVALUATE_FUNC, typename DELETE_FUNC> void bulk_delete(Thread* thread, EVALUATE_FUNC& eval_f, DELETE_FUNC& del_f); + // Calcuate statistics. Item sizes are calculated with VALUE_SIZE_FUNC. + template <typename VALUE_SIZE_FUNC> + TableStatistics statistics_calculate(Thread* thread, VALUE_SIZE_FUNC& vs_f); + + // Gets statistics if available, if not return old one. Item sizes are calculated with + // VALUE_SIZE_FUNC. + template <typename VALUE_SIZE_FUNC> + TableStatistics statistics_get(Thread* thread, VALUE_SIZE_FUNC& vs_f, TableStatistics old); + // Writes statistics to the outputStream. Item sizes are calculated with // VALUE_SIZE_FUNC. template <typename VALUE_SIZE_FUNC> void statistics_to(Thread* thread, VALUE_SIZE_FUNC& vs_f, outputStream* st, const char* table_name);
< prev index next >