Re: RFR: 8247972: incorrect implementation of JVM TI GetObjectMonitorUsage [v26]

2024-03-12 Thread Serguei Spitsyn
> The implementation of the JVM TI `GetObjectMonitorUsage` does not match the > spec. > The function returns the following structure: > > > typedef struct { > jthread owner; > jint entry_count; > jint waiter_count; > jthread* waiters; > jint notify_waiter_count; > jthread

Re: RFR: 8247972: incorrect implementation of JVM TI GetObjectMonitorUsage [v25]

2024-03-12 Thread Serguei Spitsyn
On Tue, 12 Mar 2024 05:13:54 GMT, David Holmes wrote: >> Serguei Spitsyn has updated the pull request incrementally with one >> additional commit since the last revision: >> >> review: addressed minor comments, updated a couple of copyright headers > > test/hotspot/jtreg/serviceability/jvmti/

Re: RFR: 8247972: incorrect implementation of JVM TI GetObjectMonitorUsage [v25]

2024-03-11 Thread David Holmes
On Tue, 12 Mar 2024 02:31:43 GMT, Serguei Spitsyn wrote: >> The implementation of the JVM TI `GetObjectMonitorUsage` does not match the >> spec. >> The function returns the following structure: >> >> >> typedef struct { >> jthread owner; >> jint entry_count; >> jint waiter_count; >

Re: RFR: 8247972: incorrect implementation of JVM TI GetObjectMonitorUsage [v25]

2024-03-11 Thread Serguei Spitsyn
On Tue, 12 Mar 2024 02:31:43 GMT, Serguei Spitsyn wrote: >> The implementation of the JVM TI `GetObjectMonitorUsage` does not match the >> spec. >> The function returns the following structure: >> >> >> typedef struct { >> jthread owner; >> jint entry_count; >> jint waiter_count; >

Re: RFR: 8247972: incorrect implementation of JVM TI GetObjectMonitorUsage [v25]

2024-03-11 Thread Serguei Spitsyn
> The implementation of the JVM TI `GetObjectMonitorUsage` does not match the > spec. > The function returns the following structure: > > > typedef struct { > jthread owner; > jint entry_count; > jint waiter_count; > jthread* waiters; > jint notify_waiter_count; > jthread

Re: RFR: 8247972: incorrect implementation of JVM TI GetObjectMonitorUsage [v23]

2024-03-11 Thread Serguei Spitsyn
On Mon, 11 Mar 2024 18:23:25 GMT, Daniel D. Daugherty wrote: >> Serguei Spitsyn has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains 26 commits: >> >> - Merge >> - review: minor tweak in test description of ObjectMonitorUsage.java >

Re: RFR: 8247972: incorrect implementation of JVM TI GetObjectMonitorUsage [v23]

2024-03-11 Thread Serguei Spitsyn
On Mon, 11 Mar 2024 18:44:34 GMT, Daniel D. Daugherty wrote: >> Serguei Spitsyn has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains 26 commits: >> >> - Merge >> - review: minor tweak in test description of ObjectMonitorUsage.java >

Re: RFR: 8247972: incorrect implementation of JVM TI GetObjectMonitorUsage [v23]

2024-03-11 Thread Serguei Spitsyn
On Mon, 11 Mar 2024 18:43:11 GMT, Daniel D. Daugherty wrote: >> Serguei Spitsyn has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains 26 commits: >> >> - Merge >> - review: minor tweak in test description of ObjectMonitorUsage.java >

Re: RFR: 8247972: incorrect implementation of JVM TI GetObjectMonitorUsage [v21]

2024-03-11 Thread Serguei Spitsyn
On Mon, 11 Mar 2024 18:38:52 GMT, Daniel D. Daugherty wrote: >> Okay, thanks! I'll add some diagnostic code to catch spurious wakups. >> Let's see if we ever encounter any spurious wakeup in this test. > > I think some sort of comment needs to be added here to document > the possibility of this

Re: RFR: 8247972: incorrect implementation of JVM TI GetObjectMonitorUsage [v24]

2024-03-11 Thread Serguei Spitsyn
On Mon, 11 Mar 2024 18:14:49 GMT, Daniel D. Daugherty wrote: >> Serguei Spitsyn has updated the pull request incrementally with one >> additional commit since the last revision: >> >> improved new test: added wakeup warning; polished test ouput > > test/hotspot/jtreg/TEST.quick-groups line 9

Re: RFR: 8247972: incorrect implementation of JVM TI GetObjectMonitorUsage [v22]

2024-03-11 Thread Serguei Spitsyn
On Mon, 11 Mar 2024 01:53:09 GMT, David Holmes wrote: >> Okay. Now I see why the old code did not have endless loops. > > Apologies I should have checked the code - I'd forgotten the list is circular > to avoid needing an explicit tail pointer. Okay, thanks. - PR Review Comment: h

Re: RFR: 8247972: incorrect implementation of JVM TI GetObjectMonitorUsage [v23]

2024-03-11 Thread Serguei Spitsyn
On Mon, 11 Mar 2024 18:05:00 GMT, Daniel D. Daugherty wrote: >> Serguei Spitsyn has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains 26 commits: >> >> - Merge >> - review: minor tweak in test description of ObjectMonitorUsage.java >

Re: RFR: 8247972: incorrect implementation of JVM TI GetObjectMonitorUsage [v23]

2024-03-11 Thread Serguei Spitsyn
On Mon, 11 Mar 2024 18:08:01 GMT, Daniel D. Daugherty wrote: >> Serguei Spitsyn has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains 26 commits: >> >> - Merge >> - review: minor tweak in test description of ObjectMonitorUsage.java >

Re: RFR: 8247972: incorrect implementation of JVM TI GetObjectMonitorUsage [v24]

2024-03-11 Thread Serguei Spitsyn
> The implementation of the JVM TI `GetObjectMonitorUsage` does not match the > spec. > The function returns the following structure: > > > typedef struct { > jthread owner; > jint entry_count; > jint waiter_count; > jthread* waiters; > jint notify_waiter_count; > jthread

Re: RFR: 8247972: incorrect implementation of JVM TI GetObjectMonitorUsage [v23]

2024-03-11 Thread Daniel D . Daugherty
On Fri, 8 Mar 2024 06:11:23 GMT, Serguei Spitsyn wrote: >> The implementation of the JVM TI `GetObjectMonitorUsage` does not match the >> spec. >> The function returns the following structure: >> >> >> typedef struct { >> jthread owner; >> jint entry_count; >> jint waiter_count; >>

Re: RFR: 8247972: incorrect implementation of JVM TI GetObjectMonitorUsage [v21]

2024-03-11 Thread Daniel D . Daugherty
On Mon, 11 Mar 2024 18:08:14 GMT, Serguei Spitsyn wrote: >> Sorry I missed this response. I can't see a way to address spurious wakeups >> in this case as it needs to be a per-thread flag (so that each thread knows >> it was notified) but you don't know which thread will be notified in any >>

Re: RFR: 8247972: incorrect implementation of JVM TI GetObjectMonitorUsage [v21]

2024-03-11 Thread Serguei Spitsyn
On Mon, 11 Mar 2024 02:18:57 GMT, David Holmes wrote: >> I have an idea how to fix it but it will add extra complexity. Not sure it >> is worth it. >> It is possible to identify there was a spurious wakeup and invalidate the >> sub-test result in such a case. >> Not sure if it is important to r

Re: RFR: 8247972: incorrect implementation of JVM TI GetObjectMonitorUsage [v23]

2024-03-11 Thread Daniel D . Daugherty
On Fri, 8 Mar 2024 06:11:23 GMT, Serguei Spitsyn wrote: >> The implementation of the JVM TI `GetObjectMonitorUsage` does not match the >> spec. >> The function returns the following structure: >> >> >> typedef struct { >> jthread owner; >> jint entry_count; >> jint waiter_count; >>

Re: RFR: 8247972: incorrect implementation of JVM TI GetObjectMonitorUsage [v23]

2024-03-11 Thread Serguei Spitsyn
On Fri, 8 Mar 2024 06:11:23 GMT, Serguei Spitsyn wrote: >> The implementation of the JVM TI `GetObjectMonitorUsage` does not match the >> spec. >> The function returns the following structure: >> >> >> typedef struct { >> jthread owner; >> jint entry_count; >> jint waiter_count; >>

Re: RFR: 8247972: incorrect implementation of JVM TI GetObjectMonitorUsage [v21]

2024-03-10 Thread David Holmes
On Mon, 4 Mar 2024 10:09:10 GMT, Serguei Spitsyn wrote: >> test/hotspot/jtreg/serviceability/jvmti/ObjectMonitorUsage/ObjectMonitorUsage.java >> line 319: >> >>> 317: try { >>> 318: ready = true; >>> 319: lockCheck.wait(); >> >> Spurious

Re: RFR: 8247972: incorrect implementation of JVM TI GetObjectMonitorUsage [v22]

2024-03-10 Thread David Holmes
On Tue, 5 Mar 2024 09:04:08 GMT, Serguei Spitsyn wrote: >> The loop is endless without this extra condition, so we are getting a test >> execution timeout. >> The `waiters` seems to be `circular doubly linked list` as we can see below: >> >> inline void ObjectMonitor::AddWaiter(ObjectWaiter* no

Re: RFR: 8247972: incorrect implementation of JVM TI GetObjectMonitorUsage [v23]

2024-03-10 Thread David Holmes
On Fri, 8 Mar 2024 06:11:23 GMT, Serguei Spitsyn wrote: >> The implementation of the JVM TI `GetObjectMonitorUsage` does not match the >> spec. >> The function returns the following structure: >> >> >> typedef struct { >> jthread owner; >> jint entry_count; >> jint waiter_count; >>

Re: RFR: 8247972: incorrect implementation of JVM TI GetObjectMonitorUsage [v23]

2024-03-07 Thread Serguei Spitsyn
> The implementation of the JVM TI `GetObjectMonitorUsage` does not match the > spec. > The function returns the following structure: > > > typedef struct { > jthread owner; > jint entry_count; > jint waiter_count; > jthread* waiters; > jint notify_waiter_count; > jthread

Re: RFR: 8247972: incorrect implementation of JVM TI GetObjectMonitorUsage [v22]

2024-03-05 Thread Serguei Spitsyn
On Tue, 5 Mar 2024 08:53:42 GMT, Serguei Spitsyn wrote: >> src/hotspot/share/prims/jvmtiEnvBase.cpp line 1507: >> >>> 1505: nWait = 0; >>> 1506: for (ObjectWaiter* waiter = mon->first_waiter(); >>> 1507: waiter != nullptr && (nWait == 0 || waiter != >>> mon->first_waiter()); >>

Re: RFR: 8247972: incorrect implementation of JVM TI GetObjectMonitorUsage [v22]

2024-03-05 Thread Serguei Spitsyn
On Tue, 5 Mar 2024 06:30:20 GMT, David Holmes wrote: >> Serguei Spitsyn has updated the pull request incrementally with one >> additional commit since the last revision: >> >> review: addressed more comments on the fix and new test > > src/hotspot/share/prims/jvmtiEnvBase.cpp line 1507: > >>

Re: RFR: 8247972: incorrect implementation of JVM TI GetObjectMonitorUsage [v22]

2024-03-04 Thread David Holmes
On Tue, 5 Mar 2024 03:40:04 GMT, Serguei Spitsyn wrote: >> The implementation of the JVM TI `GetObjectMonitorUsage` does not match the >> spec. >> The function returns the following structure: >> >> >> typedef struct { >> jthread owner; >> jint entry_count; >> jint waiter_count; >>

Re: RFR: 8247972: incorrect implementation of JVM TI GetObjectMonitorUsage [v22]

2024-03-04 Thread Serguei Spitsyn
> The implementation of the JVM TI `GetObjectMonitorUsage` does not match the > spec. > The function returns the following structure: > > > typedef struct { > jthread owner; > jint entry_count; > jint waiter_count; > jthread* waiters; > jint notify_waiter_count; > jthread

Re: RFR: 8247972: incorrect implementation of JVM TI GetObjectMonitorUsage [v21]

2024-03-04 Thread Serguei Spitsyn
On Mon, 4 Mar 2024 10:02:03 GMT, Serguei Spitsyn wrote: >> src/hotspot/share/prims/jvmtiEnvBase.cpp line 1552: >> >>> 1550: // If the thread was found on the ObjectWaiter list, then >>> 1551: // it has not been notified. This thread can't change the >>> 1552: // state of

Re: RFR: 8247972: incorrect implementation of JVM TI GetObjectMonitorUsage [v21]

2024-03-04 Thread Serguei Spitsyn
On Mon, 4 Mar 2024 03:28:28 GMT, David Holmes wrote: >> Serguei Spitsyn has updated the pull request incrementally with one >> additional commit since the last revision: >> >> rename after merge: jvmti_common.h to jvmti_common.hpp > > test/hotspot/jtreg/serviceability/jvmti/ObjectMonitorUsage

Re: RFR: 8247972: incorrect implementation of JVM TI GetObjectMonitorUsage [v21]

2024-03-04 Thread Serguei Spitsyn
On Mon, 4 Mar 2024 03:26:58 GMT, David Holmes wrote: >> Serguei Spitsyn has updated the pull request incrementally with one >> additional commit since the last revision: >> >> rename after merge: jvmti_common.h to jvmti_common.hpp > > test/hotspot/jtreg/serviceability/jvmti/ObjectMonitorUsage

Re: RFR: 8247972: incorrect implementation of JVM TI GetObjectMonitorUsage [v21]

2024-03-04 Thread Serguei Spitsyn
On Mon, 4 Mar 2024 03:29:01 GMT, David Holmes wrote: >> Serguei Spitsyn has updated the pull request incrementally with one >> additional commit since the last revision: >> >> rename after merge: jvmti_common.h to jvmti_common.hpp > > test/hotspot/jtreg/serviceability/jvmti/ObjectMonitorUsage

Re: RFR: 8247972: incorrect implementation of JVM TI GetObjectMonitorUsage [v21]

2024-03-04 Thread Serguei Spitsyn
On Mon, 4 Mar 2024 03:41:55 GMT, David Holmes wrote: >> Serguei Spitsyn has updated the pull request incrementally with one >> additional commit since the last revision: >> >> rename after merge: jvmti_common.h to jvmti_common.hpp > > test/hotspot/jtreg/serviceability/jvmti/ObjectMonitorUsage

Re: RFR: 8247972: incorrect implementation of JVM TI GetObjectMonitorUsage [v21]

2024-03-04 Thread Serguei Spitsyn
On Mon, 4 Mar 2024 03:20:41 GMT, David Holmes wrote: >> Serguei Spitsyn has updated the pull request incrementally with one >> additional commit since the last revision: >> >> rename after merge: jvmti_common.h to jvmti_common.hpp > > src/hotspot/share/prims/jvmtiEnvBase.cpp line 1505: > >>

Re: RFR: 8247972: incorrect implementation of JVM TI GetObjectMonitorUsage [v21]

2024-03-04 Thread Serguei Spitsyn
On Mon, 4 Mar 2024 03:07:58 GMT, David Holmes wrote: >> Serguei Spitsyn has updated the pull request incrementally with one >> additional commit since the last revision: >> >> rename after merge: jvmti_common.h to jvmti_common.hpp > > src/hotspot/share/prims/jvmtiEnvBase.cpp line 1489: > >>

Re: RFR: 8247972: incorrect implementation of JVM TI GetObjectMonitorUsage [v21]

2024-03-03 Thread David Holmes
On Fri, 1 Mar 2024 11:50:05 GMT, Serguei Spitsyn wrote: >> The implementation of the JVM TI `GetObjectMonitorUsage` does not match the >> spec. >> The function returns the following structure: >> >> >> typedef struct { >> jthread owner; >> jint entry_count; >> jint waiter_count; >>

Re: RFR: 8247972: incorrect implementation of JVM TI GetObjectMonitorUsage [v21]

2024-03-03 Thread David Holmes
On Fri, 1 Mar 2024 11:50:05 GMT, Serguei Spitsyn wrote: >> The implementation of the JVM TI `GetObjectMonitorUsage` does not match the >> spec. >> The function returns the following structure: >> >> >> typedef struct { >> jthread owner; >> jint entry_count; >> jint waiter_count; >>

Re: RFR: 8247972: incorrect implementation of JVM TI GetObjectMonitorUsage [v8]

2024-03-01 Thread Serguei Spitsyn
On Wed, 14 Feb 2024 21:13:56 GMT, Daniel D. Daugherty wrote: >> Serguei Spitsyn has updated the pull request incrementally with one >> additional commit since the last revision: >> >> review: added assert to get_pending_threads; added suggested coverage to >> test objmonusage003 > > CHECK_F

Re: RFR: 8247972: incorrect implementation of JVM TI GetObjectMonitorUsage [v21]

2024-03-01 Thread Serguei Spitsyn
> The implementation of the JVM TI `GetObjectMonitorUsage` does not match the > spec. > The function returns the following structure: > > > typedef struct { > jthread owner; > jint entry_count; > jint waiter_count; > jthread* waiters; > jint notify_waiter_count; > jthread

Re: RFR: 8247972: incorrect implementation of JVM TI GetObjectMonitorUsage [v20]

2024-03-01 Thread Serguei Spitsyn
> The implementation of the JVM TI `GetObjectMonitorUsage` does not match the > spec. > The function returns the following structure: > > > typedef struct { > jthread owner; > jint entry_count; > jint waiter_count; > jthread* waiters; > jint notify_waiter_count; > jthread

Re: RFR: 8247972: incorrect implementation of JVM TI GetObjectMonitorUsage [v19]

2024-03-01 Thread Serguei Spitsyn
> The implementation of the JVM TI `GetObjectMonitorUsage` does not match the > spec. > The function returns the following structure: > > > typedef struct { > jthread owner; > jint entry_count; > jint waiter_count; > jthread* waiters; > jint notify_waiter_count; > jthread

Re: RFR: 8247972: incorrect implementation of JVM TI GetObjectMonitorUsage [v18]

2024-02-28 Thread Serguei Spitsyn
> The implementation of the JVM TI `GetObjectMonitorUsage` does not match the > spec. > The function returns the following structure: > > > typedef struct { > jthread owner; > jint entry_count; > jint waiter_count; > jthread* waiters; > jint notify_waiter_count; > jthread

Re: RFR: 8247972: incorrect implementation of JVM TI GetObjectMonitorUsage [v17]

2024-02-27 Thread Serguei Spitsyn
On Tue, 27 Feb 2024 18:24:04 GMT, Leonid Mesnik wrote: >> Serguei Spitsyn has updated the pull request incrementally with one >> additional commit since the last revision: >> >> fix a typo in libObjectMonitorUsage.cpp > > src/hotspot/share/runtime/threads.cpp line 1185: > >> 1183: } >> 1184:

Re: RFR: 8247972: incorrect implementation of JVM TI GetObjectMonitorUsage [v17]

2024-02-27 Thread Serguei Spitsyn
On Fri, 23 Feb 2024 18:40:10 GMT, Serguei Spitsyn wrote: >> The implementation of the JVM TI `GetObjectMonitorUsage` does not match the >> spec. >> The function returns the following structure: >> >> >> typedef struct { >> jthread owner; >> jint entry_count; >> jint waiter_count; >

Re: RFR: 8247972: incorrect implementation of JVM TI GetObjectMonitorUsage [v17]

2024-02-27 Thread Leonid Mesnik
On Fri, 23 Feb 2024 18:40:10 GMT, Serguei Spitsyn wrote: >> The implementation of the JVM TI `GetObjectMonitorUsage` does not match the >> spec. >> The function returns the following structure: >> >> >> typedef struct { >> jthread owner; >> jint entry_count; >> jint waiter_count; >

Re: RFR: 8247972: incorrect implementation of JVM TI GetObjectMonitorUsage [v17]

2024-02-23 Thread Serguei Spitsyn
> The implementation of the JVM TI `GetObjectMonitorUsage` does not match the > spec. > The function returns the following structure: > > > typedef struct { > jthread owner; > jint entry_count; > jint waiter_count; > jthread* waiters; > jint notify_waiter_count; > jthread

Re: RFR: 8247972: incorrect implementation of JVM TI GetObjectMonitorUsage [v16]

2024-02-23 Thread Serguei Spitsyn
> The implementation of the JVM TI `GetObjectMonitorUsage` does not match the > spec. > The function returns the following structure: > > > typedef struct { > jthread owner; > jint entry_count; > jint waiter_count; > jthread* waiters; > jint notify_waiter_count; > jthread

Re: RFR: 8247972: incorrect implementation of JVM TI GetObjectMonitorUsage [v15]

2024-02-23 Thread Serguei Spitsyn
> The implementation of the JVM TI `GetObjectMonitorUsage` does not match the > spec. > The function returns the following structure: > > > typedef struct { > jthread owner; > jint entry_count; > jint waiter_count; > jthread* waiters; > jint notify_waiter_count; > jthread

Re: RFR: 8247972: incorrect implementation of JVM TI GetObjectMonitorUsage [v14]

2024-02-22 Thread Serguei Spitsyn
On Thu, 22 Feb 2024 11:22:26 GMT, Serguei Spitsyn wrote: >> The implementation of the JVM TI `GetObjectMonitorUsage` does not match the >> spec. >> The function returns the following structure: >> >> >> typedef struct { >> jthread owner; >> jint entry_count; >> jint waiter_count; >

Re: RFR: 8247972: incorrect implementation of JVM TI GetObjectMonitorUsage [v14]

2024-02-22 Thread Serguei Spitsyn
> The implementation of the JVM TI `GetObjectMonitorUsage` does not match the > spec. > The function returns the following structure: > > > typedef struct { > jthread owner; > jint entry_count; > jint waiter_count; > jthread* waiters; > jint notify_waiter_count; > jthread

Re: RFR: 8247972: incorrect implementation of JVM TI GetObjectMonitorUsage [v13]

2024-02-21 Thread Serguei Spitsyn
On Wed, 21 Feb 2024 22:33:51 GMT, Leonid Mesnik wrote: >> Serguei Spitsyn has updated the pull request incrementally with one >> additional commit since the last revision: >> >> review: addressed minor issue with use of []; corrected the test >> desctiption > > test/hotspot/jtreg/vmTestbase/

Re: RFR: 8247972: incorrect implementation of JVM TI GetObjectMonitorUsage [v13]

2024-02-21 Thread Serguei Spitsyn
On Wed, 21 Feb 2024 22:34:19 GMT, Leonid Mesnik wrote: >> Serguei Spitsyn has updated the pull request incrementally with one >> additional commit since the last revision: >> >> review: addressed minor issue with use of []; corrected the test >> desctiption > > test/hotspot/jtreg/serviceabil

Re: RFR: 8247972: incorrect implementation of JVM TI GetObjectMonitorUsage [v13]

2024-02-21 Thread Serguei Spitsyn
On Wed, 21 Feb 2024 22:36:31 GMT, Leonid Mesnik wrote: >> Serguei Spitsyn has updated the pull request incrementally with one >> additional commit since the last revision: >> >> review: addressed minor issue with use of []; corrected the test >> desctiption > > test/hotspot/jtreg/serviceabil

Re: RFR: 8247972: incorrect implementation of JVM TI GetObjectMonitorUsage [v13]

2024-02-21 Thread Serguei Spitsyn
On Wed, 21 Feb 2024 22:23:27 GMT, Leonid Mesnik wrote: >> Serguei Spitsyn has updated the pull request incrementally with one >> additional commit since the last revision: >> >> review: addressed minor issue with use of []; corrected the test >> desctiption > > test/hotspot/jtreg/serviceabil

Re: RFR: 8247972: incorrect implementation of JVM TI GetObjectMonitorUsage [v13]

2024-02-21 Thread Serguei Spitsyn
On Tue, 20 Feb 2024 23:48:06 GMT, Serguei Spitsyn wrote: >> The implementation of the JVM TI `GetObjectMonitorUsage` does not match the >> spec. >> The function returns the following structure: >> >> >> typedef struct { >> jthread owner; >> jint entry_count; >> jint waiter_count; >

Re: RFR: 8247972: incorrect implementation of JVM TI GetObjectMonitorUsage [v13]

2024-02-21 Thread Leonid Mesnik
On Tue, 20 Feb 2024 23:48:06 GMT, Serguei Spitsyn wrote: >> The implementation of the JVM TI `GetObjectMonitorUsage` does not match the >> spec. >> The function returns the following structure: >> >> >> typedef struct { >> jthread owner; >> jint entry_count; >> jint waiter_count; >

Re: RFR: 8247972: incorrect implementation of JVM TI GetObjectMonitorUsage [v12]

2024-02-20 Thread Serguei Spitsyn
On Tue, 20 Feb 2024 06:15:07 GMT, David Holmes wrote: >> Serguei Spitsyn has updated the pull request incrementally with one >> additional commit since the last revision: >> >> review: addressed comments from David > > test/hotspot/jtreg/serviceability/jvmti/GetObjectMonitorUsage/ObjectMonito

Re: RFR: 8247972: incorrect implementation of JVM TI GetObjectMonitorUsage [v13]

2024-02-20 Thread Serguei Spitsyn
> The implementation of the JVM TI `GetObjectMonitorUsage` does not match the > spec. > The function returns the following structure: > > > typedef struct { > jthread owner; > jint entry_count; > jint waiter_count; > jthread* waiters; > jint notify_waiter_count; > jthread

Re: RFR: 8247972: incorrect implementation of JVM TI GetObjectMonitorUsage [v12]

2024-02-19 Thread David Holmes
On Mon, 19 Feb 2024 15:33:23 GMT, Serguei Spitsyn wrote: >> The implementation of the JVM TI `GetObjectMonitorUsage` does not match the >> spec. >> The function returns the following structure: >> >> >> typedef struct { >> jthread owner; >> jint entry_count; >> jint waiter_count; >

Re: RFR: 8247972: incorrect implementation of JVM TI GetObjectMonitorUsage [v12]

2024-02-19 Thread Serguei Spitsyn
> The implementation of the JVM TI `GetObjectMonitorUsage` does not match the > spec. > The function returns the following structure: > > > typedef struct { > jthread owner; > jint entry_count; > jint waiter_count; > jthread* waiters; > jint notify_waiter_count; > jthread

Re: RFR: 8247972: incorrect implementation of JVM TI GetObjectMonitorUsage [v9]

2024-02-19 Thread Serguei Spitsyn
On Fri, 16 Feb 2024 06:09:40 GMT, David Holmes wrote: >> Serguei Spitsyn has updated the pull request incrementally with one >> additional commit since the last revision: >> >> review: JDWP monitor_info spec clarification; removed debugging code from >> objmonusage001 > > src/hotspot/share/p

Re: RFR: 8247972: incorrect implementation of JVM TI GetObjectMonitorUsage [v9]

2024-02-19 Thread Serguei Spitsyn
On Fri, 16 Feb 2024 06:01:19 GMT, David Holmes wrote: >> Serguei Spitsyn has updated the pull request incrementally with one >> additional commit since the last revision: >> >> review: JDWP monitor_info spec clarification; removed debugging code from >> objmonusage001 > > src/hotspot/share/p

Re: RFR: 8247972: incorrect implementation of JVM TI GetObjectMonitorUsage [v11]

2024-02-19 Thread Serguei Spitsyn
> The implementation of the JVM TI `GetObjectMonitorUsage` does not match the > spec. > The function returns the following structure: > > > typedef struct { > jthread owner; > jint entry_count; > jint waiter_count; > jthread* waiters; > jint notify_waiter_count; > jthread

Re: RFR: 8247972: incorrect implementation of JVM TI GetObjectMonitorUsage [v10]

2024-02-17 Thread Serguei Spitsyn
> The implementation of the JVM TI `GetObjectMonitorUsage` does not match the > spec. > The function returns the following structure: > > > typedef struct { > jthread owner; > jint entry_count; > jint waiter_count; > jthread* waiters; > jint notify_waiter_count; > jthread

Re: RFR: 8247972: incorrect implementation of JVM TI GetObjectMonitorUsage [v9]

2024-02-15 Thread David Holmes
On Thu, 15 Feb 2024 19:55:08 GMT, Serguei Spitsyn wrote: >> The implementation of the JVM TI `GetObjectMonitorUsage` does not match the >> spec. >> The function returns the following structure: >> >> >> typedef struct { >> jthread owner; >> jint entry_count; >> jint waiter_count; >

Re: RFR: 8247972: incorrect implementation of JVM TI GetObjectMonitorUsage [v9]

2024-02-15 Thread Serguei Spitsyn
On Thu, 15 Feb 2024 19:55:08 GMT, Serguei Spitsyn wrote: >> The implementation of the JVM TI `GetObjectMonitorUsage` does not match the >> spec. >> The function returns the following structure: >> >> >> typedef struct { >> jthread owner; >> jint entry_count; >> jint waiter_count; >

Re: RFR: 8247972: incorrect implementation of JVM TI GetObjectMonitorUsage [v9]

2024-02-15 Thread Serguei Spitsyn
> The implementation of the JVM TI `GetObjectMonitorUsage` does not match the > spec. > The function returns the following structure: > > > typedef struct { > jthread owner; > jint entry_count; > jint waiter_count; > jthread* waiters; > jint notify_waiter_count; > jthread

Re: RFR: 8247972: incorrect implementation of JVM TI GetObjectMonitorUsage [v4]

2024-02-15 Thread Serguei Spitsyn
On Wed, 14 Feb 2024 01:52:16 GMT, David Holmes wrote: >> Thank you for the comment, David. >> Now the test checks: >> - the threads waiting to enter the monitor are returned correctly with all >> permutations of threads waiting to be notified and threads waiting to >> re-enter the monitor >> In

Re: RFR: 8247972: incorrect implementation of JVM TI GetObjectMonitorUsage [v5]

2024-02-14 Thread David Holmes
On Wed, 14 Feb 2024 12:16:38 GMT, Serguei Spitsyn wrote: >> src/hotspot/share/runtime/threads.cpp line 1200: >> >>> 1198: if (pending == monitor || >>> 1199: (waiting == monitor && >>> JavaThreadStatus::BLOCKED_ON_MONITOR_ENTER == >>> 1200: java_lang_Thread::get_thread_stat

Re: RFR: 8247972: incorrect implementation of JVM TI GetObjectMonitorUsage [v8]

2024-02-14 Thread Daniel D . Daugherty
On Wed, 14 Feb 2024 15:25:33 GMT, Serguei Spitsyn wrote: >> The implementation of the JVM TI `GetObjectMonitorUsage` does not match the >> spec. >> The function returns the following structure: >> >> >> typedef struct { >> jthread owner; >> jint entry_count; >> jint waiter_count; >

Re: RFR: 8247972: incorrect implementation of JVM TI GetObjectMonitorUsage [v4]

2024-02-14 Thread Serguei Spitsyn
On Wed, 14 Feb 2024 18:33:19 GMT, Daniel D. Daugherty wrote: >>> When you get the chance, can you checkout these possible >> changes for the objmonusage001 test? >> >> Thanks, Dan. I've pushed the suggested test changes but refactored them a >> little bit. > >> Thanks, Dan. I've pushed the sug

Re: RFR: 8247972: incorrect implementation of JVM TI GetObjectMonitorUsage [v4]

2024-02-14 Thread Daniel D . Daugherty
On Wed, 14 Feb 2024 11:56:27 GMT, Serguei Spitsyn wrote: > Thanks, Dan. I've pushed the suggested test changes but refactored them a > little bit. You are welcome. I presume the revised test passes with your fix in place. I made the test changes on a baseline repo and not a repo that had your

Re: RFR: 8247972: incorrect implementation of JVM TI GetObjectMonitorUsage [v3]

2024-02-14 Thread Serguei Spitsyn
On Thu, 8 Feb 2024 07:05:38 GMT, David Holmes wrote: >> Serguei Spitsyn has updated the pull request with a new target base due to a >> merge or a rebase. The incremental webrev excludes the unrelated changes >> brought in by the merge/rebase. The pull request contains three additional >> comm

Re: RFR: 8247972: incorrect implementation of JVM TI GetObjectMonitorUsage [v8]

2024-02-14 Thread Serguei Spitsyn
> The implementation of the JVM TI `GetObjectMonitorUsage` does not match the > spec. > The function returns the following structure: > > > typedef struct { > jthread owner; > jint entry_count; > jint waiter_count; > jthread* waiters; > jint notify_waiter_count; > jthread

Re: RFR: 8247972: incorrect implementation of JVM TI GetObjectMonitorUsage [v5]

2024-02-14 Thread Serguei Spitsyn
On Wed, 14 Feb 2024 02:18:58 GMT, David Holmes wrote: >> Serguei Spitsyn has updated the pull request with a new target base due to a >> merge or a rebase. The incremental webrev excludes the unrelated changes >> brought in by the merge/rebase. The pull request contains five additional >> comm

Re: RFR: 8247972: incorrect implementation of JVM TI GetObjectMonitorUsage [v7]

2024-02-14 Thread Serguei Spitsyn
> The implementation of the JVM TI `GetObjectMonitorUsage` does not match the > spec. > The function returns the following structure: > > > typedef struct { > jthread owner; > jint entry_count; > jint waiter_count; > jthread* waiters; > jint notify_waiter_count; > jthread

Re: RFR: 8247972: incorrect implementation of JVM TI GetObjectMonitorUsage [v4]

2024-02-14 Thread Serguei Spitsyn
On Tue, 13 Feb 2024 22:30:56 GMT, Daniel D. Daugherty wrote: > When you get the chance, can you checkout these possible changes for the objmonusage001 test? Thanks, Dan. I've pushed the suggested test changes but refactored them a little bit. - PR Comment: https://git.openjdk.org

Re: RFR: 8247972: incorrect implementation of JVM TI GetObjectMonitorUsage [v6]

2024-02-14 Thread Serguei Spitsyn
> The implementation of the JVM TI `GetObjectMonitorUsage` does not match the > spec. > The function returns the following structure: > > > typedef struct { > jthread owner; > jint entry_count; > jint waiter_count; > jthread* waiters; > jint notify_waiter_count; > jthread

Re: RFR: 8247972: incorrect implementation of JVM TI GetObjectMonitorUsage [v5]

2024-02-13 Thread David Holmes
On Tue, 13 Feb 2024 07:11:18 GMT, Serguei Spitsyn wrote: >> The implementation of the JVM TI `GetObjectMonitorUsage` does not match the >> spec. >> The function returns the following structure: >> >> >> typedef struct { >> jthread owner; >> jint entry_count; >> jint waiter_count; >

Re: RFR: 8247972: incorrect implementation of JVM TI GetObjectMonitorUsage [v4]

2024-02-13 Thread David Holmes
On Tue, 13 Feb 2024 08:34:57 GMT, Serguei Spitsyn wrote: >> test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetObjectMonitorUsage/objmonusage003.java >> line 33: >> >>> 31: final static int NUMBER_OF_ENTERER_THREADS = 4; >>> 32: final static int NUMBER_OF_WAITER_THREADS = 4; >>> 33: final

Re: RFR: 8247972: incorrect implementation of JVM TI GetObjectMonitorUsage [v4]

2024-02-13 Thread Daniel D . Daugherty
On Tue, 13 Feb 2024 08:39:38 GMT, Serguei Spitsyn wrote: >> Sorry really struggling to understand this now. We have gone from a simple >> miscalculation to apparently doing everything wrong. >> >> IIUC this API does not currently handle virtual threads correctly -i s that >> the case? If so I

Re: RFR: 8247972: incorrect implementation of JVM TI GetObjectMonitorUsage [v4]

2024-02-13 Thread Serguei Spitsyn
On Tue, 13 Feb 2024 07:08:33 GMT, David Holmes wrote: > Sorry really struggling to understand this now. We have gone from a simple > miscalculation to apparently doing everything wrong. IIUC this API does not > currently handle virtual threads correctly - is that the case? If so I would > like

Re: RFR: 8247972: incorrect implementation of JVM TI GetObjectMonitorUsage [v4]

2024-02-13 Thread Serguei Spitsyn
On Tue, 13 Feb 2024 07:06:05 GMT, David Holmes wrote: >> Serguei Spitsyn has updated the pull request incrementally with one >> additional commit since the last revision: >> >> review: fixed issues in get_object_monitor_usage; extended test coverage >> in objmonusage003 > > test/hotspot/jtre

Re: RFR: 8247972: incorrect implementation of JVM TI GetObjectMonitorUsage [v4]

2024-02-13 Thread Serguei Spitsyn
On Tue, 13 Feb 2024 06:55:46 GMT, David Holmes wrote: >> Serguei Spitsyn has updated the pull request incrementally with one >> additional commit since the last revision: >> >> review: fixed issues in get_object_monitor_usage; extended test coverage >> in objmonusage003 > > src/hotspot/share

Re: RFR: 8247972: incorrect implementation of JVM TI GetObjectMonitorUsage [v4]

2024-02-13 Thread Serguei Spitsyn
On Tue, 13 Feb 2024 07:00:41 GMT, David Holmes wrote: >> Serguei Spitsyn has updated the pull request incrementally with one >> additional commit since the last revision: >> >> review: fixed issues in get_object_monitor_usage; extended test coverage >> in objmonusage003 > > test/hotspot/jtre

Re: RFR: 8247972: incorrect implementation of JVM TI GetObjectMonitorUsage [v4]

2024-02-12 Thread David Holmes
On Sat, 10 Feb 2024 04:06:37 GMT, Serguei Spitsyn wrote: >> The implementation of the JVM TI `GetObjectMonitorUsage` does not match the >> spec. >> The function returns the following structure: >> >> >> typedef struct { >> jthread owner; >> jint entry_count; >> jint waiter_count; >

Re: RFR: 8247972: incorrect implementation of JVM TI GetObjectMonitorUsage [v5]

2024-02-12 Thread Serguei Spitsyn
> The implementation of the JVM TI `GetObjectMonitorUsage` does not match the > spec. > The function returns the following structure: > > > typedef struct { > jthread owner; > jint entry_count; > jint waiter_count; > jthread* waiters; > jint notify_waiter_count; > jthread

Re: RFR: 8247972: incorrect implementation of JVM TI GetObjectMonitorUsage [v4]

2024-02-10 Thread Serguei Spitsyn
On Sat, 10 Feb 2024 04:06:37 GMT, Serguei Spitsyn wrote: >> The implementation of the JVM TI `GetObjectMonitorUsage` does not match the >> spec. >> The function returns the following structure: >> >> >> typedef struct { >> jthread owner; >> jint entry_count; >> jint waiter_count; >

Re: RFR: 8247972: incorrect implementation of JVM TI GetObjectMonitorUsage [v3]

2024-02-09 Thread Serguei Spitsyn
On Thu, 8 Feb 2024 07:05:38 GMT, David Holmes 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 act

Re: RFR: 8247972: incorrect implementation of JVM TI GetObjectMonitorUsage [v4]

2024-02-09 Thread Serguei Spitsyn
> The implementation of the JVM TI `GetObjectMonitorUsage` does not match the > spec. > The function returns the following structure: > > > typedef struct { > jthread owner; > jint entry_count; > jint waiter_count; > jthread* waiters; > jint notify_waiter_count; > jthread

Re: RFR: 8247972: incorrect implementation of JVM TI GetObjectMonitorUsage [v3]

2024-02-09 Thread Serguei Spitsyn
On Thu, 8 Feb 2024 15:29:47 GMT, Daniel D. Daugherty wrote: >> Yes, I've figured this out now. Thank you for pointing to it. >> It feels, the counts can be calculated correctly without touching the >> implementation of `current_pending_monitor()`, `current_waiting_monitor()`, >> `_contensions`

Re: RFR: 8247972: incorrect implementation of JVM TI GetObjectMonitorUsage [v3]

2024-02-08 Thread Daniel D . Daugherty
On Thu, 8 Feb 2024 10:34:14 GMT, Serguei Spitsyn wrote: >> src/hotspot/share/prims/jvmtiEnvBase.cpp line 1521: >> >>> 1519: // we have contending and/or waiting threads >>> 1520: if (nWant > 0) { >>> 1521: // we have contending threads >> >> This block includes this logic: >

Re: RFR: 8247972: incorrect implementation of JVM TI GetObjectMonitorUsage [v3]

2024-02-08 Thread Serguei Spitsyn
On Wed, 7 Feb 2024 22:37:55 GMT, Daniel D. Daugherty wrote: >> Serguei Spitsyn has updated the pull request with a new target base due to a >> merge or a rebase. The incremental webrev excludes the unrelated changes >> brought in by the merge/rebase. The pull request contains three additional

Re: RFR: 8247972: incorrect implementation of JVM TI GetObjectMonitorUsage [v3]

2024-02-08 Thread Serguei Spitsyn
On Wed, 7 Feb 2024 22:49:31 GMT, Daniel D. Daugherty wrote: >> Serguei Spitsyn has updated the pull request with a new target base due to a >> merge or a rebase. The incremental webrev excludes the unrelated changes >> brought in by the merge/rebase. The pull request contains three additional

Re: RFR: 8247972: incorrect implementation of JVM TI GetObjectMonitorUsage [v3]

2024-02-08 Thread Serguei Spitsyn
On Wed, 7 Feb 2024 22:43:36 GMT, Daniel D. Daugherty wrote: >> Serguei Spitsyn has updated the pull request with a new target base due to a >> merge or a rebase. The incremental webrev excludes the unrelated changes >> brought in by the merge/rebase. The pull request contains three additional

Re: RFR: 8247972: incorrect implementation of JVM TI GetObjectMonitorUsage [v3]

2024-02-08 Thread Serguei Spitsyn
On Wed, 7 Feb 2024 21:56:01 GMT, Daniel D. Daugherty wrote: >> Serguei Spitsyn has updated the pull request with a new target base due to a >> merge or a rebase. The incremental webrev excludes the unrelated changes >> brought in by the merge/rebase. The pull request contains three additional

Re: RFR: 8247972: incorrect implementation of JVM TI GetObjectMonitorUsage [v3]

2024-02-07 Thread David Holmes
On Wed, 7 Feb 2024 07:02:11 GMT, Serguei Spitsyn wrote: >> The implementation of the JVM TI `GetObjectMonitorUsage` does not match the >> spec. >> The function returns the following structure: >> >> >> typedef struct { >> jthread owner; >> jint entry_count; >> jint waiter_count; >>

Re: RFR: 8247972: incorrect implementation of JVM TI GetObjectMonitorUsage [v3]

2024-02-07 Thread Daniel D . Daugherty
On Wed, 7 Feb 2024 07:02:11 GMT, Serguei Spitsyn wrote: >> The implementation of the JVM TI `GetObjectMonitorUsage` does not match the >> spec. >> The function returns the following structure: >> >> >> typedef struct { >> jthread owner; >> jint entry_count; >> jint waiter_count; >>

Re: RFR: 8247972: incorrect implementation of JVM TI GetObjectMonitorUsage [v3]

2024-02-06 Thread Serguei Spitsyn
> The implementation of the JVM TI `GetObjectMonitorUsage` does not match the > spec. > The function returns the following structure: > > > typedef struct { > jthread owner; > jint entry_count; > jint waiter_count; > jthread* waiters; > jint notify_waiter_count; > jthread

Re: RFR: 8247972: incorrect implementation of JVM TI GetObjectMonitorUsage [v2]

2024-02-05 Thread Serguei Spitsyn
> The implementation of the JVM TI `GetObjectMonitorUsage` does not match the > spec. > The function returns the following structure: > > > typedef struct { > jthread owner; > jint entry_count; > jint waiter_count; > jthread* waiters; > jint notify_waiter_count; > jthread

Re: RFR: 8247972: incorrect implementation of JVM TI GetObjectMonitorUsage

2024-02-05 Thread Serguei Spitsyn
On Fri, 2 Feb 2024 02:22:54 GMT, David Holmes wrote: >> The implementation of the JVM TI `GetObjectMonitorUsage` does not match the >> spec. >> The function returns the following structure: >> >> >> typedef struct { >> jthread owner; >> jint entry_count; >> jint waiter_count; >>

  1   2   >