Re: RFR: 8328083: degrade virtual thread support for GetObjectMonitorUsage [v7]

2024-05-23 Thread Serguei Spitsyn
On Wed, 15 May 2024 20:29:17 GMT, Serguei Spitsyn wrote: >> The fix is to degrade virtual threads support in the JVM TI >> `GetObjectMonitorUsage` function so that it is specified to only return an >> owner when the owner is a platform thread. Also, virtual threads are not >> listed in the

Re: RFR: 8328083: degrade virtual thread support for GetObjectMonitorUsage [v7]

2024-05-23 Thread Alan Bateman
On Wed, 15 May 2024 20:29:17 GMT, Serguei Spitsyn wrote: >> The fix is to degrade virtual threads support in the JVM TI >> `GetObjectMonitorUsage` function so that it is specified to only return an >> owner when the owner is a platform thread. Also, virtual threads are not >> listed in the

Re: RFR: 8328083: degrade virtual thread support for GetObjectMonitorUsage [v7]

2024-05-15 Thread Serguei Spitsyn
On Wed, 15 May 2024 20:29:17 GMT, Serguei Spitsyn wrote: >> The fix is to degrade virtual threads support in the JVM TI >> `GetObjectMonitorUsage` function so that it is specified to only return an >> owner when the owner is a platform thread. Also, virtual threads are not >> listed in the

Re: RFR: 8328083: degrade virtual thread support for GetObjectMonitorUsage [v7]

2024-05-15 Thread Chris Plummer
On Wed, 15 May 2024 20:29:17 GMT, Serguei Spitsyn wrote: >> The fix is to degrade virtual threads support in the JVM TI >> `GetObjectMonitorUsage` function so that it is specified to only return an >> owner when the owner is a platform thread. Also, virtual threads are not >> listed in the

Re: RFR: 8328083: degrade virtual thread support for GetObjectMonitorUsage [v4]

