On Thu, 4 Dec 2025 14:39:39 GMT, Andrew Haley <[email protected]> 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

Reply via email to