RFR: 8329433: Reduce nmethod header size [v4]

Vladimir Kozlov kvn at openjdk.org
Tue Apr 16 19:24:03 UTC 2024


On Tue, 16 Apr 2024 19:03:01 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:

>> Thank you, @coleenp, foe looking on these changes.
>> 
>> Which fields are initialized twice? Only `_oop_maps` is set to `nullptr` before we proper build oop maps in first constructor.
>> 
>> The only saving could be lines of code but then I would have to check that `cb != nullptr` and do other additional checks which I don't think will save much lines.
>> 
>> Separation of `nmethod` constructor for native wrappers is helping clear see the difference and I would like to keep them separate. We have `init_defaults()` method for similar code and I can move more code into it from both constructors.
>
> Delegating constructors are the answer to having some common 'init' functions.  It would simply save lines of code that look the same in both constructor initializer lists.  But it's a drive-by comment.

Okay.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/18768#discussion_r1567841490


More information about the serviceability-dev mailing list