4051 (os::elapsedTime() - end_par_time_sec) * 1000.0; |
4051 (os::elapsedTime() - end_par_time_sec) * 1000.0; |
4052 phase_times->record_code_root_fixup_time(code_root_fixup_time_ms); |
4052 phase_times->record_code_root_fixup_time(code_root_fixup_time_ms); |
4053 } |
4053 } |
4054 |
4054 |
4055 void G1CollectedHeap::post_evacuate_collection_set(EvacuationInfo& evacuation_info, G1ParScanThreadStateSet* per_thread_states) { |
4055 void G1CollectedHeap::post_evacuate_collection_set(EvacuationInfo& evacuation_info, G1ParScanThreadStateSet* per_thread_states) { |
|
4056 // Also cleans the card table from temporary duplicate detection information used |
|
4057 // during UpdateRS/ScanRS. |
|
4058 g1_rem_set()->cleanup_after_oops_into_collection_set_do(); |
|
4059 |
4056 // Process any discovered reference objects - we have |
4060 // Process any discovered reference objects - we have |
4057 // to do this _before_ we retire the GC alloc regions |
4061 // to do this _before_ we retire the GC alloc regions |
4058 // as we may have to copy some 'reachable' referent |
4062 // as we may have to copy some 'reachable' referent |
4059 // objects (and their reachable sub-graphs) that were |
4063 // objects (and their reachable sub-graphs) that were |
4060 // not copied during the pause. |
4064 // not copied during the pause. |
4061 process_discovered_references(per_thread_states); |
4065 process_discovered_references(per_thread_states); |
|
4066 enqueue_discovered_references(per_thread_states); |
4062 |
4067 |
4063 G1STWIsAliveClosure is_alive(this); |
4068 G1STWIsAliveClosure is_alive(this); |
4064 G1KeepAliveClosure keep_alive(this); |
4069 G1KeepAliveClosure keep_alive(this); |
4065 |
4070 |
4066 { |
4071 { |
4078 G1StringDedup::unlink_or_oops_do(&is_alive, &keep_alive, true, g1_policy()->phase_times()); |
4083 G1StringDedup::unlink_or_oops_do(&is_alive, &keep_alive, true, g1_policy()->phase_times()); |
4079 |
4084 |
4080 double fixup_time_ms = (os::elapsedTime() - fixup_start) * 1000.0; |
4085 double fixup_time_ms = (os::elapsedTime() - fixup_start) * 1000.0; |
4081 g1_policy()->phase_times()->record_string_dedup_fixup_time(fixup_time_ms); |
4086 g1_policy()->phase_times()->record_string_dedup_fixup_time(fixup_time_ms); |
4082 } |
4087 } |
4083 |
|
4084 g1_rem_set()->cleanup_after_oops_into_collection_set_do(); |
|
4085 |
4088 |
4086 if (evacuation_failed()) { |
4089 if (evacuation_failed()) { |
4087 restore_after_evac_failure(); |
4090 restore_after_evac_failure(); |
4088 |
4091 |
4089 // Reset the G1EvacuationFailureALot counters and flags |
4092 // Reset the G1EvacuationFailureALot counters and flags |
4091 // evacuation failure occurs. |
4094 // evacuation failure occurs. |
4092 NOT_PRODUCT(reset_evacuation_should_fail();) |
4095 NOT_PRODUCT(reset_evacuation_should_fail();) |
4093 } |
4096 } |
4094 |
4097 |
4095 _preserved_marks_set.assert_empty(); |
4098 _preserved_marks_set.assert_empty(); |
4096 |
|
4097 // Enqueue any remaining references remaining on the STW |
|
4098 // reference processor's discovered lists. We need to do |
|
4099 // this after the card table is cleaned (and verified) as |
|
4100 // the act of enqueueing entries on to the pending list |
|
4101 // will log these updates (and dirty their associated |
|
4102 // cards). We need these updates logged to update any |
|
4103 // RSets. |
|
4104 enqueue_discovered_references(per_thread_states); |
|
4105 |
4099 |
4106 _allocator->release_gc_alloc_regions(evacuation_info); |
4100 _allocator->release_gc_alloc_regions(evacuation_info); |
4107 |
4101 |
4108 merge_per_thread_state_info(per_thread_states); |
4102 merge_per_thread_state_info(per_thread_states); |
4109 |
4103 |