RFR: Refactor budgeting to make the logic cleaner [v4]

Kelvin Nilsen kdnilsen at openjdk.org
Wed Jul 13 15:55:56 UTC 2022


> This commit consolidates computations related to budgeting of reserves for old-gen evacuation and old-gen promotion within shenandoahGeneration::prepare_regions_and_collection_set().  Previously, these computations had been scattered between several functional units, including shenandoahHeuristics::choose_collection_set() and shenandoahOldHeuristics::prime_collection_set().  A previous pull request brought some of the redundant functionality into prepare_regions_and_collection_set().  This pull request removes the redundant computations from the other locations.

Kelvin Nilsen has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 15 commits:

 - Merge master
 - Fix typo in on-line documentation
 - Fixup traditional Shennadoah performance regressions
   
   1. Since young-gen is currently used in some contexts as another name
      for the GLOBAL generation (may fix this later), fix the size of
      young-generation when we are in non-generational mode.
   
   2. Restore a heuristic that allows regions smaller than the
      min-threshold to be added into the collection set.
 - Fix size of traditional Shenandoah GLOBAL generation
 - Remove instrumentation
 - Only check preselected in generational mode
 - Use old-evac reserve for GLOBAL max old cset
   
   Copy and paste error in previous commit was using young-evac reserve.
 - Global collections need to honor evacuation reservations
   
   This fixes up adaptive heuristic to distinguish between old and young
   evacuations and their respective budgets.
 - Heuristics should not overwrite old evacuation budget
   
   In refactored code, we shrink old evcacuation budget in
   ShenandoahdGeneration::adjust_evacuation_budgets() which executes after
   the call to ShenandoahHeuristics::choose_collection_set().
 - Fix two refactoring errors
   
   1. An off-by-one error in calculating aged-region promotion bias
   2. The stack-allocated preselection array needs to be established in a
      more outer context.
 - ... and 5 more: https://git.openjdk.org/shenandoah/compare/013b2f69...c1c37cbf

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

Changes: https://git.openjdk.org/shenandoah/pull/148/files
 Webrev: https://webrevs.openjdk.org/?repo=shenandoah&pr=148&range=03
  Stats: 1190 lines in 11 files changed: 543 ins; 583 del; 64 mod
  Patch: https://git.openjdk.org/shenandoah/pull/148.diff
  Fetch: git fetch https://git.openjdk.org/shenandoah pull/148/head:pull/148

PR: https://git.openjdk.org/shenandoah/pull/148


More information about the shenandoah-dev mailing list