RFR: 8353115: GenShen: mixed evacuation candidate regions need accurate live_data [v9]

Kelvin Nilsen kdnilsen at openjdk.org
Tue Sep 23 14:51:28 UTC 2025


On Tue, 16 Sep 2025 21:29:34 GMT, Kelvin Nilsen <kdnilsen at openjdk.org> wrote:

>> The existing implementation of get_live_data_bytes() and git_live_data_words() does not always behave as might be expected.  In particular, the value returned ignores any allocations that occur subsequent to the most recent mark effort that identified live data within the region.  This is typically ok for young regions, where the amount of live data determines whether a region should be added to the collection set during the final-mark safepoint.
>> 
>> However, old-gen regions that are placed into the set of candidates for mixed evacuation are more complicated.  In particular, by the time the old-gen region is added to a mixed evacuation, its live data may be much larger than at the time concurrent old marking ended.
>> 
>> This PR provides comments to clarify the shortcomings of the existing functions, and adds new functions that provide more accurate accountings of live data for mixed-evacuation candidate regions.
>
> Kelvin Nilsen has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Fix compilation errors after merge

CI data collected over several days of runs shows slight improvement or neutral impact on metrics:

Sept. 16, 2025:

   Control: openjdk-master-aarch64
Experiment: fix-live-data-for-mixed-evac-candidates-gh-aarch64


Genshen
-------------------------------------------------------------------------------------------------------
-19.76% kafka/dacapo_simple_latency_min p=0.00321
  Control:    478.000us (+/- 66.09us)         70
  Test:       399.125us (+/- 96.26us)         10

-12.10% avrora/shenandoahinitmark_stopped p=0.00001
  Control:      0.052ms (+/-  0.01ms)        296
  Test:         0.047ms (+/-  0.01ms)         44

-11.57% specjbb2015_weak_ref_patch/prepare_young p=0.00012
  Control:      1.602ms (+/-107.15us)         45
  Test:         1.436ms (+/- 97.24us)          6

-11.15% specjbb2015_weak_ref_patch/update_roots_young p=0.00021
  Control:      1.559ms (+/-106.96us)         45
  Test:         1.403ms (+/- 95.82us)          6


Shenandoah
-------------------------------------------------------------------------------------------------------
-15.40% serial/cleanclassloaderdatametaspaces_stopped p=0.00236
  Control:      0.110ms (+/-  0.01ms)         70
  Test:         0.096ms (+/-  0.01ms)         10

Sept. 18, 2025:

   Control: openjdk-master-aarch64
Experiment: fix-live-data-for-mixed-evac-candidates-gh-aarch64


Genshen
-------------------------------------------------------------------------------------------------------
-54.93% reactors/shenandoah_old_gen_used p=0.00069
  Control: 7168817.375   (+/-2595408.39  )         80
  Test:    4627212.500   (+/-1664542.48  )         20

-16.67% dotty/shenandoah_old_gen_used p=0.00325
  Control: 16102164.875   (+/-2840080.53  )         80
  Test:    13801402.000   (+/-2233823.94  )         20

-12.42% specjbb2015_weak_ref_patch/fu_thread_roots_young p=0.00088
  Control:      1.649ms (+/-177.28us)         50
  Test:         1.467ms (+/-157.40us)         13

-11.12% kafka/dacapo_simple_latency_min p=0.00435
  Control:    483.453us (+/- 58.27us)         80
  Test:       435.062us (+/- 82.07us)         20


Shenandoah
-------------------------------------------------------------------------------------------------------
-13.50% serial/cleanclassloaderdatametaspaces_stopped p=0.00023
  Control:      0.111ms (+/-  0.01ms)         80
  Test:         0.098ms (+/-  0.01ms)         20


Sept. 19, 2025:

   Control: openjdk-master-x86_64
Experiment: fix-live-data-for-mixed-evac-candidates-gh-x86


Genshen
-------------------------------------------------------------------------------------------------------
+22.88% spring/dacapo_metered_latency_max p=0.00553
  Control:     57.031ms (+/- 17.50ms)        100
  Test:        70.081ms (+/- 14.02ms)         20

-60.91% reactors/shenandoah_old_gen_used p=0.00002
  Control: 7445668.600   (+/-2417060.62  )        100
  Test:    4627212.500   (+/-1664542.48  )         20

-16.80% dotty/shenandoah_old_gen_used p=0.00223
  Control: 16119749.300   (+/-2805728.19  )        100
  Test:    13801402.000   (+/-2233823.94  )         20

-11.45% specjbb2015_weak_ref_patch/fu_thread_roots_young p=0.00026
  Control:      1.635ms (+/-159.88us)         75
  Test:         1.467ms (+/-157.40us)         13


Shenandoah
-------------------------------------------------------------------------------------------------------
-13.07% serial/cleanclassloaderdatametaspaces_stopped p=0.00029
  Control:      0.110ms (+/-  0.01ms)        100
  Test:         0.098ms (+/-  0.01ms)         20

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

PR Comment: https://git.openjdk.org/jdk/pull/24319#issuecomment-3324353923


More information about the hotspot-gc-dev mailing list