JDK-8337657 : AArch64: No need for acquire fence in safepoint poll during JNI calls
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 21,23,24
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • CPU: aarch64
  • Submitted: 2024-08-01
  • Updated: 2025-06-11
  • Resolved: 2024-08-09
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 24
24 b11Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Relates :  
Description
There is call overhead in which LDAR, issued by the original implementation of JDK-8189596, plays a significant role. (more details in https://mail.openjdk.org/pipermail/hotspot-compiler-dev/2024-July/078698.html ) According to the later discussion https://mail.openjdk.org/pipermail/hotspot-compiler-dev/2024-July/078715.html it is no longer needed.

There are 2 places to change: SharedRuntime::generate_native_wrapper() and TemplateInterpreterGenerator::generate_native_entry().

The same approach is used in RISC-V port but this RFE is for AArch64 only.
Comments
[jdk21u-fix-request] Approval Request from Dmitry Chuyko This is a small clean backport of JNI performance enhancement on aarch64. The acquire fence is removed in the safepoint poll during JNI calls. The conditions in 21u are the same as in the mainline, the improvements are similar as well. Testing: tier1,2 on linux-aarch64.
25-03-2025

A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk21u-dev/pull/1545 Date: 2025-03-25 07:25:55 +0000
25-03-2025

Changeset: 358d77da Branch: master Author: Dmitry Chuyko <dchuyko@openjdk.org> Date: 2024-08-09 17:56:37 +0000 URL: https://git.openjdk.org/jdk/commit/358d77dafbe0e35d5b20340fccddc0fb8f3db82a
09-08-2024

A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk/pull/20420 Date: 2024-08-01 13:36:26 +0000
01-08-2024