[master] RFR: Implement self-forwarding of objects that preserves header bits [v3]
Thomas Schatzl
tschatzl at openjdk.java.net
Mon Jul 12 13:02:47 UTC 2021
On Mon, 12 Jul 2021 10:46:28 GMT, Roman Kennke <rkennke at openjdk.org> wrote:
>> src/hotspot/share/gc/g1/g1OopClosures.inline.hpp line 237:
>>
>>> 235: markWord m = obj->mark();
>>> 236: if (m.is_marked()) {
>>> 237: forwardee = obj->forwardee(m);
>>
>> The original code has been done that way intentionally: the changed code reloads the value from the header from memory (from what I can tell from generated code), while the original code does not, just reusing the value in the register.
>>
>> Even if this is a nano-nano-optimization I would prefer to keep it as is. Some of the other changes seem to cause very similar "regressions".
>>
>> (Yeah, I'm late, sorry).
>
>> The original code has been done that way intentionally: the changed code reloads the value from the header from memory (from what I can tell from generated code), while the original code does not, just reusing the value in the register.
>>
>> Even if this is a nano-nano-optimization I would prefer to keep it as is. Some of the other changes seem to cause very similar "regressions".
>>
>> (Yeah, I'm late, sorry).
>
> I think I preserved the original behavior of re-using the already-loaded header. Notice that I added an oopDesc::forwardee(markWord m) to do that.
Okay, then ignore me :)
-------------
PR: https://git.openjdk.java.net/lilliput/pull/10
More information about the lilliput-dev
mailing list