RFR: 8280872: Reorder code cache segments to improve code density [v6]

Boris Ulasevich bulasevich at openjdk.java.net
Wed Mar 16 09:37:29 UTC 2022


> Currently the codecache segment order is [non-nmethod, non-profiled, profiled]. With this change we move the non-nmethod segment between two code segments. It changes nothing for any platform besides AARCH.
> 
> In AARCH the offset limit for a branch instruction is 128MB. The bigger jumps are encoded with three instructions. Most of far branches are jumps into the non-nmethod blobs. With the non-nmethod segment in between code segments the jump distance from method to the stub becomes shorter. The result is a 4% reduction in generated code size for the CodeCache range from 128MB to 240MB.
> 
> As a side effect, the performance of some tests is slightly improved:
> ``ArraysFill.testCharFill      10  thrpt   15  170235.720 -> 178477.212  ops/ms``
> 
> Testing: jdk/hotspot jtreg and microbenchmarks on AMD and AARCH

Boris Ulasevich has refreshed the contents of this pull request, and previous commits have been removed. The incremental views will show differences compared to the previous content of the PR. The pull request contains one new commit since the last revision:

  rename, adding test

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

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/7517/files
  - new: https://git.openjdk.java.net/jdk/pull/7517/files/9cb03540..9650abc9

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=7517&range=05
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=7517&range=04-05

  Stats: 0 lines in 1 file changed: 0 ins; 0 del; 0 mod
  Patch: https://git.openjdk.java.net/jdk/pull/7517.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/7517/head:pull/7517

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


More information about the hotspot-dev mailing list