On Thu, 29 Aug 2024 17:26:57 GMT, Markus Grönlund <mgron...@openjdk.org> wrote:

>> 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;
>> };
>
> // Return TRUE only if UseCompressedClassPointers is True.
>   static bool using_class_space() {
>     return NOT_LP64(false) LP64_ONLY(UseCompressedClassPointers);
>   }
>   
>   I see now that was wrong for 32-bit.

In summary, we are agnostic about which space the Klass* is located in; we only 
care if a valid means exists to perform an encode() and decode() operation to 
compress the Klass* (for 64-bit to be clear).

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

PR Review Comment: https://git.openjdk.org/jdk/pull/19157#discussion_r1736786419

Reply via email to