RFR: 8374513: AArch64: Improve receiver type profiling reliability

Chad Rakoczy duke at openjdk.org
Mon Jan 19 21:10:11 UTC 2026


[JDK-8374513](https://bugs.openjdk.org/browse/JDK-8374513) is the AArch64 port of [JDK-8357258](https://bugs.openjdk.org/browse/JDK-8357258). See the bug report for more detailed information.

This PR executes the plan outlined in the bug:
- Common the receiver type profiling code in interpreter and C1
- Rewrite receiver type profiling code to only do atomic receiver slot installations
- Trim C1OptimizeVirtualCallProfiling to only claim slots when receiver is installed

This PR does not do atomic counter updates themselves, as it may have much wider performance implications, including regressions. This PR should be at least performance neutral.

Functional Testing: Linux AArch64 fastdebug Tier1-4

Performance Testing (to show there is no performance regression):

# Baseline
Benchmark                        (randomized)  Mode  Cnt   Score   Error  Units
InterfaceCalls.test1stInt2Types         false  avgt   12   1.940 ± 0.002  ns/op
InterfaceCalls.test1stInt2Types          true  avgt   12   7.714 ± 0.011  ns/op
InterfaceCalls.test1stInt3Types         false  avgt   12   6.747 ± 0.066  ns/op
InterfaceCalls.test1stInt3Types          true  avgt   12  18.733 ± 0.175  ns/op
InterfaceCalls.test1stInt5Types         false  avgt   12   6.690 ± 0.083  ns/op
InterfaceCalls.test1stInt5Types          true  avgt   12  21.299 ± 0.016  ns/op
InterfaceCalls.test2ndInt2Types         false  avgt   12   1.997 ± 0.004  ns/op
InterfaceCalls.test2ndInt2Types          true  avgt   12   8.027 ± 0.016  ns/op
InterfaceCalls.test2ndInt3Types         false  avgt   12   7.915 ± 0.114  ns/op
InterfaceCalls.test2ndInt3Types          true  avgt   12  16.988 ± 0.065  ns/op
InterfaceCalls.test2ndInt5Types         false  avgt   12   9.422 ± 0.017  ns/op
InterfaceCalls.test2ndInt5Types          true  avgt   12  22.736 ± 0.022  ns/op
InterfaceCalls.testIfaceCall            false  avgt   12   5.860 ± 0.046  ns/op
InterfaceCalls.testIfaceCall             true  avgt   12   5.794 ± 0.026  ns/op
InterfaceCalls.testIfaceExtCall         false  avgt   12   6.310 ± 0.067  ns/op
InterfaceCalls.testIfaceExtCall          true  avgt   12   6.239 ± 0.017  ns/op
InterfaceCalls.testMonomorphic          false  avgt   12   1.146 ± 0.034  ns/op
InterfaceCalls.testMonomorphic           true  avgt   12   1.131 ± 0.012  ns/op

# With PR
Benchmark                        (randomized)  Mode  Cnt   Score   Error  Units
InterfaceCalls.test1stInt2Types         false  avgt   12   1.941 ± 0.004  ns/op
InterfaceCalls.test1stInt2Types          true  avgt   12   7.707 ± 0.020  ns/op
InterfaceCalls.test1stInt3Types         false  avgt   12   6.676 ± 0.068  ns/op
InterfaceCalls.test1stInt3Types          true  avgt   12  18.624 ± 0.067  ns/op
InterfaceCalls.test1stInt5Types         false  avgt   12   6.717 ± 0.071  ns/op
InterfaceCalls.test1stInt5Types          true  avgt   12  21.304 ± 0.040  ns/op
InterfaceCalls.test2ndInt2Types         false  avgt   12   1.993 ± 0.010  ns/op 
InterfaceCalls.test2ndInt2Types          true  avgt   12   8.048 ± 0.052  ns/op
InterfaceCalls.test2ndInt3Types         false  avgt   12   7.914 ± 0.097  ns/op
InterfaceCalls.test2ndInt3Types          true  avgt   12  17.217 ± 0.548  ns/op
InterfaceCalls.test2ndInt5Types         false  avgt   12   9.453 ± 0.067  ns/op
InterfaceCalls.test2ndInt5Types          true  avgt   12  22.868 ± 0.279  ns/op
InterfaceCalls.testIfaceCall            false  avgt   12   5.772 ± 0.005  ns/op
InterfaceCalls.testIfaceCall             true  avgt   12   5.838 ± 0.070  ns/op
InterfaceCalls.testIfaceExtCall         false  avgt   12   6.249 ± 0.008  ns/op
InterfaceCalls.testIfaceExtCall          true  avgt   12   6.299 ± 0.141  ns/op
InterfaceCalls.testMonomorphic          false  avgt   12   1.128 ± 0.021  ns/op
InterfaceCalls.testMonomorphic           true  avgt   12   1.124 ± 0.018  ns/op

-------------

Commit messages:
 - Fix CAS and improve branch check
 - Merge remote-tracking branch 'origin/master' into receiver-type-8374513
 - Fix bug
 - Remove pointer size scaling
 - Initial aarch64 implementation

Changes: https://git.openjdk.org/jdk/pull/29283/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=29283&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8374513
  Stats: 390 lines in 7 files changed: 161 ins; 207 del; 22 mod
  Patch: https://git.openjdk.org/jdk/pull/29283.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/29283/head:pull/29283

PR: https://git.openjdk.org/jdk/pull/29283


More information about the hotspot-dev mailing list