--- old/src/hotspot/share/gc/g1/g1CollectedHeap.cpp 2018-04-10 14:21:49.094795775 +0200 +++ new/src/hotspot/share/gc/g1/g1CollectedHeap.cpp 2018-04-10 14:21:48.821787457 +0200 @@ -2839,11 +2839,7 @@ // reference processing currently works in G1. // Enable discovery in the STW reference processor - if (g1_policy()->should_process_references()) { - ref_processor_stw()->enable_discovery(); - } else { - ref_processor_stw()->disable_discovery(); - } + ref_processor_stw()->enable_discovery(); { // We want to temporarily turn off discovery by the @@ -4190,12 +4186,8 @@ // as we may have to copy some 'reachable' referent // objects (and their reachable sub-graphs) that were // not copied during the pause. - if (g1_policy()->should_process_references()) { - preserve_cm_referents(per_thread_states); - process_discovered_references(per_thread_states); - } else { - ref_processor_stw()->verify_no_references_recorded(); - } + preserve_cm_referents(per_thread_states); + process_discovered_references(per_thread_states); G1STWIsAliveClosure is_alive(this); G1KeepAliveClosure keep_alive(this); @@ -4238,11 +4230,7 @@ // will log these updates (and dirty their associated // cards). We need these updates logged to update any // RSets. - if (g1_policy()->should_process_references()) { - enqueue_discovered_references(per_thread_states); - } else { - g1_policy()->phase_times()->record_ref_enq_time(0); - } + enqueue_discovered_references(per_thread_states); _allocator->release_gc_alloc_regions(evacuation_info);