2024-05-15 Thread Serguei Spitsyn
On Wed, 15 May 2024 20:09:52 GMT, Serguei Spitsyn wrote: >> src/hotspot/share/prims/jvmtiEnvBase.cpp line 1535: >> >>> 1533: bool is_virtual = >>> java_lang_VirtualThread::is_instance(thread_oop); >>> 1534: if (is_virtual) { >>> 1535: skipped++; >> >> Do we really need to

Re: RFR: 8328083: degrade virtual thread support for GetObjectMonitorUsage [v7]

2024-05-15 Thread Serguei Spitsyn
> The fix is to degrade virtual threads support in the JVM TI > `GetObjectMonitorUsage` function so that it is specified to only return an > owner when the owner is a platform thread. Also, virtual threads are not > listed in the both `waiters` and `notify_waiters` lists returned in the >

Re: RFR: 8328083: degrade virtual thread support for GetObjectMonitorUsage [v6]

2024-05-15 Thread Serguei Spitsyn
> The fix is to degrade virtual threads support in the JVM TI > `GetObjectMonitorUsage` function so that it is specified to only return an > owner when the owner is a platform thread. Also, virtual threads are not > listed in the both `waiters` and `notify_waiters` lists returned in the >

Re: RFR: 8328083: degrade virtual thread support for GetObjectMonitorUsage [v4]

2024-05-15 Thread Serguei Spitsyn
On Wed, 15 May 2024 19:52:36 GMT, Chris Plummer wrote: >> Serguei Spitsyn has updated the pull request incrementally with one >> additional commit since the last revision: >> >> review: 1. clarifications in JDWP and JDI spec; 2. clarifications in test >> comments. > >

Re: RFR: 8328083: degrade virtual thread support for GetObjectMonitorUsage [v4]

2024-05-15 Thread Serguei Spitsyn
On Wed, 15 May 2024 19:51:51 GMT, Chris Plummer wrote: >> Serguei Spitsyn has updated the pull request incrementally with one >> additional commit since the last revision: >> >> review: 1. clarifications in JDWP and JDI spec; 2. clarifications in test >> comments. > >

Re: RFR: 8328083: degrade virtual thread support for GetObjectMonitorUsage [v5]

2024-05-15 Thread Serguei Spitsyn
> The fix is to degrade virtual threads support in the JVM TI > `GetObjectMonitorUsage` function so that it is specified to only return an > owner when the owner is a platform thread. Also, virtual threads are not > listed in the both `waiters` and `notify_waiters` lists returned in the >

Re: RFR: 8328083: degrade virtual thread support for GetObjectMonitorUsage [v4]

2024-05-15 Thread Chris Plummer
On Tue, 14 May 2024 23:56:14 GMT, Serguei Spitsyn wrote: >> The fix is to degrade virtual threads support in the JVM TI >> `GetObjectMonitorUsage` function so that it is specified to only return an >> owner when the owner is a platform thread. Also, virtual threads are not >> listed in the

Re: RFR: 8328083: degrade virtual thread support for GetObjectMonitorUsage [v4]

2024-05-15 Thread Chris Plummer
On Wed, 1 May 2024 20:49:02 GMT, Chris Plummer wrote: >> Serguei Spitsyn has updated the pull request incrementally with one >> additional commit since the last revision: >> >> review: 1. clarifications in JDWP and JDI spec; 2. clarifications in test >> comments. > >

Re: RFR: 8328083: degrade virtual thread support for GetObjectMonitorUsage [v4]

2024-05-15 Thread Chris Plummer
On Tue, 14 May 2024 23:19:14 GMT, Serguei Spitsyn wrote: >> Okay, please, let me explain this one more time. >> The original comments before method `check()` calls describe the testing >> scenario (or configuration setup before the verifying check) but not the >> numbers expected to be

Re: RFR: 8328083: degrade virtual thread support for GetObjectMonitorUsage [v4]

2024-05-14 Thread Serguei Spitsyn
> The fix is to degrade virtual threads support in the JVM TI > `GetObjectMonitorUsage` function so that it is specified to only return an > owner when the owner is a platform thread. Also, virtual threads are not > listed in the both `waiters` and `notify_waiters` lists returned in the >

Re: RFR: 8328083: degrade virtual thread support for GetObjectMonitorUsage [v3]

2024-05-14 Thread Serguei Spitsyn
On Wed, 1 May 2024 20:45:58 GMT, Chris Plummer wrote: >> Serguei Spitsyn has updated the pull request incrementally with one >> additional commit since the last revision: >> >> review: tweaks in JVMTI and JDWP changes > > src/jdk.jdi/share/classes/com/sun/jdi/ObjectReference.java line 348: >

Re: RFR: 8328083: degrade virtual thread support for GetObjectMonitorUsage [v3]

2024-05-14 Thread Serguei Spitsyn
On Thu, 2 May 2024 21:50:26 GMT, Chris Plummer wrote: >> src/java.se/share/data/jdwp/jdwp.spec line 1622: >> >>> 1620: (threadObject owner "The platform thread owning this >>> monitor, or nullptr " >>> 1621: "if owned` by a virtual thread or not >>>

Re: RFR: 8328083: degrade virtual thread support for GetObjectMonitorUsage [v3]

2024-05-14 Thread Serguei Spitsyn
On Tue, 14 May 2024 23:13:28 GMT, Serguei Spitsyn wrote: >> I don't understand the issue with the updated commented. It is precisely >> telling you what the expected "count" values should be. If you leave the >> macros in the comment, then the comment is wrong for virtual threads. If you >>

Re: RFR: 8328083: degrade virtual thread support for GetObjectMonitorUsage [v3]

2024-05-14 Thread Serguei Spitsyn
On Tue, 14 May 2024 17:51:03 GMT, Chris Plummer wrote: >>> expEnteringCount/expWaitingCount contain the tested patterns. >> >> I kind of disagree. >> Please, take look at the loop below: >> >> for (int i = 0; i < NUMBER_OF_WAITING_THREADS; i++) { >> expEnteringCount

Re: RFR: 8328083: degrade virtual thread support for GetObjectMonitorUsage [v3]

2024-05-14 Thread Chris Plummer
On Fri, 3 May 2024 10:42:45 GMT, Serguei Spitsyn wrote: >> ...and there are also comments above with this issue. > >> expEnteringCount/expWaitingCount contain the tested patterns. > > I kind of disagree. > Please, take look at the loop below: > > for (int i = 0; i <

Re: RFR: 8328083: degrade virtual thread support for GetObjectMonitorUsage [v3]

2024-05-03 Thread Serguei Spitsyn
> The fix is to degrade virtual threads support in the JVM TI > `GetObjectMonitorUsage` function so that it is specified to only return an > owner when the owner is a platform thread. Also, virtual threads are not > listed in the both `waiters` and `notify_waiters` lists returned in the >

Re: RFR: 8328083: degrade virtual thread support for GetObjectMonitorUsage [v3]

2024-05-03 Thread Serguei Spitsyn
On Thu, 2 May 2024 21:47:50 GMT, Chris Plummer wrote: >> expEnteringCount/expWaitingCount contain the tested patterns. I don't see >> why they can't just replace >> NUMBER_OF_ENTERING_THREADS/NUMBER_OF_WAITING_THREADS in the comments also. >> In fact it is confusing if you don't because code

Re: RFR: 8328083: degrade virtual thread support for GetObjectMonitorUsage [v2]

2024-05-03 Thread Serguei Spitsyn
On Fri, 3 May 2024 06:40:07 GMT, Alan Bateman wrote: >> src/hotspot/share/prims/jvmti.xml line 8280: >> >>> 8278: >>> 8279: The number of platform threads waiting to own this >>> monitor, or 0 >>> 8280: if only virtual threads are waiting or no threads are

Re: RFR: 8328083: degrade virtual thread support for GetObjectMonitorUsage [v2]

2024-05-03 Thread Alan Bateman
On Thu, 2 May 2024 21:44:43 GMT, Chris Plummer wrote: >> Serguei Spitsyn has updated the pull request incrementally with one >> additional commit since the last revision: >> >> review: Corrections in: 1) JVMTI/JDWP spec; 2) test vthread checks; 3) >> test comments > >

Re: RFR: 8328083: degrade virtual thread support for GetObjectMonitorUsage [v2]

2024-05-02 Thread Chris Plummer
On Thu, 2 May 2024 21:36:27 GMT, Chris Plummer wrote: >> Thank you for the comment. In fact, I don't know how to fix it. >> Replacing of NUMBER_OF_ENTERING_THREADS/NUMBER_OF_WAITING_THREADS in >> comments with `expEnteringCount/expWaitingCount` does not make sense to me. >> The comments are

Re: RFR: 8328083: degrade virtual thread support for GetObjectMonitorUsage [v2]

2024-05-02 Thread Chris Plummer
On Thu, 2 May 2024 07:33:09 GMT, Serguei Spitsyn wrote: >> The fix is to degrade virtual threads support in the JVM TI >> `GetObjectMonitorUsage` function so that it is specified to only return an >> owner when the owner is a platform thread. Also, virtual threads are not >> listed in the

Re: RFR: 8328083: degrade virtual thread support for GetObjectMonitorUsage [v2]

2024-05-02 Thread Chris Plummer
On Wed, 1 May 2024 20:42:16 GMT, Chris Plummer wrote: >> Serguei Spitsyn has updated the pull request incrementally with one >> additional commit since the last revision: >> >> review: Corrections in: 1) JVMTI/JDWP spec; 2) test vthread checks; 3) >> test comments > >

