Re: RFR: 8325187: JVMTI GetThreadState says virtual thread is JVMTI_THREAD_STATE_INTERRUPTED when it no longer is [v2]

2024-03-05 Thread Serguei Spitsyn
On Tue, 5 Mar 2024 07:47:19 GMT, Alan Bateman wrote: >> Thank you for sharing this, Chris. It sounds like we need to introduce a >> mechanism to temporarily hide the JVMTI events. The question is if it is >> worth the complexity we add with it, especially if it is used just in a >> couple of

Re: RFR: 8325187: JVMTI GetThreadState says virtual thread is JVMTI_THREAD_STATE_INTERRUPTED when it no longer is [v2]

2024-03-05 Thread Serguei Spitsyn
On Tue, 5 Mar 2024 07:07:27 GMT, David Holmes wrote: > I have to say that I don't understand how the behaviour of `RawMonitorWait` > is any different to `ObjectMonitor::wait` when it comes to the use of the > is_interrupted(true). ??? Is it simply that because we are in native code and > we

Re: RFR: 8325187: JVMTI GetThreadState says virtual thread is JVMTI_THREAD_STATE_INTERRUPTED when it no longer is [v2]

2024-03-05 Thread Serguei Spitsyn
On Tue, 5 Mar 2024 18:16:03 GMT, Leonid Mesnik wrote: >> Serguei Spitsyn has updated the pull request incrementally with one >> additional commit since the last revision: >> >> review: addressed a couple of comments on new test > > test/hotspot/jtre

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 &&am

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/pr

Re: RFR: 8256314: JVM TI GetCurrentContendedMonitor is implemented incorrectly [v4]

2024-03-04 Thread Serguei Spitsyn
On Mon, 4 Mar 2024 09:51:32 GMT, Serguei Spitsyn wrote: >> src/hotspot/share/prims/jvmtiEnvBase.cpp line 941: >> >>> 939: bool is_virtual = java_lang_VirtualThread::is_instance(thread_oop); >>> 940: jint state = is_virtual ? >>> JvmtiEnvBase::ge

Re: RFR: 8256314: JVM TI GetCurrentContendedMonitor is implemented incorrectly [v6]

