On Thu, 12 Mar 2026 15:33:39 GMT, Roman Kennke <[email protected]> wrote:
>> src/hotspot/share/memory/metaspace.hpp line 168:
>>
>>> 166:
>>> 167: static bool is_class_space_allocation(MetadataType mdType) {
>>> 168: return CLASS_SPACE_ONLY(mdType) NOT_CLASS_SPACE(false);
>>
>> This is confusing me. Is ClassType the only non-zero MetadataType? Might be
>> better to write that out as before, otherwise it's a weird implicit
>> conversion from MetadataType to bool.
>
> Actually I think this is a bug because the enum is exactly backwards.
Good catch. That is wrong, I accidentally cut away the comparison.
This is only used when putting together the text for a Metaspace OOM. Seems our
tests did not pick up on that, might look into that.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/28366#discussion_r2952214094