--- old/src/hotspot/share/gc/g1/g1Allocator.cpp 2018-04-23 13:45:27.260256220 +0200 +++ new/src/hotspot/share/gc/g1/g1Allocator.cpp 2018-04-23 13:45:26.860240441 +0200 @@ -157,14 +157,7 @@ size_t G1Allocator::used_in_alloc_regions() { assert(Heap_lock->owner() != NULL, "Should be owned on this thread's behalf."); - size_t result = 0; - - // Read only once in case it is set to NULL concurrently - HeapRegion* hr = mutator_alloc_region()->get(); - if (hr != NULL) { - result += hr->used(); - } - return result; + return mutator_alloc_region()->used_in_alloc_regions(); }