6604422: G1: re-use half-promoted regions

6728271: G1: Cleanup G1CollectedHeap::get_gc_alloc_regions()

It allows the last half-full region to be allocated to during a GC to be reused during the next GC.

Reviewed-by: apetrusenko, jcoomes
This commit is contained in:
Antonios Printezis 2009-03-15 22:03:38 -04:00
parent 21b3d4aea0
commit ecdb99412d
3 changed files with 126 additions and 24 deletions

View file

@ -1087,6 +1087,7 @@ void G1CollectorPolicy::record_collection_pause_start(double start_time_sec,
assert(_g1->used_regions() == _g1->recalculate_used_regions(),
"sanity");
assert(_g1->used() == _g1->recalculate_used(), "sanity");
double s_w_t_ms = (start_time_sec - _stop_world_start) * 1000.0;
_all_stop_world_times_ms->add(s_w_t_ms);