JDK-8341553 : Remove UseCompactObjectHeaders extra CDS archives
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: runtime
  • Priority: P3
  • Status: Open
  • Resolution: Unresolved
  • Submitted: 2024-10-04
  • Updated: 2024-11-05
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 24
24Unresolved
Related Reports
Relates :  
Sub Tasks
JDK-8341555 :  
Description
When JDK-8305895 is integrated, there will be two more CDS archives built by default as part of the build called classes_coh.jsa and classes_nocoops_coh.jsa.

These shared archives should be removed so that 30 million users do not download these extra bytes that they will not be using.

The OpenJDK default for building archives will be changed to not build these by default so that we are not testing code we're not shipping.  Other vendors are free to change the default for their testing and deployment. [~rkennke]

After changing the default we need to:

1. Fix the tests to not fail when -XX:+UseCompactObjectHeaders is on that assume that there's a default archive present.
2. Add to the release notes instructions how to build the CDS archives locally if using -XX:+UseCompactObjectHeaders.
3. Maybe add a warning that the CDS archive isn't present with -XX:+UseCompactObjectHeaders (tbd).

Most CDS tests don't require having a default archive and build a local archive as part of the testing so CDS testing will still be covered with -XX:+UseCompactObjectHeaders.  Experimentally we found that there's only around 6 tests that need to be adjusted with this change.
Comments
I introduced them. I did not like the solution when I did it, but did not find a better solution. What [~rkennke] writes is somewhat correct, though, in that the -Coops archives only exist for the sake of ZGC. So the precedence was made by Oracle. But obviously, this approach does not scale endlessly. This is as much a political as a technical decision. I will feel around in our team as to how feelings run.
05-11-2024

I disagree. We build archives for -coops even if most users don’t use them. Those are used when a user runs with -coops. That‘s the same situation as for +/-coh: even though most users would not use it, those who do use it would benefit from the archives.
05-10-2024