[master] RFR: Trim identity-hashcode to 25bit

Roman Kennke rkennke at openjdk.java.net
Mon May 10 18:47:07 UTC 2021

On Mon, 10 May 2021 18:39:29 GMT, Roman Kennke <rkennke at openjdk.org> wrote:

>> src/hotspot/share/oops/markWord.hpp line 45:
>>> 43: //  --------
>>> 44: //  unused:32 hash:25 -->|  age:4    biased_lock:1 lock:2 (normal object)
>>> 45: //  JavaThread*:54 epoch:2  age:4    biased_lock:1 lock:2 (biased object)
>> This does not compute. Where did the `unused_gap` go in the second case? Is `epoch` now larger? Or does `JavaThread*` now takes 55 bits?
> Epoch and JavaThread in the biased case are already overlaid with hashcode. Hashcode and biased state doesn't happen at the same time. 32+25+4+1+2 == 64.

Oh right, unused_gap is now used, epoch is moved 1 bit to the right and JavaThread is now 55 bits (actually, I guess it is still 54 bits and the uppermost bit is unused). I will correct this.


PR: https://git.openjdk.java.net/lilliput/pull/3

More information about the lilliput-dev mailing list