src/share/vm/gc_implementation/g1/concurrentMark.cpp

Print this page
rev 7147 : 8059758: Startup benchmark performance and footprint regressions with JDK-8038423
Summary: Changes in JDK-8038423 always initialize (zeroes out) virtual memory used for auxiliary data structures. This causes a footprint and performance regression for G1 in startup benchmarks. This is because they do not touch that memory at all, so the operating system does not actually commit these pages. The fix is to, if the initialization value of the data structures matches the default value of just committed memory (=0), do not do anything.
Reviewed-by: tbd

*** 129,139 **** _bm.set_size(_bmWordSize >> _shifter); storage->set_mapping_changed_listener(&_listener); } ! void CMBitMapMappingChangedListener::on_commit(uint start_region, size_t num_regions) { // We need to clear the bitmap on commit, removing any existing information. MemRegion mr(G1CollectedHeap::heap()->bottom_addr_for_region(start_region), num_regions * HeapRegion::GrainWords); _bm->clearRange(mr); } --- 129,142 ---- _bm.set_size(_bmWordSize >> _shifter); storage->set_mapping_changed_listener(&_listener); } ! void CMBitMapMappingChangedListener::on_commit(uint start_region, size_t num_regions, bool zero_filled) { ! if (zero_filled) { ! return; ! } // We need to clear the bitmap on commit, removing any existing information. MemRegion mr(G1CollectedHeap::heap()->bottom_addr_for_region(start_region), num_regions * HeapRegion::GrainWords); _bm->clearRange(mr); }