2024-03-04 Thread Serguei Spitsyn
> RN: [8326038](https://bugs.openjdk.org/browse/JDK-8326038): Release Note: > JVM TI GetCurrentContendedMonitor is implemented incorrectly > > Testing: > - tested with the mach5 tiers 1-6 Serguei Spitsyn has updated the pull request incrementally with one additional commit since t

Re: RFR: 8325187: JVMTI GetThreadState says virtual thread is JVMTI_THREAD_STATE_INTERRUPTED when it no longer is [v2]

2024-03-04 Thread Serguei Spitsyn
esting: > - tested with new test > `hotspot/jtreg/serviceability/jvmti/vthread/InterruptRawMonitor` which is > passed with the fix and failed without it > - ran mach5 tiers 1-6 Serguei Spitsyn has updated the pull request incrementally with one additional commit since the last

Re: RFR: 8325187: JVMTI GetThreadState says virtual thread is JVMTI_THREAD_STATE_INTERRUPTED when it no longer is

2024-03-04 Thread Serguei Spitsyn
On Mon, 4 Mar 2024 22:04:39 GMT, Chris Plummer wrote: >> Please, review this fix correcting the JVMTI `RawMonitorWait()` >> implementation. >> The `RawMonitorWait()` is using the the `jt->is_interrupted(true)` to >> update the interrupt status of the interrupted waiting thread. The issue is

Re: RFR: 8256314: JVM TI GetCurrentContendedMonitor is implemented incorrectly [v4]

2024-03-04 Thread Serguei Spitsyn
On Mon, 4 Mar 2024 09:49:07 GMT, Serguei Spitsyn wrote: >> src/java.se/share/data/jdwp/jdwp.spec line 1985: >> >>> 1983: "thread may be waiting to enter the object's monitor, or in " >>> 1984: "java.lang.Object.wait waiting to re-

Re: RFR: 8256314: JVM TI GetCurrentContendedMonitor is implemented incorrectly [v4]

2024-03-04 Thread Serguei Spitsyn
On Fri, 1 Mar 2024 11:19:21 GMT, Serguei Spitsyn wrote: >> The implementation of the JVM TI `GetCurrentContendedMonitor()` does not >> match the spec. It can sometimes return an incorrect information about the >> contended monitor. Such a behavior does not match

Re: RFR: 8256314: JVM TI GetCurrentContendedMonitor is implemented incorrectly [v5]

2024-03-04 Thread Serguei Spitsyn
> RN: [8326038](https://bugs.openjdk.org/browse/JDK-8326038): Release Note: > JVM TI GetCurrentContendedMonitor is implemented incorrectly > > Testing: > - tested with the mach5 tiers 1-6 Serguei Spitsyn has updated the pull request incrementally with one additional commit sinc

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

2024-03-04 Thread Serguei Spitsyn
plementation of JVM TI GetObjectMonitorUsage > > The Release-Note is: > [8325314](https://bugs.openjdk.org/browse/JDK-8325314): Release Note: > incorrect implementation of JVM TI GetObjectMonitorUsage > > Testing: > - tested with mach5 tiers 1-6 Serguei Spitsyn has updated the pull reque

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

Re: RFR: 8325187: JVMTI GetThreadState says virtual thread is JVMTI_THREAD_STATE_INTERRUPTED when it no longer is

2024-03-04 Thread Serguei Spitsyn
On Tue, 5 Mar 2024 00:54:10 GMT, Chris Plummer wrote: >> @AlanBateman said: >>> So minimally RawMonitorWait will need to disable suspend and and clear the >>> interrupt status of both threads while holding the interrupt lock. >> >> If we do it with a Java upcall to the

Re: RFR: 8325187: JVMTI GetThreadState says virtual thread is JVMTI_THREAD_STATE_INTERRUPTED when it no longer is

2024-03-04 Thread Serguei Spitsyn
On Mon, 4 Mar 2024 11:51:01 GMT, Alan Bateman wrote: >> Alan and David, thank you for the comments! >> The initial implementation of the `is_iterrupt()` intentionally avoided any >> synchronization and allowed a potential raises with the concurrent >> interrupts. Please, see the comment above

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/hots

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/hots

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/hots

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/hots

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/pr

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/pr

Re: RFR: 8256314: JVM TI GetCurrentContendedMonitor is implemented incorrectly [v4]

2024-03-04 Thread Serguei Spitsyn
On Mon, 4 Mar 2024 07:06:31 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 contai

Re: RFR: 8325187: JVMTI GetThreadState says virtual thread is JVMTI_THREAD_STATE_INTERRUPTED when it no longer is

2024-03-04 Thread Serguei Spitsyn
On Mon, 4 Mar 2024 04:09:35 GMT, David Holmes wrote: >> src/hotspot/share/runtime/javaThread.cpp line 594: >> >>> 592: // thread_oop is virtual, clear carrier thread interrupt status >>> as well >>> 593: java_lang_Thread::set_interrupted(threadObj(), false); >>> 594: } >> >>

Re: RFR: 8325532: serviceability/dcmd/compiler/PerfMapTest.java leaves created files in the /tmp dir.

2024-03-01 Thread Serguei Spitsyn
On Sat, 2 Mar 2024 00:44:02 GMT, Chris Plummer wrote: >> test/hotspot/jtreg/serviceability/dcmd/compiler/PerfMapTest.java line 103: >> >>> 101: } while(Files.exists(path)); >>> 102: run(new JMXExecutor(), "Compiler.perfmap " + path.toString(), >>> path); >>> 103: } >> >>

Re: RFR: 8325532: serviceability/dcmd/compiler/PerfMapTest.java leaves created files in the /tmp dir.

2024-03-01 Thread Serguei Spitsyn
On Fri, 23 Feb 2024 21:55:15 GMT, Chris Plummer wrote: > PerfMapTest.java issues the Compiler.perfmap jcmd with a filename argument to > write the perfmap to. It does this in 3 different modes. 2 of the modes > result in a perfmap file being left in the tmp directory that is not removed >

RFR: 8325187: JVMTI GetThreadState says virtual thread is JVMTI_THREAD_STATE_INTERRUPTED when it no longer is

2024-03-01 Thread Serguei Spitsyn
Please, review this fix correcting the JVMTI `RawMonitorWait()` implementation. The `RawMonitorWait()` is using the the `jt->is_interrupted(true)` to update the interrupt status of the interrupted waiting thread. The issue is that when it calls `jt->is_interrupted(true)` to fetch and clear

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

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

2024-03-01 Thread Serguei Spitsyn
plementation of JVM TI GetObjectMonitorUsage > > The Release-Note is: > [8325314](https://bugs.openjdk.org/browse/JDK-8325314): Release Note: > incorrect implementation of JVM TI GetObjectMonitorUsage > > Testing: > - tested with mach5 tiers 1-6 Serguei Spitsyn has updated the pull requ

Re: RFR: 8256314: JVM TI GetCurrentContendedMonitor is implemented incorrectly [v4]

2024-03-01 Thread Serguei Spitsyn
> RN: [8326038](https://bugs.openjdk.org/browse/JDK-8326038): Release Note: > JVM TI GetCurrentContendedMonitor is implemented incorrectly > > Testing: > - tested with the mach5 tiers 1-6 Serguei Spitsyn has updated the pull request with a new target base due to a merge or a r

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

2024-03-01 Thread Serguei Spitsyn
plementation of JVM TI GetObjectMonitorUsage > > The Release-Note is: > [8325314](https://bugs.openjdk.org/browse/JDK-8325314): Release Note: > incorrect implementation of JVM TI GetObjectMonitorUsage > > Testing: > - tested with mach5 tiers 1-6 Serguei Spitsyn has updated the pull

Re: RFR: 8256314: JVM TI GetCurrentContendedMonitor is implemented incorrectly [v3]

2024-03-01 Thread Serguei Spitsyn
On Thu, 29 Feb 2024 04:17:09 GMT, Serguei Spitsyn wrote: >> The implementation of the JVM TI `GetCurrentContendedMonitor()` does not >> match the spec. It can sometimes return an incorrect information about the >> contended monitor. Such a behavior does not match

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

2024-03-01 Thread Serguei Spitsyn
plementation of JVM TI GetObjectMonitorUsage > > The Release-Note is: > [8325314](https://bugs.openjdk.org/browse/JDK-8325314): Release Note: > incorrect implementation of JVM TI GetObjectMonitorUsage > > Testing: > - tested with mach5 tiers 1-6 Serguei Spitsyn has updated

Re: RFR: 8327056: Remove unused static char array in JvmtiAgentList::lookup

2024-02-29 Thread Serguei Spitsyn
On Thu, 29 Feb 2024 15:02:02 GMT, Denghui Dong wrote: > Hi, > > Please help review this trivial change that removed an unused static char > array in JvmtiAgentList::lookup. > > Thanks Looks good and trivial. - Marked as reviewed by sspitsyn (Reviewer). PR Review:

Re: RFR: 8256314: JVM TI GetCurrentContendedMonitor is implemented incorrectly [v3]

2024-02-28 Thread Serguei Spitsyn
> RN: [8326038](https://bugs.openjdk.org/browse/JDK-8326038): Release Note: > JVM TI GetCurrentContendedMonitor is implemented incorrectly > > Testing: > - tested with the mach5 tiers 1-6 Serguei Spitsyn has updated the pull request with a new target base due to a merge or a r

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

2024-02-28 Thread Serguei Spitsyn
plementation of JVM TI GetObjectMonitorUsage > > The Release-Note is: > [8325314](https://bugs.openjdk.org/browse/JDK-8325314): Release Note: > incorrect implementation of JVM TI GetObjectMonitorUsage > > Testing: > - tested with mach5 tiers 1-6 Serguei Spitsyn has updated the pull reques

Re: RFR: JDK-8326525: com/sun/tools/attach/BasicTests.java does not verify AgentLoadException case

2024-02-28 Thread Serguei Spitsyn
On Thu, 22 Feb 2024 19:46:58 GMT, Alex Menkov wrote: > The change updates the test to throw an exception if expected > AgentLoadException is not thrown Marked as reviewed by sspitsyn (Reviewer). - PR Review: https://git.openjdk.org/jdk/pull/17971#pullrequestreview-1907875498

Re: RFR: JDK-8326898: NSK tests should listen on loopback addresses only

2024-02-28 Thread Serguei Spitsyn
On Thu, 29 Feb 2024 01:50:02 GMT, Alex Menkov wrote: > Many NSK tests create socket channel for test/target interprocess > communication. > The change updates server side to listen only on loopback interface. > > Testing - all tests that use then functionality: > -

Re: RFR: 8324868: debug agent does not properly handle interrupts of a virtual thread [v2]

2024-02-28 Thread Serguei Spitsyn
On Wed, 28 Feb 2024 22:04:16 GMT, Chris Plummer wrote: > I can see that the synchronized for interruptorThread.interrupt() call will > end up deadlocking... It is one of the reasons I tried to suggest to get rid of the `interruptorThread.interrupt()`. :-) - PR Review Comment:

Re: RFR: 8324868: debug agent does not properly handle interrupts of a virtual thread [v2]

2024-02-28 Thread Serguei Spitsyn
On Wed, 28 Feb 2024 22:26:52 GMT, Chris Plummer wrote: >> ok > > Actually there are quite a few cases of this in this test, and most are > pre-existing. The test consistently does not use a space, and I see this is > pretty common in other JDI tests. Do we have an official policy on this? One

Re: RFR: 8324868: debug agent does not properly handle interrupts of a virtual thread

2024-02-27 Thread Serguei Spitsyn
On Wed, 28 Feb 2024 05:37:05 GMT, Chris Plummer wrote: >> test/jdk/com/sun/jdi/InterruptHangTest.java line 146: >> >>> 144: // When in precise mode, make sure that every interrupt sent >>> resulted in >>> 145: // an InterruptedException. Note the interruptor always ends >>> up

Re: RFR: 8324868: debug agent does not properly handle interrupts of a virtual thread

2024-02-27 Thread Serguei Spitsyn
On Fri, 23 Feb 2024 19:06:59 GMT, Chris Plummer wrote: > Fix numerous debug agent issues and testing deficiencies related to > Thread.interrupt(). As a first read you should look at the description in the > CR. More details in first comment below. > > Also, this PR is dependent on the fix for

Re: RFR: 8324868: debug agent does not properly handle interrupts of a virtual thread

2024-02-27 Thread Serguei Spitsyn
On Wed, 28 Feb 2024 05:24:49 GMT, Chris Plummer wrote: >> test/jdk/com/sun/jdi/InterruptHangTest.java line 137: >> >>> 135: // Kill the interrupter thread >>> 136: interruptorThread.interrupt(); >>> 137: } >> >> Nit: Just a suggestion to consider

Re: RFR: 8324868: debug agent does not properly handle interrupts of a virtual thread

2024-02-27 Thread Serguei Spitsyn
On Wed, 28 Feb 2024 05:28:00 GMT, Chris Plummer wrote: >> test/jdk/com/sun/jdi/InterruptHangTest.java line 140: >> >>> 138: } >>> 139: >>> 140: if (!remoteMode) { // we don't count interruptsSent when in >>> remote mode >> >> Nit: This is a little bit confusing. In fact the

Re: RFR: 8324868: debug agent does not properly handle interrupts of a virtual thread

2024-02-27 Thread Serguei Spitsyn
On Fri, 23 Feb 2024 19:06:59 GMT, Chris Plummer wrote: > Fix numerous debug agent issues and testing deficiencies related to > Thread.interrupt(). As a first read you should look at the description in the > CR. More details in first comment below. > > Also, this PR is dependent on the fix for

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 li

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; >>

Re: RFR: 8318026: jcmd should provide access to low-level JVM debug information

2024-02-26 Thread Serguei Spitsyn
On Wed, 31 Jan 2024 14:22:44 GMT, Kevin Walls wrote: > Introduce the jcmd "VM.debug" to implement access to a useful set of the > established debug.cpp utilities, with "jcmd PID VM.debug subcommand ...". > > Not recommended for live production use. Calling these "debug" utilities, > and not

Re: RFR: 8326433: Make file-local functions static in src/jdk.jdwp.agent/unix/native/libjdwp/exec_md.c [v2]

2024-02-26 Thread Serguei Spitsyn
On Mon, 26 Feb 2024 22:55:06 GMT, Jiangli Zhou wrote: >> Please help review this trivial fix for resolving `ld: error: duplicate >> symbol: closeDescriptors` when static linking with both libjdwp and libjava, >> thanks. > > Jiangli Zhou has updated the pull request incrementally with two

Re: RFR: 8324680: Replace NULL with nullptr in JVMTI generated code

2024-02-26 Thread Serguei Spitsyn
On Thu, 15 Feb 2024 08:46:43 GMT, Serguei Spitsyn wrote: > This enhancement replaces uses of NULL with nullptr in the XML-description > files for JVMTI. These are the files `hotsport/share/prims/jvmti.xml` and > `hotspot/share/prims/jvmti*.xls`. > > The following files are auto

Re: RFR: 8324680: Replace NULL with nullptr in JVMTI generated code

2024-02-26 Thread Serguei Spitsyn
On Thu, 15 Feb 2024 08:46:43 GMT, Serguei Spitsyn wrote: > This enhancement replaces uses of NULL with nullptr in the XML-description > files for JVMTI. These are the files `hotsport/share/prims/jvmti.xml` and > `hotspot/share/prims/jvmti*.xls`. > > The following files are auto

Re: RFR: JDK-8176520: Improve the accuracy of the instance size in hprof heap dumps [v3]

2024-02-23 Thread Serguei Spitsyn
On Sat, 17 Feb 2024 02:41:20 GMT, Alex Menkov wrote: >> The fix updates heap dumpers to report correct instance size value for >> HPROF_GC_CLASS_DUMP records (currently it's reported as size of all instance >> fields) >> >> Testing: tier1, tier2, tier5-svc > > Alex Menkov has updated the pull

Re: RFR: JDK-8176520: Improve the accuracy of the instance size in hprof heap dumps [v3]

2024-02-23 Thread Serguei Spitsyn
On Sat, 17 Feb 2024 02:41:20 GMT, Alex Menkov wrote: >> The fix updates heap dumpers to report correct instance size value for >> HPROF_GC_CLASS_DUMP records (currently it's reported as size of all instance >> fields) >> >> Testing: tier1, tier2, tier5-svc > > Alex Menkov has updated the pull

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

2024-02-23 Thread Serguei Spitsyn
plementation of JVM TI GetObjectMonitorUsage > > The Release-Note is: > [8325314](https://bugs.openjdk.org/browse/JDK-8325314): Release Note: > incorrect implementation of JVM TI GetObjectMonitorUsage > > Testing: > - tested with mach5 tiers 1-6 Serguei Spitsyn has updated the pull req

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

2024-02-23 Thread Serguei Spitsyn
plementation of JVM TI GetObjectMonitorUsage > > The Release-Note is: > [8325314](https://bugs.openjdk.org/browse/JDK-8325314): Release Note: > incorrect implementation of JVM TI GetObjectMonitorUsage > > Testing: > - tested with mach5 tiers 1-6 Serguei Spitsyn has upda

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

2024-02-23 Thread Serguei Spitsyn
plementation of JVM TI GetObjectMonitorUsage > > The Release-Note is: > [8325314](https://bugs.openjdk.org/browse/JDK-8325314): Release Note: > incorrect implementation of JVM TI GetObjectMonitorUsage > > Testing: > - tested with mach5 tiers 1-6 Serguei Spitsyn has updated the pull requ

Re: RFR: JDK-8325530: Vague error message when com.sun.tools.attach.VirtualMachine fails to load agent library [v4]

2024-02-23 Thread Serguei Spitsyn
On Thu, 22 Feb 2024 23:31:16 GMT, Alex Menkov wrote: >> VirtualMachine.loadAgentPath/loadAgentLibrary can fail with >> AgentLoadException in 2 cases: >> - attach listener returns error; in the case the exception is thrown from >> HotSpotVirtualMachine.processCompletionStatus (called from >>

Re: RFR: 8326524: Rename agent_common.h

2024-02-22 Thread Serguei Spitsyn
On Thu, 22 Feb 2024 19:38:26 GMT, Kim Barrett wrote: > Please review this trivial change that renames the file > test/hotspot/jtreg/vmTestbase/nsk/share/jvmti/agent_common/agent_common.h to > agent_common.hpp. > > The #include updates were performed mechanically, and builds would fail if >

Re: RFR: 8256314: JVM TI GetCurrentContendedMonitor is implemented incorrectly [v2]

2024-02-22 Thread Serguei Spitsyn
> RN: [8326038](https://bugs.openjdk.org/browse/JDK-8326038): Release Note: > JVM TI GetCurrentContendedMonitor is implemented incorrectly > > Testing: > - tested with the mach5 tiers 1-6 Serguei Spitsyn has updated the pull request incrementally wi

Re: RFR: 8256314: JVM TI GetCurrentContendedMonitor is implemented incorrectly

2024-02-22 Thread Serguei Spitsyn
On Thu, 22 Feb 2024 15:02:18 GMT, Alan Bateman wrote: > Are you planning to update ThreadReference::currentContendedMonitor method > description too? Initially, I wanted to address it separately. But it is better to fix all together. I'll update my fix, the CSR and RN. - PR

Re: RFR: 8256314: JVM TI GetCurrentContendedMonitor is implemented incorrectly

2024-02-22 Thread Serguei Spitsyn
On Wed, 21 Feb 2024 19:13:41 GMT, Alan Bateman wrote: >> The implementation of the JVM TI `GetCurrentContendedMonitor` does not match >> the spec. It can sometimes return an incorrect information about the >> contended monitor. Such a behavior does not match the function spec. >> With this

Re: RFR: JDK-8325530: Vague error message when com.sun.tools.attach.VirtualMachine fails to load agent library [v2]

2024-02-22 Thread Serguei Spitsyn
On Wed, 21 Feb 2024 21:42:08 GMT, Alex Menkov wrote: >> VirtualMachine.loadAgentPath/loadAgentLibrary can fail with >> AgentLoadException in 2 cases: >> - attach listener returns error; in the case the exception is thrown from >> HotSpotVirtualMachine.processCompletionStatus (called from >>

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; >>

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

2024-02-22 Thread Serguei Spitsyn
plementation of JVM TI GetObjectMonitorUsage > > The Release-Note is: > [8325314](https://bugs.openjdk.org/browse/JDK-8325314): Release Note: > incorrect implementation of JVM TI GetObjectMonitorUsage > > Testing: > - tested with mach5 tiers 1-6 Serguei Spitsyn has updated the pull reques

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 >

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 >> desc

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 >> desc

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 >> desc

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; >>

RFR: 8256314: JVM TI GetCurrentContendedMonitor is implemented incorrectly

2024-02-21 Thread Serguei Spitsyn
The implementation of the JVM TI `GetCurrentContendedMonitor` does not match the spec. It can sometimes return an incorrect information about the contended monitor. Such a behavior does not match the function spec. With this update the `GetCurrentContendedMonitor` is returning the monitor only

Re: RFR: 8326090: Rename jvmti_aod.h

2024-02-20 Thread Serguei Spitsyn
On Fri, 16 Feb 2024 21:42:18 GMT, Kim Barrett wrote: > Please review this trivial change that renames the file > test/hotspot/jtreg/vmTestbase/nsk/share/jvmti/aod/jvmti_aod.h to > jvmti_aod.hpp, > and replace uses of NULL in the file. > > The #include updates were performed mechanically, and

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/serviceabili

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

2024-02-20 Thread Serguei Spitsyn
plementation of JVM TI GetObjectMonitorUsage > > The Release-Note is: > [8325314](https://bugs.openjdk.org/browse/JDK-8325314): Release Note: > incorrect implementation of JVM TI GetObjectMonitorUsage > > Testing: > - tested with mach5 tiers 1-6 Serguei Spitsyn has updated th

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

2024-02-19 Thread Serguei Spitsyn
plementation of JVM TI GetObjectMonitorUsage > > The Release-Note is: > [8325314](https://bugs.openjdk.org/browse/JDK-8325314): Release Note: > incorrect implementation of JVM TI GetObjectMonitorUsage > > Testing: > - tested with mach5 tiers 1-6 Serguei Spitsyn has updated the pull request

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 >> objmon

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 >> objmon

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

2024-02-19 Thread Serguei Spitsyn
plementation of JVM TI GetObjectMonitorUsage > > The Release-Note is: > [8325314](https://bugs.openjdk.org/browse/JDK-8325314): Release Note: > incorrect implementation of JVM TI GetObjectMonitorUsage > > Testing: > - tested with mach5 tiers 1-6 Serguei Spitsyn has updated the p

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

2024-02-17 Thread Serguei Spitsyn
plementation of JVM TI GetObjectMonitorUsage > > The Release-Note is: > [8325314](https://bugs.openjdk.org/browse/JDK-8325314): Release Note: > incorrect implementation of JVM TI GetObjectMonitorUsage > > Testing: > - tested with mach5 tiers 1-6 Serguei Spitsyn has updated the pull request i

Integrated: 8324680: Replace NULL with nullptr in JVMTI generated code

2024-02-16 Thread Serguei Spitsyn
On Thu, 15 Feb 2024 08:46:43 GMT, Serguei Spitsyn wrote: > This enhancement replaces uses of NULL with nullptr in the XML-description > files for JVMTI. These are the files `hotsport/share/prims/jvmti.xml` and > `hotspot/share/prims/jvmti*.xls`. > > The following files are auto

Re: RFR: 8324680: Replace NULL with nullptr in JVMTI generated code

2024-02-16 Thread Serguei Spitsyn
On Thu, 15 Feb 2024 08:46:43 GMT, Serguei Spitsyn wrote: > This enhancement replaces uses of NULL with nullptr in the XML-description > files for JVMTI. These are the files `hotsport/share/prims/jvmti.xml` and > `hotspot/share/prims/jvmti*.xls`. > > The following files are auto

Re: RFR: 8324680: Replace NULL with nullptr in JVMTI generated code

2024-02-15 Thread Serguei Spitsyn
On Thu, 15 Feb 2024 08:46:43 GMT, Serguei Spitsyn wrote: > This enhancement replaces uses of NULL with nullptr in the XML-description > files for JVMTI. These are the files `hotsport/share/prims/jvmti.xml` and > `hotspot/share/prims/jvmti*.xls`. > > The following files are auto

Re: RFR: 8316451: 6 java/lang/instrument/PremainClass tests ignore VM flags

2024-02-15 Thread Serguei Spitsyn
On Thu, 8 Feb 2024 23:30:01 GMT, Leonid Mesnik wrote: > Tests updated to use jtreg vm flags. > Tested by running tests with different flags and tier1. Marked as reviewed by sspitsyn (Reviewer). - PR Review: https://git.openjdk.org/jdk/pull/17781#pullrequestreview-1883994215

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; >>

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

2024-02-15 Thread Serguei Spitsyn
plementation of JVM TI GetObjectMonitorUsage > > The Release-Note is: > [8325314](https://bugs.openjdk.org/browse/JDK-8325314): Release Note: > incorrect implementation of JVM TI GetObjectMonitorUsage > > Testing: > - tested with mach5 tiers 1-6 Serguei Spitsyn has updated the pull reques

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 >>

RFR: 8324680: Replace NULL with nullptr in JVMTI generated code

2024-02-15 Thread Serguei Spitsyn
This enhancement replaces uses of NULL with nullptr in the XML-description files for JVMTI. These are the files `hotsport/share/prims/jvmti.xml` and `hotspot/share/prims/jvmti*.xls`. The following files are auto-generated from the `jvmti.xml` and `*.xsl files` in the

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

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 contain

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

2024-02-14 Thread Serguei Spitsyn
plementation of JVM TI GetObjectMonitorUsage > > The Release-Note is: > [8325314](https://bugs.openjdk.org/browse/JDK-8325314): Release Note: > incorrect implementation of JVM TI GetObjectMonitorUsage > > Testing: > - tested with mach5 tiers 1-6 Serguei Spitsyn has updated the pull req

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 contai

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

2024-02-14 Thread Serguei Spitsyn
plementation of JVM TI GetObjectMonitorUsage > > The Release-Note is: > [8325314](https://bugs.openjdk.org/browse/JDK-8325314): Release Note: > incorrect implementation of JVM TI GetObjectMonitorUsage > > Testing: > - tested with mach5 tiers 1-6 Serguei Spitsyn has updated the pull requ

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:

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

2024-02-14 Thread Serguei Spitsyn
plementation of JVM TI GetObjectMonitorUsage > > The Release-Note is: > [8325314](https://bugs.openjdk.org/browse/JDK-8325314): Release Note: > incorrect implementation of JVM TI GetObjectMonitorUsage > > Testing: > - tested with mach5 tiers 1-6 Serguei Spitsyn has updated th

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 >

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 o

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

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 o

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

2024-02-12 Thread Serguei Spitsyn
plementation of JVM TI GetObjectMonitorUsage > > The Release-Note is: > [8325314](https://bugs.openjdk.org/browse/JDK-8325314): Release Note: > incorrect implementation of JVM TI GetObjectMonitorUsage > > Testing: > - tested with mach5 tiers 1-6 Serguei Spitsyn has updated the pull re

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; >>

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

<    1   2   3   4   5   6   7   8   9   10   >