On Thu, 29 Aug 2024 17:46:11 GMT, Coleen Phillimore <cole...@openjdk.org> wrote:
>> It's fine to have each Klass* report whether it can be compressed. If not, >> it will be represented using the non-compressed version, which will be a bit >> more bloated, but no problems. > > narrowKlass is the result of encoding Klass* with > CompressedKlassPointers::encode() which is relative to the compressed base, > so if UseCompressedClassPointers is false then the encoding to narrowKlass > from some other (CDS?) base isn't valid. > using_class_space() above doesn't look wrong for 32 bits. It should return > false. > > With this patch, interface and abstract classes cannot be encoded and decoded > to yield a valid compressed narrowKlass, since they're now allocated in the > non-class metaspace. Yes, this now a function of which space the Klass > resides in. We do crash for these classes in JFR without this change. I mean its wrong from JFRs perspective not to handle 32-bit outside of the call to using_class_space(), because that call will always be false for 32-bit, although the Klass* will still fit in 4-bytes. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/19157#discussion_r1736834488