Re: RFR: 8328083: degrade virtual thread support for GetObjectMonitorUsage [v2]

2024-05-02 Thread Chris Plummer
On Thu, 2 May 2024 06:45:39 GMT, Serguei Spitsyn wrote: >> test/hotspot/jtreg/serviceability/jvmti/ObjectMonitorUsage/ObjectMonitorUsage.java >> line 257: >> >>> 255: // Correct the expected values for the virtual thread case. >>> 256: int expEnteringCount = isVirtual ?

Re: RFR: 8328083: degrade virtual thread support for GetObjectMonitorUsage [v2]

2024-05-02 Thread Serguei Spitsyn
On Thu, 2 May 2024 07:33:09 GMT, Serguei Spitsyn wrote: >> The fix is to degrade virtual threads support in the JVM TI >> `GetObjectMonitorUsage` function so that it is specified to only return an >> owner when the owner is a platform thread. Also, virtual threads are not >> listed in the

Re: RFR: 8328083: degrade virtual thread support for GetObjectMonitorUsage [v2]

2024-05-02 Thread Alan Bateman
On Thu, 2 May 2024 07:33:09 GMT, Serguei Spitsyn wrote: >> The fix is to degrade virtual threads support in the JVM TI >> `GetObjectMonitorUsage` function so that it is specified to only return an >> owner when the owner is a platform thread. Also, virtual threads are not >> listed in the

