On Thu, 29 Aug 2024 15:45:17 GMT, Coleen Phillimore <cole...@openjdk.org> wrote:
>> If UseCompressedClassPointers is off, we don't have a compressed class >> space. If its on, Klass from CDS and from class space are compressable. With >> your patch, interfaces will live in normal metaspace, not int class space, >> so those are excluded now. >> >> TBH, I am not really sure what this code here does, but I assume it tries to >> reduce the size of a JFR recording by using a compressed identifier for X if >> X can be expressed by such. Maybe a JFR person should look at this. > > With UseCompressedClassPointers off, I think > Metaspace::is_in_shared_metaspace() would still return true but I don't think > he compression base is the bottom of the CDS archive. I asked Markus to have > a look. The code supports the JfrTraceID load barrier that enqueues tagged Klass*. It selects a more compact representation (a single word, instead of two words), if a Klass* can be compressed (i.e. there exists a compress class scheme in place (CompressedKlassPointers::encode(const_cast<Klass*>(klass)); AND the traceid (u8) value is low enough to be represented by only 4 bytes). struct JfrEpochQueueKlassElement { traceid id; const Klass* klass; }; struct JfrEpochQueueNarrowKlassElement { u4 id; narrowKlass compressed_klass; }; ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/19157#discussion_r1736775534