4490
4491 void G1CollectedHeap::post_evacuate_collection_set(EvacuationInfo& evacuation_info, G1ParScanThreadStateSet* per_thread_states) {
4492 // Process any discovered reference objects - we have
4493 // to do this _before_ we retire the GC alloc regions
4494 // as we may have to copy some 'reachable' referent
4495 // objects (and their reachable sub-graphs) that were
4496 // not copied during the pause.
4497 if (g1_policy()->should_process_references()) {
4498 preserve_cm_referents(per_thread_states);
4499 process_discovered_references(per_thread_states);
4500 } else {
4501 ref_processor_stw()->verify_no_references_recorded();
4502 process_weak_jni_handles();
4503 }
4504
4505 if (G1StringDedup::is_enabled()) {
4506 double fixup_start = os::elapsedTime();
4507
4508 G1STWIsAliveClosure is_alive(this);
4509 G1KeepAliveClosure keep_alive(this);
4510 G1StringDedup::unlink_or_oops_do(&is_alive, &keep_alive, true, g1_policy()->phase_times());
4511
4512 double fixup_time_ms = (os::elapsedTime() - fixup_start) * 1000.0;
4513 g1_policy()->phase_times()->record_string_dedup_fixup_time(fixup_time_ms);
4514 }
4515
4516 g1_rem_set()->cleanup_after_oops_into_collection_set_do();
4517
4518 if (evacuation_failed()) {
4519 restore_after_evac_failure();
4520
4521 // Reset the G1EvacuationFailureALot counters and flags
4522 // Note: the values are reset only when an actual
4523 // evacuation failure occurs.
4524 NOT_PRODUCT(reset_evacuation_should_fail();)
4525 }
4526
4527 _preserved_marks_set.assert_empty();
4528
4529 // Enqueue any remaining references remaining on the STW
|
4490
4491 void G1CollectedHeap::post_evacuate_collection_set(EvacuationInfo& evacuation_info, G1ParScanThreadStateSet* per_thread_states) {
4492 // Process any discovered reference objects - we have
4493 // to do this _before_ we retire the GC alloc regions
4494 // as we may have to copy some 'reachable' referent
4495 // objects (and their reachable sub-graphs) that were
4496 // not copied during the pause.
4497 if (g1_policy()->should_process_references()) {
4498 preserve_cm_referents(per_thread_states);
4499 process_discovered_references(per_thread_states);
4500 } else {
4501 ref_processor_stw()->verify_no_references_recorded();
4502 process_weak_jni_handles();
4503 }
4504
4505 if (G1StringDedup::is_enabled()) {
4506 double fixup_start = os::elapsedTime();
4507
4508 G1STWIsAliveClosure is_alive(this);
4509 G1KeepAliveClosure keep_alive(this);
4510 HeapMonitoring::do_weak_oops(NULL, &is_alive, &keep_alive, NULL);
4511 G1StringDedup::unlink_or_oops_do(&is_alive, &keep_alive, true, g1_policy()->phase_times());
4512
4513 double fixup_time_ms = (os::elapsedTime() - fixup_start) * 1000.0;
4514 g1_policy()->phase_times()->record_string_dedup_fixup_time(fixup_time_ms);
4515 }
4516
4517 g1_rem_set()->cleanup_after_oops_into_collection_set_do();
4518
4519 if (evacuation_failed()) {
4520 restore_after_evac_failure();
4521
4522 // Reset the G1EvacuationFailureALot counters and flags
4523 // Note: the values are reset only when an actual
4524 // evacuation failure occurs.
4525 NOT_PRODUCT(reset_evacuation_should_fail();)
4526 }
4527
4528 _preserved_marks_set.assert_empty();
4529
4530 // Enqueue any remaining references remaining on the STW
|