RFR: 8369392: Safepoint sync should suspend GC and Java threads concurrently

Xiaolong Peng xpeng at openjdk.org
Mon Oct 27 19:29:43 UTC 2025


As @shipilev  mentioned in the description description of [JDK-8369392](https://bugs.openjdk.org/browse/JDK-8369392), we could rearrange the code and ask GC to suspend after announcing safepoint, GC threads and Java threads will sync simultaneously. [The other option](https://github.com/openjdk/jdk/pull/27739/files) I have test is to split STS synchronize into `synchronize_begin` and `synchronize`, which makes GC thread suspension fully aysnc(same Java threads), but I didn't see big performance difference, therefore I chose the simple solution suggested by Aleksey. 


Test:
- [x] tier1

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

Commit messages:
 - Merge branch 'openjdk:master' into JDK-8369392-simple-solution
 - Suspend GC threads after arming safepoint for Java threads but before synchronizing Java threads

Changes: https://git.openjdk.org/jdk/pull/27924/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=27924&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8369392
  Stats: 8 lines in 1 file changed: 5 ins; 3 del; 0 mod
  Patch: https://git.openjdk.org/jdk/pull/27924.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/27924/head:pull/27924

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


More information about the hotspot-runtime-dev mailing list