About the issue of lock downgrade
David Holmes
david.holmes at oracle.com
Mon Jul 1 23:15:41 UTC 2019
Hi Zhuo,
On 2/07/2019 1:36 am, zhuo chen wrote:
> Dear All
>
> Please help me, I have a question, from this article
> http://openjdk.java.net/jeps/8183909. Why is the weight lock here
> downgraded to lightweight, is there any benefit to doing this? Why not
> directly downgrade to a bias lock? Thank you for answering my question.Very
> looking forward to reply.
To get to monitor inflation biased-locking for an object has to have
been revoked at some point. Once the bias has been revoked for an
instance we do not allow it to be re-biased again. Biased-locking
assumes only a single thread will lock a particular instance, so once we
have shown that is not the case we drop biased-locking out of the picture.
David
> Thank you guys
>
> zhuo
>
More information about the hotspot-runtime-dev
mailing list