RFR: 8324969: C2: prevent elimination of unbalanced coarsened locking regions [v6]
Emanuel Peter
epeter at openjdk.org
Tue Feb 20 20:34:56 UTC 2024
On Tue, 20 Feb 2024 17:37:45 GMT, Vladimir Kozlov <kvn at openjdk.org> wrote:
>> Right. It will verify that we did not miss `is_unbalanced()` check when do EA or nested elimination to avoid them.
>>
>> I will also move the assert at line 4984 under `(box != this_box)` to avoid duplication of check when `box` is the same.
>
> Moving assert down does not work because Nested lock elimination and EA can overwrite Coarsened status for BoxLock before we run `mark_unbalanced_boxes()`. Such BoxLock will not be marked as Unbalanced and assert will fail.
> I would like to keep current assert in place but add an other assert when we change status of BoxLock. I am working on it.
Right, sounds good :)
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/17697#discussion_r1496459250
More information about the hotspot-compiler-dev
mailing list