JDK-8365976 : G1: Full gc should mark nmethods on stack
  • Type: Bug
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 26
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2025-08-22
  • Updated: 2025-08-28
  • Resolved: 2025-08-25
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 26
26 b13Fixed
Related Reports
Causes :  
Description
After JDK-8360540 full gc does not mark nmethods on the stack after full gc any more. This may cause issues with code eviction.
Comments
Changeset: 57434c73 Branch: master Author: Thomas Schatzl <tschatzl@openjdk.org> Date: 2025-08-25 07:44:20 +0000 URL: https://git.openjdk.org/jdk/commit/57434c73eac9bd6557b09d4a057e3a2a18f382b4
25-08-2025

A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk/pull/26899 Date: 2025-08-22 10:59:38 +0000
22-08-2025

Due to ordering of these operations, the nmethods end up disarmed after all which is not what we want.
22-08-2025

Actually, G1 full gc already re-arms all nmethods at the end of full gc in G1FullCollector::collect(), calling G1CollectedHeap::finish_codecache_marking_cycle(). So nothing else to do.
22-08-2025