Re: RFR: 8328083: degrade virtual thread support for GetObjectMonitorUsage [v2]

2024-05-02 Thread Serguei Spitsyn
> The fix is to degrade virtual threads support in the JVM TI > `GetObjectMonitorUsage` function so that it is specified to only return an > owner when the owner is a platform thread. Also, virtual threads are not > listed in the both `waiters` and `notify_waiters` lists returned in the >

Re: RFR: 8328083: degrade virtual thread support for GetObjectMonitorUsage

2024-05-02 Thread Serguei Spitsyn
On Wed, 1 May 2024 21:01:16 GMT, Chris Plummer wrote: >> The fix is to degrade virtual threads support in the JVM TI >> `GetObjectMonitorUsage` function so that it is specified to only return an >> owner when the owner is a platform thread. Also, virtual threads are not >> listed in the both

Re: RFR: 8328083: degrade virtual thread support for GetObjectMonitorUsage

2024-05-02 Thread Serguei Spitsyn
On Wed, 1 May 2024 21:11:36 GMT, Chris Plummer wrote: >> The fix is to degrade virtual threads support in the JVM TI >> `GetObjectMonitorUsage` function so that it is specified to only return an >> owner when the owner is a platform thread. Also, virtual threads are not >> listed in the both

Re: RFR: 8328083: degrade virtual thread support for GetObjectMonitorUsage

2024-05-02 Thread Serguei Spitsyn
On Thu, 2 May 2024 02:49:35 GMT, David Holmes wrote: >> You can drop "the" from "with the JTREG_TEST_THREAD_FACTORY=Virtual" > > And drop "the" from "the GetObjectMonitorUsage". Thank you. Updated. - PR Review Comment: https://git.openjdk.org/jdk/pull/19030#discussion_r1587137513

Re: RFR: 8328083: degrade virtual thread support for GetObjectMonitorUsage

2024-05-02 Thread Serguei Spitsyn
On Thu, 2 May 2024 02:47:19 GMT, David Holmes wrote: >> Okay, thanks. > > Second suggestion is better. "waited by" is not grammatically correct in this > context. Thank you, David. So, the latest version is: The number of platform threads waiting to own this monitor, or 0

Re: RFR: 8328083: degrade virtual thread support for GetObjectMonitorUsage

2024-05-01 Thread David Holmes
On Wed, 1 May 2024 23:17:58 GMT, Chris Plummer wrote: >> Good suggestion, thanks. Then I'd suggest this: >> >> // Virtual threads are not supported by the GetObjectMonitorUsage. >> // Correct the expected values if the test is executed with the >> //

Re: RFR: 8328083: degrade virtual thread support for GetObjectMonitorUsage

2024-05-01 Thread David Holmes
On Thu, 2 May 2024 00:51:20 GMT, Serguei Spitsyn wrote: >> Copy and paste issue on my part. I would use "if only virtual threads". > > Okay, thanks. Second suggestion is better. "waited by" is not grammatically correct in this context. - PR Review Comment:

