RFR: 8328866: Add raw monitor rank support to the debug agent [v6]

Chris Plummer cjplummer at openjdk.org
Sat Aug 17 00:01:24 UTC 2024


On Fri, 17 May 2024 20:03:11 GMT, Alex Menkov <amenkov at openjdk.org> wrote:

>> Chris Plummer has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Flip rank order. Some cleanup and better comments for verifyMonitorRank().
>
> src/jdk.jdwp.agent/share/native/libjdwp/util.c line 1145:
> 
>> 1143:  */
>> 1144: 
>> 1145: static jrawMonitorID dbgRawMonitor;
> 
> As the monitor is used to synchronize access to dbg_monitors array, maybe rename it to something like dbg_monitors_lock?

@alexmenkov Actually I don't think dbg_monitors_lock is a good name. It doesn't synchronize access to the dbg_monitors array, but rather to the ownerThread field of any given entry in the array. Maybe something like ownerThread_field_access_lock would be better, although that's getting a bit wordy, and maybe more specific than it needs to be (it would prevent other uses of the lock).

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

PR Review Comment: https://git.openjdk.org/jdk/pull/19044#discussion_r1720479289


More information about the serviceability-dev mailing list