RFR: JDK-8311035: CDS should not use dump time JVM narrow Klass encoding to pre-compute Klass ids [v8]

Ashutosh Mehra duke at openjdk.org
Wed Jul 5 15:28:56 UTC 2023


On Wed, 5 Jul 2023 15:11:55 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:

>> src/hotspot/share/oops/compressedOops.cpp line 202:
>> 
>>> 200:   address encoding_range_end = requested_base + encoding_range_size;
>>> 201: 
>>> 202:   assert(requested_base <= addr && encoding_range_end >= end, "Encoding does not cover the full Klass range");
>> 
>> Is it possible for `requested_base` to ever be less than `addr`?
>
> Not at the moment, no. Probably never. I separated those two mainly for cleanliness, since Klass range and encoding range are different things.

I am fine having them separately but that assert condition forced me to think if requested_base can ever be less than addr.  If not, then I guess assert for `requested_base == addr` ?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/14688#discussion_r1253279213


More information about the hotspot-dev mailing list