Re: RFR: 8328083: degrade virtual thread support for GetObjectMonitorUsage

2024-05-01 Thread Serguei Spitsyn
On Wed, 1 May 2024 23:16:09 GMT, Chris Plummer wrote: >> Good suggestion, thanks. But it is more "incorrect". It should say "is >> waited by" instead of "is owned by": >> >>The number of platform threads waiting to own this monitor, or >> 0 >>if is waited by virtual

Re: RFR: 8328083: degrade virtual thread support for GetObjectMonitorUsage

2024-05-01 Thread Serguei Spitsyn
On Wed, 1 May 2024 20:40:35 GMT, Chris Plummer wrote: >> The fix is to degrade virtual threads support in the JVM TI >> `GetObjectMonitorUsage` function so that it is specified to only return an >> owner when the owner is a platform thread. Also, virtual threads are not >> listed in the both

Re: RFR: 8328083: degrade virtual thread support for GetObjectMonitorUsage

2024-05-01 Thread Chris Plummer
On Wed, 1 May 2024 22:40:02 GMT, Serguei Spitsyn wrote: >> src/hotspot/share/prims/jvmti.xml line 8266: >> >>> 8264: >>> 8265: The number of platform threads waiting to own this >>> monitor, >>> 8266: or 0 if the monitor is owned by a virtual >>> thread or

Re: RFR: 8328083: degrade virtual thread support for GetObjectMonitorUsage

2024-05-01 Thread Serguei Spitsyn
On Wed, 1 May 2024 21:03:31 GMT, Chris Plummer wrote: >> The fix is to degrade virtual threads support in the JVM TI >> `GetObjectMonitorUsage` function so that it is specified to only return an >> owner when the owner is a platform thread. Also, virtual threads are not >> listed in the both

Re: RFR: 8328083: degrade virtual thread support for GetObjectMonitorUsage

2024-05-01 Thread Serguei Spitsyn
On Wed, 1 May 2024 20:30:54 GMT, Chris Plummer wrote: >> The fix is to degrade virtual threads support in the JVM TI >> `GetObjectMonitorUsage` function so that it is specified to only return an >> owner when the owner is a platform thread. Also, virtual threads are not >> listed in the both

Re: RFR: 8328083: degrade virtual thread support for GetObjectMonitorUsage

2024-05-01 Thread Serguei Spitsyn
On Wed, 1 May 2024 20:21:28 GMT, Chris Plummer wrote: >> The fix is to degrade virtual threads support in the JVM TI >> `GetObjectMonitorUsage` function so that it is specified to only return an >> owner when the owner is a platform thread. Also, virtual threads are not >> listed in the both

Re: RFR: 8328083: degrade virtual thread support for GetObjectMonitorUsage

2024-05-01 Thread Serguei Spitsyn
On Wed, 1 May 2024 20:21:25 GMT, Chris Plummer wrote: >> The fix is to degrade virtual threads support in the JVM TI >> `GetObjectMonitorUsage` function so that it is specified to only return an >> owner when the owner is a platform thread. Also, virtual threads are not >> listed in the both

Re: RFR: 8328083: degrade virtual thread support for GetObjectMonitorUsage

2024-05-01 Thread Chris Plummer
On Wed, 1 May 2024 10:20:52 GMT, Serguei Spitsyn wrote: > The fix is to degrade virtual threads support in the JVM TI > `GetObjectMonitorUsage` function so that it is specified to only return an > owner when the owner is a platform thread. Also, virtual threads are not > listed in the both

RFR: 8328083: degrade virtual thread support for GetObjectMonitorUsage

2024-05-01 Thread Serguei Spitsyn
The fix is to degrade virtual threads support in the JVM TI `GetObjectMonitorUsage` function so that it is specified to only return an owner when the owner is a platform thread. Also, virtual threads are not listed in the both `waiters` and `notify_waiters` lists returned in the