--- old/src/hotspot/share/gc/g1/g1CollectedHeap.cpp 2018-10-18 18:01:51.000000000 -0400 +++ new/src/hotspot/share/gc/g1/g1CollectedHeap.cpp 2018-10-18 18:01:51.000000000 -0400 @@ -644,7 +644,7 @@ curr_region->set_closed_archive(); } _hr_printer.alloc(curr_region); - _archive_set.add(curr_region); + archive_set_add(curr_region); HeapWord* top; HeapRegion* next_region; if (curr_region != last_region) { @@ -1606,7 +1606,6 @@ os::enable_vtime(); // Necessary to satisfy locking discipline assertions. - MutexLocker x(Heap_lock); // While there are no constraints in the GC code that HeapWordSize @@ -1833,6 +1832,9 @@ } void G1CollectedHeap::post_initialize() { + // Necessary to satisfy locking discipline assertions. + MutexLockerEx x(Heap_lock); + CollectedHeap::post_initialize(); ref_processing_init(); } @@ -2899,9 +2901,7 @@ active_workers = workers()->update_active_workers(active_workers); log_info(gc,task)("Using %u workers of %u for evacuation", active_workers, workers()->total_workers()); - G1MonitoringScope ms(g1mm(), - false /* full_gc */, - collector_state()->yc_type() == Mixed /* all_memory_pools_affected */); + G1MonitoringScope ms(g1mm(), false /* full_gc */, collector_state()->yc_type() == Mixed /* mixed_gc */); G1HeapTransition heap_transition(this); size_t heap_used_bytes_before_gc = used();