RFR: 8324969: C2: prevent elimination of unbalanced coarsened locking regions [v6]
Vladimir Kozlov
kvn at openjdk.org
Fri Feb 16 17:36:56 UTC 2024
On Fri, 16 Feb 2024 07:07:47 GMT, Emanuel Peter <epeter at openjdk.org> wrote:
>> Vladimir Kozlov has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Add verivication for unbalanced BoxLock marking
>
> src/hotspot/share/opto/compile.cpp line 4991:
>
>> 4989: }
>> 4990: }
>> 4991: assert(box->is_unbalanced() == box->is_marked_unbalanced(),"inconsistency");
>
> Could you even move this a scope out, i.e. a line down, so this check is even run with `alock->is_coarsened() == false`?
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.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/17697#discussion_r1492787405
More information about the hotspot-compiler-dev
mailing list