RFR: 8253611: AArch64: Concurrency problems in JavaFrameAnchor

Aleksey Shipilev shade at openjdk.java.net
Fri Sep 25 07:07:41 UTC 2020


It looks that `_last_Java_sp` is additionally used as acquire/release flag that guards the rest of the state. Yet, the
coding in `javaFrameAnchor_aarch64.hpp` is incorrect at least in one place:

    _last_Java_fp = src->_last_Java_fp;
    _last_Java_pc = src->_last_Java_pc;
    // Must be last so profiler will always see valid frame if has_last_frame() is true
    _last_Java_sp = src->_last_Java_sp;

There should be `OrderAccess::release()` where the comment suggesting the ordering constraint actually is -- I believe
that is a copy-paste error from x86. Other platforms have `release` thre. Additionally, it has to be matched with
`OrderAccess::acquire()` before `_last_Java_sp` reads, which requires the shared code to use the platform-specific
getter.

Testing:
  - [ ] Linux x86_64 tier1
  - [x] Linux AArch64 tier1
  - [x] Linux AArch64 tier2

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

Commit messages:
 - Minor improvements in comment text
 - Use declarative Atomics instead of OrderAccess
 - Cleanups
 - 8253611: AArch64: Concurrency problems in JavaFrameAnchor

Changes: https://git.openjdk.java.net/jdk/pull/352/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=352&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8253611
  Stats: 43 lines in 2 files changed: 15 ins; 10 del; 18 mod
  Patch: https://git.openjdk.java.net/jdk/pull/352.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/352/head:pull/352

PR: https://git.openjdk.java.net/jdk/pull/352


More information about the hotspot-dev mailing list