[master] RFR: JDK-8328886: Lilliput: Build COH archives [v2]

Thomas Stuefe stuefe at openjdk.org
Tue Mar 26 10:49:51 UTC 2024


> This is a breakout from and a prerequisite for [JDK-8325104](https://bugs.openjdk.org/browse/JDK-8325104).
> 
> To run with +COH and CDS enabled, and to enable tests testing this combination, we need to build archives with +COH too.
> 
> This patch expands the number of archives built to four:
> 
> a) **classes.jsa** (+UseCompressedClassPointers, -UseCompactObjectHeaders)
> b) **classes_nocoops.jsa** (-UseCompressedClassPointers, -UseCompactObjectHeaders)
> c) **classes_coh.jsa** (+UseCompressedClassPointers, +UseCompactObjectHeaders)
> d) **classes_nocoops_coh.jsa** (-UseCompressedClassPointers, +UseCompactObjectHeaders)
> 
> Naming could be more logical, but my aim was to keep compatibility with upstream archive names (no functional or name changes for *classes.jsa* and *classes_nocoops.jsa*). 
> 
> Another design goal was for the name-to-options mapping not to change *even if UseCOH were enabled by default*. So, _classes.jsa_ is not the "default jsa" but explicitly and always signifies the jsa with +coops -coh.
> 
> The new configure option `--(enable|disable)-cds-archive-coh` allows you to enable/disable the generation of COH archives. By default, it is enabled if the underlying platform supports COH (64-bit) and if standard CDS archive generation is enabled (e.g., not for cross-compilation).
> 
> Note that the upcoming JEP "CDS Archived Object Streaming" ([JDK-8326035](https://bugs.openjdk.org/browse/JDK-8326035)) will eliminate the +-Coops distinction, thus reducing the number of CDS archives. It may also eliminate the +-COH distinction at some point, though that is harder.
> 
> But that JEP has to be developed and shipped first. After that, it will run alongside the old implementation for a while, which we keep as a fallback. Only if it is the sole remaining way to load CDS archives can we cut down the number of jsa archives. Until then, I propose to keep +-COH archives in addition to +-Coops archives.

Thomas Stuefe has updated the pull request incrementally with one additional commit since the last revision:

  copyright changes

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

Changes:
  - all: https://git.openjdk.org/lilliput/pull/145/files
  - new: https://git.openjdk.org/lilliput/pull/145/files/e6e18163..9a09dd1c

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

  Stats: 4 lines in 4 files changed: 0 ins; 0 del; 4 mod
  Patch: https://git.openjdk.org/lilliput/pull/145.diff
  Fetch: git fetch https://git.openjdk.org/lilliput.git pull/145/head:pull/145

PR: https://git.openjdk.org/lilliput/pull/145


More information about the lilliput-dev mailing list