--- old/src/hotspot/share/classfile/dictionary.hpp 2017-11-01 11:21:38.000000000 -0500 +++ new/src/hotspot/share/classfile/dictionary.hpp 2017-11-01 11:21:37.000000000 -0500 @@ -43,6 +43,11 @@ class Dictionary : public Hashtable { friend class VMStructs; + static bool _some_dictionary_needs_resizing; + bool _resizable; + bool _needs_resizing; + void check_if_needs_resize(); + ClassLoaderData* _loader_data; // backpointer to owning loader ClassLoaderData* loader_data() const { return _loader_data; } @@ -51,13 +56,16 @@ protected: static size_t entry_size(); public: - Dictionary(ClassLoaderData* loader_data, int table_size); - Dictionary(ClassLoaderData* loader_data, int table_size, HashtableBucket* t, int number_of_entries); + Dictionary(ClassLoaderData* loader_data, int table_size, bool resizable = false); + Dictionary(ClassLoaderData* loader_data, int table_size, HashtableBucket* t, int number_of_entries, bool resizable = false); ~Dictionary(); + static bool does_any_dictionary_needs_resizing(); + bool resize_if_needed(); + DictionaryEntry* new_entry(unsigned int hash, InstanceKlass* klass); - void add_klass(int index, unsigned int hash, Symbol* class_name, InstanceKlass* obj); + void add_klass(unsigned int hash, Symbol* class_name, InstanceKlass* obj); InstanceKlass* find_class(int index, unsigned int hash, Symbol* name); @@ -79,8 +87,8 @@ void do_unloading(); // Protection domains - InstanceKlass* find(int index, unsigned int hash, Symbol* name, Handle protection_domain); - bool is_valid_protection_domain(int index, unsigned int hash, + InstanceKlass* find(unsigned int hash, Symbol* name, Handle protection_domain); + bool is_valid_protection_domain(unsigned int hash, Symbol* name, Handle protection_domain); void add_protection_domain(int index, unsigned int hash,