< prev index next >

src/hotspot/share/gc/shared/referenceProcessor.cpp

Print this page
rev 51949 : 8211279: Verify missing object equals barriers

*** 282,292 **** assert(oopDesc::is_oop(_current_discovered), "Dropping a bad reference"); RawAccess<>::oop_store(_current_discovered_addr, oop(NULL)); // First _prev_next ref actually points into DiscoveredList (gross). oop new_next; ! if (_next_discovered == _current_discovered) { // At the end of the list, we should make _prev point to itself. // If _ref is the first ref, then _prev_next will be in the DiscoveredList, // and _prev will be NULL. new_next = _prev_discovered; } else { --- 282,292 ---- assert(oopDesc::is_oop(_current_discovered), "Dropping a bad reference"); RawAccess<>::oop_store(_current_discovered_addr, oop(NULL)); // First _prev_next ref actually points into DiscoveredList (gross). oop new_next; ! if (oopDesc::unsafe_equals(_next_discovered, _current_discovered)) { // At the end of the list, we should make _prev point to itself. // If _ref is the first ref, then _prev_next will be in the DiscoveredList, // and _prev will be NULL. new_next = _prev_discovered; } else {
*** 472,482 **** void ReferenceProcessor::clear_discovered_references(DiscoveredList& refs_list) { oop obj = NULL; oop next = refs_list.head(); ! while (next != obj) { obj = next; next = java_lang_ref_Reference::discovered(obj); java_lang_ref_Reference::set_discovered_raw(obj, NULL); } refs_list.clear(); --- 472,482 ---- void ReferenceProcessor::clear_discovered_references(DiscoveredList& refs_list) { oop obj = NULL; oop next = refs_list.head(); ! while (! oopDesc::unsafe_equals(next, obj)) { obj = next; next = java_lang_ref_Reference::discovered(obj); java_lang_ref_Reference::set_discovered_raw(obj, NULL); } refs_list.clear();
*** 744,754 **** } ref_lists[to_idx].set_head(move_head); ref_lists[to_idx].inc_length(refs_to_move); // Remove the chain from the from list. ! if (move_tail == new_head) { // We found the end of the from list. ref_lists[from_idx].set_head(NULL); } else { ref_lists[from_idx].set_head(new_head); } --- 744,754 ---- } ref_lists[to_idx].set_head(move_head); ref_lists[to_idx].inc_length(refs_to_move); // Remove the chain from the from list. ! if (oopDesc::unsafe_equals(move_tail, new_head)) { // We found the end of the from list. ref_lists[from_idx].set_head(NULL); } else { ref_lists[from_idx].set_head(new_head); }
< prev index next >