[master] Integrated: JDK-8328886: Lilliput: Build COH archives

Thomas Stuefe stuefe at openjdk.org
Tue Mar 26 15:33:46 UTC 2024


On Mon, 25 Mar 2024 13:24:35 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:

> 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.

This pull request has now been integrated.

Changeset: e331ea1b
Author:    Thomas Stuefe <stuefe at openjdk.org>
URL:       https://git.openjdk.org/lilliput/commit/e331ea1b85a07ba6f52dc0dbdc6499451cb34ad7
Stats:     185 lines in 6 files changed: 171 ins; 0 del; 14 mod

8328886: Lilliput: Build COH archives

Reviewed-by: rkennke

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

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


More information about the lilliput-dev mailing list