8214784: Adjust Dictionary and JNIHandle verification

Reviewed-by: coleenp, eosterlund
This commit is contained in:
Per Lidén 2018-12-05 17:11:19 +01:00
parent afdb850f87
commit bfbeb1fe9e
2 changed files with 3 additions and 7 deletions

View File

@ -173,7 +173,7 @@ class DictionaryEntry : public HashtableEntry<InstanceKlass*, mtClass> {
for (ProtectionDomainEntry* current = pd_set(); // accessed at a safepoint
current != NULL;
current = current->_next) {
oopDesc::verify(current->_pd_cache->object_no_keepalive());
guarantee(oopDesc::is_oop(current->_pd_cache->object_no_keepalive()), "Invalid oop");
}
}

View File

@ -318,7 +318,7 @@ void JNIHandles::print_on(outputStream* st) {
class VerifyJNIHandles: public OopClosure {
public:
virtual void do_oop(oop* root) {
oopDesc::verify(*root);
guarantee(oopDesc::is_oop(RawAccess<>::oop_load(root)), "Invalid oop");
}
virtual void do_oop(narrowOop* root) { ShouldNotReachHere(); }
};
@ -327,11 +327,7 @@ void JNIHandles::verify() {
VerifyJNIHandles verify_handle;
oops_do(&verify_handle);
// JNI weaks are handled concurrently in ZGC, so they can't be verified here
if (!UseZGC) {
weak_oops_do(&verify_handle);
}
weak_oops_do(&verify_handle);
}
// This method is implemented here to avoid circular includes between