--- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/psPromotionManager.cpp Wed Apr 22 10:31:15 2015 +0200
+++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/psPromotionManager.cpp Thu Apr 23 11:26:32 2015 -0400
@@ -365,33 +365,19 @@
// Treat discovered as normal oop, if ref is not "active",
// i.e. if next is non-NULL.
T* next_addr = (T*)java_lang_ref_Reference::next_addr(obj);
- if (ReferenceProcessor::pending_list_uses_discovered_field()) {
- T next_oop = oopDesc::load_heap_oop(next_addr);
- if (!oopDesc::is_null(next_oop)) { // i.e. ref is not "active"
- T* discovered_addr = (T*)java_lang_ref_Reference::discovered_addr(obj);
- debug_only(
- if(TraceReferenceGC && PrintGCDetails) {
- gclog_or_tty->print_cr(" Process discovered as normal "
- PTR_FORMAT, p2i(discovered_addr));
- }
- )
- if (PSScavenge::should_scavenge(discovered_addr)) {
- pm->claim_or_forward_depth(discovered_addr);
+ T next_oop = oopDesc::load_heap_oop(next_addr);
+ if (!oopDesc::is_null(next_oop)) { // i.e. ref is not "active"
+ T* discovered_addr = (T*)java_lang_ref_Reference::discovered_addr(obj);
+ debug_only(
+ if(TraceReferenceGC && PrintGCDetails) {
+ gclog_or_tty->print_cr(" Process discovered as normal "
+ PTR_FORMAT, p2i(discovered_addr));
}
+ )
+ if (PSScavenge::should_scavenge(discovered_addr)) {
+ pm->claim_or_forward_depth(discovered_addr);
}
- } else {
-#ifdef ASSERT
- // In the case of older JDKs which do not use the discovered
- // field for the pending list, an inactive ref (next != NULL)
- // must always have a NULL discovered field.
- oop next = oopDesc::load_decode_heap_oop(next_addr);
- oop discovered = java_lang_ref_Reference::discovered(obj);
- assert(oopDesc::is_null(next) || oopDesc::is_null(discovered),
- err_msg("Found an inactive reference " PTR_FORMAT " with a non-NULL discovered field",
- p2i(obj)));
-#endif
}
-
// Treat next as normal oop; next is a link in the reference queue.
if (PSScavenge::should_scavenge(next_addr)) {
pm->claim_or_forward_depth(next_addr);