RFR: 8338526: Don't store abstract and interface Klasses in class metaspace [v4]
Thomas Stuefe
stuefe at openjdk.org
Thu Aug 29 13:20:25 UTC 2024
On Thu, 29 Aug 2024 11:37:19 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:
>> src/hotspot/share/jfr/recorder/checkpoint/types/traceid/jfrTraceIdKlassQueue.cpp line 79:
>>
>>> 77:
>>> 78: static bool can_compress_element(const Klass* klass) {
>>> 79: return Metaspace::is_in_class_space(klass) &&
>>
>> Suggestion:
>>
>> return (Metaspace::is_in_class_space(klass) || Metaspace::is_in_shared_metaspace(klass)) &&
>
> Is this right? If UseCompressedClassPointers is off, then the shared metaspace isn't in compressed space?
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.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/19157#discussion_r1736193248
More information about the core-libs-dev
mailing list