8210463: Recalculate_used() always sets time taken in G1GCPhaseTimes
Reviewed-by: phh, sjohanss
This commit is contained in:
parent
694380add3
commit
093c837c85
@ -1950,12 +1950,8 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
size_t G1CollectedHeap::recalculate_used() const {
|
size_t G1CollectedHeap::recalculate_used() const {
|
||||||
double recalculate_used_start = os::elapsedTime();
|
|
||||||
|
|
||||||
SumUsedClosure blk;
|
SumUsedClosure blk;
|
||||||
heap_region_iterate(&blk);
|
heap_region_iterate(&blk);
|
||||||
|
|
||||||
g1_policy()->phase_times()->record_evac_fail_recalc_used_time((os::elapsedTime() - recalculate_used_start) * 1000.0);
|
|
||||||
return blk.result();
|
return blk.result();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3013,7 +3009,10 @@ G1CollectedHeap::do_collection_pause_at_safepoint(double target_pause_time_ms) {
|
|||||||
g1_policy()->phase_times()->record_start_new_cset_time_ms((os::elapsedTime() - start) * 1000.0);
|
g1_policy()->phase_times()->record_start_new_cset_time_ms((os::elapsedTime() - start) * 1000.0);
|
||||||
|
|
||||||
if (evacuation_failed()) {
|
if (evacuation_failed()) {
|
||||||
|
double recalculate_used_start = os::elapsedTime();
|
||||||
set_used(recalculate_used());
|
set_used(recalculate_used());
|
||||||
|
g1_policy()->phase_times()->record_evac_fail_recalc_used_time((os::elapsedTime() - recalculate_used_start) * 1000.0);
|
||||||
|
|
||||||
if (_archive_allocator != NULL) {
|
if (_archive_allocator != NULL) {
|
||||||
_archive_allocator->clear_used();
|
_archive_allocator->clear_used();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user