comparison src/share/vm/oops/instanceRefKlass.cpp @ 6008:b632e80fc9dc

4988100: oop_verify_old_oop appears to be dead Summary: removed oop_verify_old_oop and allow_dirty. Also reviewed by: alexlamsl@gmail.com Reviewed-by: jmasa, jwilhelm
author brutisso
date Mon, 16 Apr 2012 08:57:18 +0200
parents f94227b6117b
children c52a6a39546c
comparison
equal deleted inserted replaced
6007:5c86f8211d1e 6008:b632e80fc9dc
1 /* 1 /*
2 * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
495 if (Universe::heap()->kind() == CollectedHeap::GenCollectedHeap) 495 if (Universe::heap()->kind() == CollectedHeap::GenCollectedHeap)
496 gch = GenCollectedHeap::heap(); 496 gch = GenCollectedHeap::heap();
497 497
498 if (referent != NULL) { 498 if (referent != NULL) {
499 guarantee(referent->is_oop(), "referent field heap failed"); 499 guarantee(referent->is_oop(), "referent field heap failed");
500 if (gch != NULL && !gch->is_in_young(obj)) {
501 // We do a specific remembered set check here since the referent
502 // field is not part of the oop mask and therefore skipped by the
503 // regular verify code.
504 if (UseCompressedOops) {
505 narrowOop* referent_addr = (narrowOop*)java_lang_ref_Reference::referent_addr(obj);
506 obj->verify_old_oop(referent_addr, true);
507 } else {
508 oop* referent_addr = (oop*)java_lang_ref_Reference::referent_addr(obj);
509 obj->verify_old_oop(referent_addr, true);
510 }
511 }
512 } 500 }
513 // Verify next field 501 // Verify next field
514 oop next = java_lang_ref_Reference::next(obj); 502 oop next = java_lang_ref_Reference::next(obj);
515 if (next != NULL) { 503 if (next != NULL) {
516 guarantee(next->is_oop(), "next field verify failed"); 504 guarantee(next->is_oop(), "next field verify failed");
517 guarantee(next->is_instanceRef(), "next field verify failed"); 505 guarantee(next->is_instanceRef(), "next field verify failed");
518 if (gch != NULL && !gch->is_in_young(obj)) {
519 // We do a specific remembered set check here since the next field is
520 // not part of the oop mask and therefore skipped by the regular
521 // verify code.
522 if (UseCompressedOops) {
523 narrowOop* next_addr = (narrowOop*)java_lang_ref_Reference::next_addr(obj);
524 obj->verify_old_oop(next_addr, true);
525 } else {
526 oop* next_addr = (oop*)java_lang_ref_Reference::next_addr(obj);
527 obj->verify_old_oop(next_addr, true);
528 }
529 }
530 } 506 }
531 } 507 }
532 508
533 bool instanceRefKlass::owns_pending_list_lock(JavaThread* thread) { 509 bool instanceRefKlass::owns_pending_list_lock(JavaThread* thread) {
534 if (java_lang_ref_Reference::pending_list_lock() == NULL) return false; 510 if (java_lang_ref_Reference::pending_list_lock() == NULL) return false;