--- a/src/hotspot/share/classfile/dictionary.hpp Thu Feb 28 22:11:46 2019 +0100
+++ b/src/hotspot/share/classfile/dictionary.hpp Thu Feb 28 16:30:31 2019 -0500
@@ -59,8 +59,6 @@
static bool does_any_dictionary_needs_resizing();
bool resize_if_needed();
- DictionaryEntry* new_entry(unsigned int hash, InstanceKlass* klass);
-
void add_klass(unsigned int hash, Symbol* class_name, InstanceKlass* obj);
InstanceKlass* find_class(int index, unsigned int hash, Symbol* name);
@@ -70,7 +68,7 @@
void all_entries_do(KlassClosure* closure);
void classes_do(MetaspaceClosure* it);
- void unlink();
+ void clean_cached_protection_domains();
// Protection domains
InstanceKlass* find(unsigned int hash, Symbol* name, Handle protection_domain);
@@ -83,6 +81,10 @@
void print_on(outputStream* st) const;
void verify();
+
+ private:
+ DictionaryEntry* new_entry(unsigned int hash, InstanceKlass* klass);
+
DictionaryEntry* bucket(int i) const {
return (DictionaryEntry*)Hashtable<InstanceKlass*, mtClass>::bucket(i);
}
@@ -151,9 +153,6 @@
ProtectionDomainEntry* pd_set() const { return _pd_set; }
void set_pd_set(ProtectionDomainEntry* new_head) { _pd_set = new_head; }
- ProtectionDomainEntry* pd_set_acquire() const;
- void release_set_pd_set(ProtectionDomainEntry* new_head);
-
// Tells whether the initiating class' protection domain can access the klass in this entry
bool is_valid_protection_domain(Handle protection_domain) {
if (!ProtectionDomainVerification) return true;
@@ -164,29 +163,14 @@
: contains_protection_domain(protection_domain());
}
- void verify_protection_domain_set() {
- for (ProtectionDomainEntry* current = pd_set(); // accessed at a safepoint
- current != NULL;
- current = current->_next) {
- guarantee(oopDesc::is_oop_or_null(current->_pd_cache->object_no_keepalive()), "Invalid oop");
- }
- }
+ void verify_protection_domain_set();
bool equals(const Symbol* class_name) const {
InstanceKlass* klass = (InstanceKlass*)literal();
return (klass->name() == class_name);
}
- void print_count(outputStream *st) {
- int count = 0;
- for (ProtectionDomainEntry* current = pd_set(); // accessed inside SD lock
- current != NULL;
- current = current->_next) {
- count++;
- }
- st->print_cr("pd set count = #%d", count);
- }
-
+ void print_count(outputStream *st);
void verify();
};