JDK-8302462 : [REDO] 8297487: G1 Remark: no need to keep alive oop constants of nmethods on stack
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 20
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2023-02-14
  • Updated: 2023-02-22
  • Resolved: 2023-02-20
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 21
21 b05Fixed
Related Reports
Blocks :  
Cloners :  
Relates :  
Relates :  
Relates :  
Description
The issues that caused the BACKOUT were solved with JDK-8300915.
See also https://mail.openjdk.org/pipermail/hotspot-gc-dev/2023-January/041194.html
--
The stackwalks to keep alive oops of nmethods found on stack during G1 remark seem redundant as nmethod entry barriers do the job already: https://github.com/openjdk/jdk/blob/f26bd4e0e8b68de297a9ff93526cd7fac8668320/src/hotspot/share/gc/shared/barrierSetNMethod.cpp#L85

Objects in the constant pool of a nmethod are weakly referenced. So G1 requires nmethod entry barriers to conservatively keep alive the constant objects for SATB during concurrent marking (see https://bugs.openjdk.org/browse/JDK-8288970).
Comments
Changeset: 2009dc2b Author: Richard Reingruber <rrich@openjdk.org> Date: 2023-02-20 06:47:57 +0000 URL: https://git.openjdk.org/jdk/commit/2009dc2b737b3468ba6c78d4bf2f5a0bba20ec43
20-02-2023

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/12561 Date: 2023-02-14 15:37:29 +0000
14-02-2023