Timeline for BiasedLocking removal?

Roman Kennke rkennke at redhat.com
Tue May 11 13:50:00 UTC 2021


Hi Hotspot devs,

what is the timeline for removing BiasedLocking altogether? Or have we 
even agreed that we are going to remove it?

I am asking because this affects how I'd move forward with Lilliput. If 
I can ignore BiasedLocking because it'd be removed in, say, JDK 18 
anyway, then I believe I can come up with a relatively simple 
implementation for 64bit header that should be possible to integrate 
into JDK 18. That is, I put the (compressed) Klass* in the upper bits of 
the header, also keep the hashcode in the header, and keep everything 
else (locking, GC bits) as they are.

With biased-locking, the Klass* would clash with the Thread* in the 
upper bits. If we are not going to remove BiasedLocking anytime soon, I 
would have to come up with a different plan.

(Also, note that I expect the performance improvement of Lilliput to 
outweight possible - and hopefully rare - biased-locking removal 
regressions)

WDYT?

Cheers,
Roman



More information about the hotspot-dev mailing list