RFR: 8363996: Obsolete UseCompressedClassPointers [v3]

Thomas Stuefe stuefe at openjdk.org
Thu Dec 4 15:04:51 UTC 2025


On Thu, 4 Dec 2025 14:39:39 GMT, Andrew Haley <aph at openjdk.org> wrote:

>> After thinking about this, I got confused. Should heap archiving not actually depend on CompressedOops, too, in addition to CompressedClassPointers? Otherwise we would have the heap region at runtime at exactly the same address as at compile time...
>> 
>> That would be a preexisting bug. It may just be one of the old "UseCompressedClassPointers is tied to UseCompressedOops" bugs. But if true, we would have seen CDT crashes e.g. with G1 and heaps > 32g.
>> 
>> I'll take a look.
>
> Sorry, my mistake. Just compressed CP. Maybe just delete the comment, which violates
> 
> Rule 1: Comments should not duplicate the code

Ashu just reminded me that we do relocate uncompressed oops when loading the CDS archive at runtime. We never got around to do that for uncompressed Klass pointers in object headers, and it was also never really necessary.

So you are right, the comment should either just be removed or explain the G1 restriction.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/28366#discussion_r2589430925


More information about the serviceability-dev mailing list