RFR: 8247972: incorrect implementation of JVM TI GetObjectMonitorUsage [v3]
Serguei Spitsyn
sspitsyn at openjdk.org
Sat Feb 10 07:55:07 UTC 2024
On Thu, 8 Feb 2024 07:05:38 GMT, David Holmes <dholmes at openjdk.org> wrote:
> I think the only way to make sense of this is to actually set up scenarios where we have different threads contending on entry, different threads waiting and different threads re-entering after being notified, and see what values actually get returned in each case.
I've added this kind of test coverage to the test NSK test:
`test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetObjectMonitorUsage/objmonusage003`
> I think the `pending_current_monitor` issue may be a distinct/different issue.
I tried to find a solution fix the `pending_current_monitor` to cover the monitor re-enter case and found that it is not clear how to do it in a straight-forward way. So, decide to leave it alone for now. However, it seems, it could be more elegant to fix this function. I still can make it a try to do that if you give me some hints or ideas on how to do it better.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/17680#issuecomment-1936920693
More information about the serviceability-dev
mailing list