RFR: 8322743: assert(held_monitor_count() == jni_monitor_count()) failed [v2]

Vladimir Kozlov kvn at openjdk.org
Sat Jan 20 00:04:28 UTC 2024


On Fri, 19 Jan 2024 13:38:30 GMT, Emanuel Peter <epeter at openjdk.org> wrote:

>> Vladimir Kozlov has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Address review comments
>
> src/hotspot/share/opto/callnode.cpp line 2004:
> 
>> 2002:     //
>> 2003:     ConnectionGraph *cgr = phase->C->congraph();
>> 2004:     if (cgr != nullptr && cgr->can_eliminate_lock(this)) {
> 
> I guess if you make this change, then you probably would also want to rename `NonEscObj` and `set_non_esc_obj` and `is_non_esc_obj`, right? Now it is not just about being non-escaped, but the more complex semantics of `can_eliminate_lock`.

Right.

> src/hotspot/share/opto/escape.cpp line 2888:
> 
>> 2886:  *
>> 2887:  * Return true if lock/unlock can be eliminated.
>> 2888:  */
> 
> Suggestion:
> 
> // The lock/unlock is unnecessary if we are locking a non-escaped object,
> // unless synchronized block (defined by BoxLock node) has other escaped objects
> // (for example, locked object come from Interpreter in OSR compilation).
> //
> // Return true if lock/unlock can be eliminated.
> 
> This would be the first use in this file of multi-line comment :man_shrugging:

Okay.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/17331#discussion_r1460029304
PR Review Comment: https://git.openjdk.org/jdk/pull/17331#discussion_r1460029509


More information about the hotspot-compiler-dev mailing list