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

Roman Kennke rkennke at openjdk.java.net
Thu Nov 18 21:38:12 UTC 2021


On Tue, 19 Oct 2021 14:44:12 GMT, Roman Kennke <rkennke at openjdk.org> wrote:

> Until now, loading the Klass* in Lilliput may cause monitor inflation, because we needed a way to safely load the mark-word in the face of concurrent stack-locking or inflation happening. However, this caused troubles with concurrent GCs, because they may attempt to inflate monitors on from-space objects while traversing the heap for relocation/evacuation. Also, this may be a performance nuisance.
> It turns out that we don't have to fully inflate the monitor: we only need a partial inflation, up to where we install the transient INFLATING word to prevent concurrent threads from messing with the mark-word, and then read and return the mark-word safely, and swing back the original real mark word to let other threads continue.
> 
> Testing:
>  - [x] tier1
>  - [x] tier2
>  - [x] tier3
>  - [x] tier4
>  - [ ] hotspot_gc

This pull request has now been integrated.

Changeset: 0c772539
Author:    Roman Kennke <rkennke at openjdk.org>
URL:       https://git.openjdk.java.net/lilliput/commit/0c772539a03bc88456e3f367917e8d4349db77ce
Stats:     77 lines in 2 files changed: 75 ins; 1 del; 1 mod

Load Klass* without causing monitor inflation

Reviewed-by: shade

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

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


More information about the lilliput-dev mailing list