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

Jiangli Zhou jiangli at openjdk.java.net
Tue Jun 1 16:54:41 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 (introduced by JDK-8264987 change, https://github.com/openjdk/jdk/pull/3459). It's merged as G1BlockOffsetTablePart::update, which is used for Survivor-turned-to-Old regions in full gc and open archive region. Thanks Thomas Schatzl  for pointing to JDK-8264987 change for code reuse.
> Tested with tier1 and hotspot_gc tests on linux_x86. Appreciate any help for testing other platforms and more tiers. Thanks!

Jiangli Zhou has updated the pull request incrementally with one additional commit since the last revision:

  Incorporated comment suggestion from Thomas.


  - all: https://git.openjdk.java.net/jdk/pull/4265/files
  - new: https://git.openjdk.java.net/jdk/pull/4265/files/0ab6edc7..f0fdc24b

 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=4265&range=02
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=4265&range=01-02

  Stats: 4 lines in 1 file changed: 2 ins; 0 del; 2 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