RFR: 8329433: Reduce nmethod header size [v3]
Vladimir Kozlov
kvn at openjdk.org
Tue Apr 16 02:09:01 UTC 2024
On Tue, 16 Apr 2024 01:30:50 GMT, Dean Long <dlong at openjdk.org> wrote:
>> Vladimir Kozlov has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Union fields which usages do not overlap
>
> src/hotspot/share/code/codeBlob.cpp line 88:
>
>> 86: S390_ONLY(_ctable_offset(0) COMMA)
>> 87: _header_size((uint16_t)header_size),
>> 88: _frame_complete_offset((int16_t)frame_complete_offset),
>
> Rather than a raw cast, it would be better to use checked_cast here, or better yet, change the incoming parameter types to match the field type. That way, if the caller is passing a constant, the compiler can check it at compile time.
Agree and will do. In all case `sizeof(_Class_)` is used for `header_size`.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/18768#discussion_r1566620168
More information about the serviceability-dev
mailing list