RFR: JDK-8267562: G1: Missing BOT in Open Archive regions causes long pauses

Jiangli Zhou jiangli at openjdk.java.net
Mon May 31 04:16:30 UTC 2021


Populate G1BlockOffsetTableParts and associated G1BlockOffsetTable::_offset_array entries for 'open' archive regions during VM initialization at runtime.

G1BlockOffsetTable divides the covered space (Java heap) into “N”-word subregions (“N” is from 2^”LogN”). It uses an _offset_array to tell how far back it must go to find the start of a block that contains the first word of a subregion. Every G1 region (is a G1ContiguousSpace) owns a G1BlockOffsetTablePart (associates to part of the _offset_array), which covers space of the current region. For a mapped open archive heap region with pre-populated Java objects, its G1BlockOffsetTablePart is never setup at runtime because there is no allocation done within the region. As a result, G1BlockOffsetTablePart::block_start() always does lookup from the start (bottom) of an open archive region when called at runtime, regardless if the given 'addr' is near the bottom, top or in the middle of the region. The lookup becomes linear, instead of O(2^LogN). Large heap region size makes the situation worse and young-gen pauses longer.

Removed G1FullGCPrepareTask::G1CalculatePointersClosure::update_bot. G1BlockOffsetTablePart::update provides the same functionality and can be used for for Survivor-turned-to-Old regions in full gc (introduced by JDK-8264987 change, https://github.com/openjdk/jdk/pull/3459) and open archive region. 

Tested with tier1 and hotspot_gc tests on linux_x86. Appreciate any help for testing other platforms and more tiers. Thanks!

-------------

Commit messages:
 - Fixed JDK-8267562

Changes: https://git.openjdk.java.net/jdk/pull/4265/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=4265&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8267562
  Stats: 70 lines in 8 files changed: 52 ins; 17 del; 1 mod
  Patch: https://git.openjdk.java.net/jdk/pull/4265.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/4265/head:pull/4265

PR: https://git.openjdk.java.net/jdk/pull/4265



More information about the hotspot-gc-dev mailing list