RFR: 8358735: GenShen: bug in #undef'd code in block_start()

Kelvin Nilsen kdnilsen at openjdk.org
Fri Sep 26 10:23:14 UTC 2025


On Wed, 17 Sep 2025 20:12:49 GMT, Kelvin Nilsen <kdnilsen at openjdk.org> wrote:

> When scanning a range of dirty cards within the GenShen remembered set, we need to find the object that spans the beginning of the left-most dirty card.  The existing code is not reliable following class unloading.
> 
> The new code uses the marking context when it is available to determine the location of live objects that reside below TAMS within each region.  Above TAMS, all objects are presumed live and parsable.

/author: ysramakrishna

Have confirmed with several hundred runs that this fixes the error typically observed within 100 runs on master.

Reproducer:

~/github/jdk.finish-block-start/build/linux-x86_64-server-fastdebug/jdk/bin/java \
  -XX:+PrintFlagsFinal -XX:-UseCompressedOops \
  -XX:-UseCompressedClassPointers -XX:+AlwaysPreTouch  -Xms10g -Xmx10g \
  -XX:+UseShenandoahGC -XX:ShenandoahGCMode=generational \
  -XX:+UnlockExperimentalVMOptions -XX:+UnlockDiagnosticVMOptions \
  -XX:-ShenandoahUncommit -XX:+ShenandoahVerify -XX:+ShenandoahAllocFailureALot -XX:+UseStringDeduplication \
  -Xlog:async -Xlog:"gc*=info,safepoint*=info,handshake*=info"  \
  -jar  ~/lib/dacapo-23.11-chopin.jar --scratch-directory ./tmp/dacapo-scratch/tomcat \
  --no-validation --iterations 5 --log-directory ./tmp/dacapo-log/tomcat tomcat \
  > trial.$COUNT.out 2>trial.$COUNT.err

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

PR Comment: https://git.openjdk.org/jdk/pull/27353#issuecomment-3304431762
PR Comment: https://git.openjdk.org/jdk/pull/27353#issuecomment-3337947338


More information about the hotspot-gc-dev mailing list