RFR: 8328507: Move StackWatermark code from safepoint cleanup

Erik Österlund eosterlund at openjdk.org
Tue Mar 19 13:44:28 UTC 2024


There is some stack watermark code in safepoint cleanup that flushes out concurrent stack processing, as a defensive measure to guard safepoint operations that assume the stacks have been fixed up. However, we wish to get rid of safepoint cleanup so this operation should move out from the safepoint. This proposal moves it into CollectedHeap::safepoint_synchronize_begin instead which runs before we start shutting down Java threads. This moves the code into more obvious GC places and reduces time spent inside of non-GC safepoints.

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

Commit messages:
 - 8328507: Move StackWatermark code from safepoint cleanup

Changes: https://git.openjdk.org/jdk/pull/18378/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=18378&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8328507
  Stats: 75 lines in 11 files changed: 23 ins; 44 del; 8 mod
  Patch: https://git.openjdk.org/jdk/pull/18378.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/18378/head:pull/18378

PR: https://git.openjdk.org/jdk/pull/18378


More information about the shenandoah-dev mailing list