src/share/vm/gc_implementation/g1/g1CardCounts.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

*** 31,41 **** #include "services/memTracker.hpp" #include "utilities/copy.hpp" PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC ! void G1CardCountsMappingChangedListener::on_commit(uint start_idx, size_t num_regions) { MemRegion mr(G1CollectedHeap::heap()->bottom_addr_for_region(start_idx), num_regions * HeapRegion::GrainWords); _counts->clear_range(mr); } void G1CardCounts::clear_range(size_t from_card_num, size_t to_card_num) { --- 31,44 ---- #include "services/memTracker.hpp" #include "utilities/copy.hpp" PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC ! void G1CardCountsMappingChangedListener::on_commit(uint start_idx, size_t num_regions, bool zero_filled) { ! if (zero_filled) { ! return; ! } MemRegion mr(G1CollectedHeap::heap()->bottom_addr_for_region(start_idx), num_regions * HeapRegion::GrainWords); _counts->clear_range(mr); } void G1CardCounts::clear_range(size_t from_card_num, size_t to_card_num) {