< prev index next >
src/share/vm/utilities/hashtable.hpp
Print this page
rev 9056 : 8185525: Add JFR event for DictionarySizes
Summary: Added TableStatistics event
Reviewed-by: egahlin, coleenp
*** 28,37 ****
--- 28,38 ----
#include "classfile/classLoaderData.hpp"
#include "memory/allocation.hpp"
#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.
//
// It is implemented as an open hash table with a fixed number of buckets.
*** 176,185 ****
--- 177,188 ----
int _lookup_count;
int _lookup_length;
void verify_lookup_length(double load);
#endif
+ TableRateStatistics _stats_rate;
+
void initialize(int table_size, int entry_size, int number_of_entries);
// Accessor
int entry_size() const { return _entry_size; }
*** 265,274 ****
--- 268,279 ----
// entries which refer to objects at a lower address than 'boundary'
// are separated from those which refer to objects at higher
// addresses, and appear first in the list.
void reverse(void* boundary = NULL);
+ TableStatistics statistics_calculate(T (*literal_load_barrier)(HashtableEntry<T, F>*) = NULL);
+
protected:
unsigned int compute_hash(Symbol* name) {
return (unsigned int) name->identity_hash();
}
*** 315,334 ****
// Function to move these elements into the new table.
void move_to(RehashableHashtable<T, F>* new_table);
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<ConstantPool*, mtClass>::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:
static juint _seed;
};
--- 320,329 ----
< prev index next >