RFR: 8324969: C2: prevent elimination of unbalanced coarsened locking regions [v7]

Emanuel Peter epeter at openjdk.org
Mon Feb 26 11:18:57 UTC 2024


On Mon, 26 Feb 2024 10:56:56 GMT, Emanuel Peter <epeter at openjdk.org> wrote:

>> Vladimir Kozlov has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Added asserts for BoxLock states change
>
> src/hotspot/share/opto/escape.cpp line 2893:
> 
>> 2891:       // We can mark whole locking region as Local only when only
>> 2892:       // one object is used for locking.
>> 2893:       box->set_local();
> 
> Hmm. The name of the method suggests that there are no side-effects. Not sure what would be a better alternative though.

Could the box be `nested` at this point? If so, the assert inside `set_local` could trigger, right?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/17697#discussion_r1502429656


More information about the hotspot-compiler-dev mailing list