< prev index next >
src/hotspot/share/classfile/protectionDomainCache.cpp
Print this page
rev 48467 : [mq]: INIT_Access_protection_domain
*** 94,103 ****
--- 94,122 ----
void ProtectionDomainCacheTable::verify() {
verify_table<ProtectionDomainCacheEntry>("Protection Domain Table");
}
+ oop ProtectionDomainCacheEntry::object() {
+ return RootAccess<ON_PHANTOM_OOP_REF>::oop_load(literal_addr());
+ }
+
+ oop ProtectionDomainEntry::object() {
+ return _pd_cache->object();
+ }
+
+ // The object_no_keepalive() calls peeks at the phantomly reachable oop without
+ // keeping it alive. This is okay to do in the VM thread state if it is not
+ // leaked out to become strongly reachable.
+ oop ProtectionDomainCacheEntry::object_no_keepalive() {
+ return RootAccess<ON_PHANTOM_OOP_REF | AS_NO_KEEPALIVE>::oop_load(literal_addr());
+ }
+
+ oop ProtectionDomainEntry::object_no_keepalive() {
+ return _pd_cache->object_no_keepalive();
+ }
+
void ProtectionDomainCacheEntry::verify() {
guarantee(oopDesc::is_oop(literal()), "must be an oop");
}
ProtectionDomainCacheEntry* ProtectionDomainCacheTable::get(Handle protection_domain) {
*** 111,121 ****
return entry;
}
ProtectionDomainCacheEntry* ProtectionDomainCacheTable::find_entry(int index, Handle protection_domain) {
for (ProtectionDomainCacheEntry* e = bucket(index); e != NULL; e = e->next()) {
! if (e->protection_domain() == protection_domain()) {
return e;
}
}
return NULL;
--- 130,140 ----
return entry;
}
ProtectionDomainCacheEntry* ProtectionDomainCacheTable::find_entry(int index, Handle protection_domain) {
for (ProtectionDomainCacheEntry* e = bucket(index); e != NULL; e = e->next()) {
! if (e->object_no_keepalive() == protection_domain()) {
return e;
}
}
return NULL;
< prev index next >