RFR: 8316417: ObjectMonitorIterator does not return the most recent monitor and is incorrect if no monitors exists [v6]
David Holmes
dholmes at openjdk.org
Tue Sep 26 05:04:20 UTC 2023
On Mon, 25 Sep 2023 14:26:00 GMT, Chris Plummer <cjplummer at openjdk.org> wrote:
>> It is not. It is the value of `_head` when ObjectSynchronizer is initialised. My understanding of the serviceability agent is very limited, but from what I understood the JVM does not run when we are attached. So no code should add to the list.
>>
>> If that was a requirement then both this and the previous implementation are completely broken.
>
>> My understanding of the serviceability agent is very limited, but from what I understood the JVM does not run when we are attached. So no code should add to the list.
>
> Your understanding is correct, although one thing SA has to deal with (usually by falling on its face) is that the VM could be in an inconsistent state, and there is no safe pointing, locking, or other synchronization it can do to protect from that.
Thanks - as per another SA issue my understanding of how the SA operated on a live process was incorrect.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/15782#discussion_r1336625511
More information about the serviceability-dev
mailing list