RFR: 8293922: Extend barrier-less Java thread transitions to native transitions

Robbin Ehn rehn at openjdk.org
Fri Sep 16 10:08:30 UTC 2022


As suggested by @TheRealMDoerr, avoid the fence for native trans when UseSystemMemoryBarrier is enabled.

Locally I can see methods like Thread.holdsLock() getting a 4 ns speed boost, (~20% faster).

Running t1-5 with UseSystemMemoryBarrier on.

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

Commit messages:
 - Avoid fence

Changes: https://git.openjdk.org/jdk/pull/10302/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=10302&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8293922
  Stats: 6 lines in 1 file changed: 5 ins; 0 del; 1 mod
  Patch: https://git.openjdk.org/jdk/pull/10302.diff
  Fetch: git fetch https://git.openjdk.org/jdk pull/10302/head:pull/10302

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


More information about the hotspot-runtime-dev mailing list