[master] RFR: Load Klass* without causing monitor inflation

Roman Kennke rkennke at openjdk.java.net
Wed Oct 20 10:37:30 UTC 2021


On Wed, 20 Oct 2021 09:36:25 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

> OK, I am approving this because `ObjectSynchronizer::stable_mark` is Lilliput-specific, and so changes there do not affect the upstream locking code (apart from Lilliput-specific paths).

Thank you!
Also, notice how safe_load_mark() is a simplified version of inflate(), much like stable_mark() is a simplified version of FastHashCode(). I literally copied both original methods, and stripped out the parts that are not needed. And they are not needed because in one case I need to establish a mark-word for writing (e.g. hash-code or lock), and in the case of loading the mark-word for getting a Klass* I only need to read it. The core protocol (installing 0 to block out competing threads) remains the same though.

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

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


More information about the lilliput-dev mailing list