[jdk25u-dev] RFR: 8365976: G1: Full gc should mark nmethods on stack
Roland Mesde
duke at openjdk.org
Tue Jan 13 16:57:11 UTC 2026
Backporting JDK-8365976: G1: Full gc should mark nmethods on stack.
This PR fixes a regression introduced by JDK-8360540 where full GC stopped marking nmethods on the stack, potentially causing premature code eviction. The fix moves nmethod arming to occur after nmethod registration during full GC, ensuring that nmethods remaining after collection are properly armed and protected from inappropriate eviction.
This depends on https://github.com/openjdk/jdk25u-dev/pull/140
This backport has internal demand.
Ran related tests on linux-x64, linux-aarch64, macos-aarch64 and windows-x64:
make test TEST=test/hotspot/jtreg/vmTestbase/gc
-------------
Depends on: https://git.openjdk.org/jdk25u-dev/pull/140
Commit messages:
- Backport 57434c73eac9bd6557b09d4a057e3a2a18f382b4
Changes: https://git.openjdk.org/jdk25u-dev/pull/142/files
Webrev: https://webrevs.openjdk.org/?repo=jdk25u-dev&pr=142&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8365976
Stats: 3 lines in 2 files changed: 1 ins; 2 del; 0 mod
Patch: https://git.openjdk.org/jdk25u-dev/pull/142.diff
Fetch: git fetch https://git.openjdk.org/jdk25u-dev.git pull/142/head:pull/142
PR: https://git.openjdk.org/jdk25u-dev/pull/142
More information about the jdk-updates-dev
mailing list