RFR: 8349713: [leyden] Memory map the cached code file [v2]

Aleksey Shipilev shade at openjdk.org
Mon Feb 10 16:36:04 UTC 2025


> It is visible in profiles for lots of applications that reading the SC cache file at startup costs significantly. On JavacBenchApp example, loading ~25M code requires about 30ms. This is ~1 GB/sec, so it is I/O limited.
> 
> We should really mmap the SC cache file to alleviate these costs. Let the actual SC readers (separate threads) to eat the cost of reading from the backing file. 
> 
> I was not entirely sure COW for file mappings works correctly on Windows, so I excepted that one.
> 
> Additional testing:
>  - [x] Linux x86_64 server fastdebug, `runtime/cds`

Aleksey Shipilev has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains two additional commits since the last revision:

 - Merge branch 'premain' into JDK-8349713-mmap-sccache
 - Fix

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

Changes:
  - all: https://git.openjdk.org/leyden/pull/34/files
  - new: https://git.openjdk.org/leyden/pull/34/files/41d018db..ce07d999

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=leyden&pr=34&range=01
 - incr: https://webrevs.openjdk.org/?repo=leyden&pr=34&range=00-01

  Stats: 14 lines in 1 file changed: 0 ins; 3 del; 11 mod
  Patch: https://git.openjdk.org/leyden/pull/34.diff
  Fetch: git fetch https://git.openjdk.org/leyden.git pull/34/head:pull/34

PR: https://git.openjdk.org/leyden/pull/34


More information about the leyden-dev mailing list