RFR: 8285487: Do not generate trampolines for runtime calls if they are not needed [v3]

Evgeny Astigeevich duke at openjdk.java.net
Thu Apr 28 21:55:25 UTC 2022


> [JDK-8280872](https://bugs.openjdk.java.net/browse/JDK-8280872) put the non-nmethod segment between two others. It made trampolines for runtime calls redundant in most cases.
> 
> This PR uses `target_needs_far_branch()` for runtime calls to check whether they need trampolines. Trampolines are not generated if they are not needed.
> 
> Testing:
> - `tier1`...`tier4`: Passed
> - `compiler/c2/aarch64/TestTrampoline.java`: Passed
> 
> Note: `compiler/c2/aarch64/TestTrampoline.java` requires the release build. This is because debug builds have the branch range set to 2M which causes always generation of trampolines.

Evgeny Astigeevich has updated the pull request incrementally with one additional commit since the last revision:

  Move code of target_needs_trampoline inside trampoline_call

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

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/8403/files
  - new: https://git.openjdk.java.net/jdk/pull/8403/files/859f422d..245da6e0

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=8403&range=02
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8403&range=01-02

  Stats: 31 lines in 1 file changed: 9 ins; 20 del; 2 mod
  Patch: https://git.openjdk.java.net/jdk/pull/8403.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/8403/head:pull/8403

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


More information about the hotspot-dev mailing list