RFR (M): 8224741: Optimize the scan area during the Scan Heap Roots phase
Thomas Schatzl
thomas.schatzl at oracle.com
Fri May 24 15:31:08 UTC 2019
Hi all,
can I have reviews for this small change based on JDK-8213108 (out
for review right now) that optimizes the scanning of blocks within a
chunk (see comment of g1RemSet.cpp introduced in JDK-8213108) a bit?
It tracks up to which extent (i.e. heap address) G1 already walked the
heap for references during scanning a card block. This can be different
for blocks where the last object is a non-ObjArray that extends beyond
the given block.
If that object is large enough, it might actually cover the next
block(s), allowing G1 to skip some duplicate work completely.
In my testing this did not happen too often, as such large objects seem
pretty seldom (needs to cover at least three cards, and have multiple
dirty cards on it). As another added bonus it makes G1 handle dead
humongous objects with multiple dirty cards (may happen due to stale
remembered set entries) on them a bit more quickly as well.
Overall I could not measure any performance impact, but it seems
useful. Other collectors implement a variant of that too.
The only reason this is a separate CR is because I thought that the
change in JDK-8213108 is large enough already as is, and easier to
understand without.
CR:
https://bugs.openjdk.java.net/browse/JDK-8224741
Webrev:
http://cr.openjdk.java.net/~tschatzl/8224741/webrev/
Testing:
hs-tier1-5, local jtreg gc and gc/g1 testing, perf testing
Thanks,
Thomas
More information about the hotspot-gc-dev
mailing list