8065358: Refactor G1s usage of save_marks and reduce related races

Stop using save_marks in G1 related code and make setting the replacement field less racy.

Reviewed-by: brutisso, tschatzl
This commit is contained in:
Mikael Gerdin 2014-11-26 10:53:31 +01:00
parent d65f3c41b7
commit b5ef32af36
5 changed files with 54 additions and 50 deletions

View file

@ -6530,7 +6530,7 @@ HeapRegion* G1CollectedHeap::new_gc_alloc_region(size_t word_size,
// We really only need to do this for old regions given that we
// should never scan survivors. But it doesn't hurt to do it
// for survivors too.
new_alloc_region->record_top_and_timestamp();
new_alloc_region->record_timestamp();
if (survivor) {
new_alloc_region->set_survivor();
_hr_printer.alloc(new_alloc_region, G1HRPrinter::Survivor);