RFR: 8324067: GenShen: Isolate regulator thread to generational mode [v4]

William Kemper wkemper at openjdk.org
Mon Feb 12 22:12:24 UTC 2024


> Shenandoah's generational mode uses a second thread to evaluate heuristics. This is necessary so that the heuristics may interrupt a control thread which is running an old cycle in order to run a young cycle.
> 
> The changes here move the regulator thread into `ShenandoahGenerationalHeap`. The generational version of the control thread is also now instantiated only by the generational heap. The upstream version of the control thread has more or less been restored. To  summarize:
> * An abstract base class called `ShenandoahController` has been introduced as the base class for the original and generational control threads. It has just one virtual method and it is not on a fast path. Much of the common code has been pulled up into this class.
> * The respective control threads no longer need to check what mode they are in. They also no longer need to select which global generation they need to use.  The regulator thread is now only used by the generational mode so it no longer supports running only global cycles.

William Kemper has updated the pull request incrementally with one additional commit since the last revision:

  Fix Mac and Zero builds

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

Changes:
  - all: https://git.openjdk.org/shenandoah/pull/391/files
  - new: https://git.openjdk.org/shenandoah/pull/391/files/ce189e7b..1e845ff7

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=shenandoah&pr=391&range=03
 - incr: https://webrevs.openjdk.org/?repo=shenandoah&pr=391&range=02-03

  Stats: 4 lines in 3 files changed: 2 ins; 2 del; 0 mod
  Patch: https://git.openjdk.org/shenandoah/pull/391.diff
  Fetch: git fetch https://git.openjdk.org/shenandoah.git pull/391/head:pull/391

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


More information about the shenandoah-dev mailing list