JDK-8291302 : ARM32: nmethod entry barriers support
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 20
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • CPU: arm
  • Submitted: 2022-07-27
  • Updated: 2023-02-14
  • Resolved: 2023-01-03
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 b04Fixed
Related Reports
Blocks :  
Relates :  
Relates :  
Description
It is a time to implement nmethod entry barriers for ARM32. It have already been implemented in other ports. This becomes inevitable with the landing of Loom and JDK-8290025 "Remove the Sweeper" which require nmethod entry barriers.

Nmethod entry barriers are needed for G1 concurrent marking to keep alive weak nmethod oop constants (see linked JDK-8288970). So it is a defect if they are missing.
Comments
Changeset: 245f0cf4 Author: Aleksei Voitylov <avoitylov@openjdk.org> Committer: Martin Doerr <mdoerr@openjdk.org> Date: 2023-01-03 12:02:39 +0000 URL: https://git.openjdk.org/jdk/commit/245f0cf4ac9dc655bfe2abb1c88c6ed1ddffd291
03-01-2023

The test is not valid since JDK12. Workaround (https://stackoverflow.com/questions/56039341/get-declared-fields-of-java-lang-reflect-fields-in-jdk12) is not working since jdk18.
05-12-2022

I changed this from "Enhancement" to "Bug". The synopsis says why. Please try the reproducer that triggers the defect: https://bugs.openjdk.org/browse/JDK-8288970?focusedCommentId=14520842&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-14520842
01-12-2022

It's unclear how this was rendered as a bug, as it's clearly an enhancement. Anyway, I submitted a PR for that.
30-11-2022

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/11442 Date: 2022-11-30 20:26:23 +0000
30-11-2022

Nmethod entry barriers are needed for G1 concurrent marking to keep alive weak nmethod oop constants.
28-11-2022

IMHO it is a bug that ARM32 does not have nmethod entry barriers. 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).
25-11-2022