Re: RFR: 8300575: JVMTI support when using alternative virtual thread implementation [v7]

2023-02-17 Thread Alan Bateman
On Fri, 17 Feb 2023 16:07:50 GMT, Patricio Chilano Mateo wrote: >> Please review the following change. Some of the JVMTI functions had to be >> modified since they are not supported by the specs on virtual threads >> (StopThread, RunAgentThread, GetCurrentThreadCpuTime, GetThreadCpuTime) or >

RFR: JDK-8302812: JDK-8302455 broke ClassLoaderStatsTest on 32-bit

2023-02-17 Thread Thomas Stuefe
Trivial fix for a trivial problem. CCS=off variant of test needs to be excluded on 32-bit. - Commit messages: - JDK-8302812-JDK-8302455-broke-ClassLoaderStatsTest-on-32-bit Changes: https://git.openjdk.org/jdk/pull/12631/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=12631

Re: RFR: 8299240: rank of JvmtiVTMSTransition_lock can be safepoint

2023-02-17 Thread Serguei Spitsyn
On Sat, 18 Feb 2023 01:30:27 GMT, Serguei Spitsyn wrote: >> src/hotspot/share/prims/jvmtiEnv.cpp line 952: >> >>> 950: } >>> 951: // protect thread_oop as a safepoint can be reached in disabler >>> destructor >>> 952: self_tobj = Handle(current, thread_oop); >> >> If you move this

Re: RFR: 8299240: rank of JvmtiVTMSTransition_lock can be safepoint

2023-02-17 Thread Serguei Spitsyn
On Fri, 17 Feb 2023 05:09:25 GMT, David Holmes wrote: >> The rank of JvmtiVTMSTransition_lock is better to be safepoint instead of >> nosafepoint. >> The fix includes removal of the function >> `check_vthread_and_suspend_at_safepoint` which is not needed anymore. >> >> Testing: >> mach5 jobs a

Integrated: 8302615: make JVMTI thread cpu time functions optional for virtual threads

2023-02-17 Thread Serguei Spitsyn
On Thu, 16 Feb 2023 18:05:54 GMT, Serguei Spitsyn wrote: > This is a minor JVM TI spec update for two timer functions > `GetCurrentThreadCpuTime` and `GetThreadCpuTime` to allow implementations to > support virtual threads. > > The CSR is: > [JDK-8302616](https://bugs.openjdk.org/browse/JDK-83

Re: RFR: 8302615: make JVMTI thread cpu time functions optional for virtual threads

2023-02-17 Thread Serguei Spitsyn
On Thu, 16 Feb 2023 18:05:54 GMT, Serguei Spitsyn wrote: > This is a minor JVM TI spec update for two timer functions > `GetCurrentThreadCpuTime` and `GetThreadCpuTime` to allow implementations to > support virtual threads. > > The CSR is: > [JDK-8302616](https://bugs.openjdk.org/browse/JDK-83

Re: RFR: 8300575: JVMTI support when using alternative virtual thread implementation [v7]

2023-02-17 Thread Serguei Spitsyn
On Fri, 17 Feb 2023 16:07:50 GMT, Patricio Chilano Mateo wrote: >> Please review the following change. Some of the JVMTI functions had to be >> modified since they are not supported by the specs on virtual threads >> (StopThread, RunAgentThread, GetCurrentThreadCpuTime, GetThreadCpuTime) or >

Re: RFR: 8300575: JVMTI support when using alternative virtual thread implementation [v7]

2023-02-17 Thread Patricio Chilano Mateo
On Fri, 17 Feb 2023 17:28:19 GMT, Alan Bateman wrote: > Thanks for dropping is_bound_vthread, I think it's much better now. What > would you think about changing it to test the thread type is_a > vmClasses::BaseVirtualThread_klass() so the VM doesn't need to know about > ThreadBuilders$BoundVi

Re: RFR: 8299234: JMX Repository.query performance [v6]

2023-02-17 Thread Kevin Walls
On Fri, 17 Feb 2023 18:25:10 GMT, Alexey Bakhtin wrote: >> Please find a patch to improve JMX Repository.query performance >> >> Using ObjectName.apply() allows significantly decrease memory usage and the >> number of GC cycles: >> Before: >> >> $ java test 100 100 >> Test PASSED in 89

Re: RFR: 8299234: JMX Repository.query performance [v5]

2023-02-17 Thread Kevin Walls
On Fri, 17 Feb 2023 18:20:32 GMT, Alexey Bakhtin wrote: >> src/java.management/share/classes/javax/management/ObjectName.java line 2026: >> >>> 2024: // This ObjectName is the pattern >>> 2025: // The other ObjectName is the string. >>> 2026: if (useOptimized)

Re: RFR: 8299234: JMX Repository.query performance [v6]

2023-02-17 Thread Alexey Bakhtin
> Please find a patch to improve JMX Repository.query performance > > Using ObjectName.apply() allows significantly decrease memory usage and the > number of GC cycles: > Before: > > $ java test 100 100 > Test PASSED in 8943169791 ns. > GC: G1 Young Generation getCollectionCount()=177 ge

Re: RFR: 8299234: JMX Repository.query performance [v5]

2023-02-17 Thread Alexey Bakhtin
On Fri, 17 Feb 2023 17:34:53 GMT, Kevin Walls wrote: > 2026 and 2031 I was referring to with the nit about if and { } Hi @kevinjwalls ! Thank you for review. The braces are added - PR: https://git.openjdk.org/jdk/pull/11758

Re: RFR: 8300575: JVMTI support when using alternative virtual thread implementation [v7]

2023-02-17 Thread Patricio Chilano Mateo
> Please review the following change. Some of the JVMTI functions had to be > modified since they are not supported by the specs on virtual threads > (StopThread, RunAgentThread, GetCurrentThreadCpuTime, GetThreadCpuTime) or > shouldn't include virtual threads in the results (GetAllThreads, > G

Re: RFR: 8300575: JVMTI support when using alternative virtual thread implementation [v5]

2023-02-17 Thread Patricio Chilano Mateo
On Fri, 17 Feb 2023 08:23:13 GMT, Serguei Spitsyn wrote: >> Patricio Chilano Mateo has updated the pull request incrementally with two >> additional commits since the last revision: >> >> - restore state should be only for VirtualThreads >> - add suspend check > > test/hotspot/jtreg/serviceab

Re: RFR: 8300575: JVMTI support when using alternative virtual thread implementation [v5]

2023-02-17 Thread Patricio Chilano Mateo
On Fri, 17 Feb 2023 08:29:53 GMT, Serguei Spitsyn wrote: > The fix looks good to me. Thank you for the update. I'm not sure if you > wanted to get rid of `is_bound_vthread` though. Just want to know you > intention. Thanks, Serguei > Great. Yes, I just removed is_bound_vthread, please take a lo

Re: RFR: 8300575: JVMTI support when using alternative virtual thread implementation [v6]

2023-02-17 Thread Patricio Chilano Mateo
> Please review the following change. Some of the JVMTI functions had to be > modified since they are not supported by the specs on virtual threads > (StopThread, RunAgentThread, GetCurrentThreadCpuTime, GetThreadCpuTime) or > shouldn't include virtual threads in the results (GetAllThreads, > G

Re: RFR: JDK-8302320: AsyncGetCallTrace obtains too few frames in sanity test [v2]

2023-02-17 Thread Johannes Bechberger
On Thu, 16 Feb 2023 14:25:15 GMT, Johannes Bechberger wrote: >> Extends the existing AsyncGetCallTrace test case and fixes the issue. > > Johannes Bechberger has updated the pull request incrementally with one > additional commit since the last revision: > > Implement addptr suggestion by @Jo

Re: RFR: JDK-8302320: AsyncGetCallTrace obtains too few frames in sanity test [v3]

2023-02-17 Thread Johannes Bechberger
> Extends the existing AsyncGetCallTrace test case and fixes the issue. Johannes Bechberger has updated the pull request incrementally with one additional commit since the last revision: Revert previous change - Changes: - all: https://git.openjdk.org/jdk/pull/12535/files - n

Re: RFR: JDK-8302320: AsyncGetCallTrace obtains too few frames in sanity test [v2]

2023-02-17 Thread Jorn Vernee
On Fri, 17 Feb 2023 14:13:04 GMT, Johannes Bechberger wrote: > Could you be so kind to synthesize a comment for me? I'm slightly overwhelmed > by the discussion. Something like: // Note: sp can be greater than unextended_sp in the case of // interpreted -> interpreted calls that go through a

Re: RFR: JDK-8302320: AsyncGetCallTrace obtains too few frames in sanity test [v2]

2023-02-17 Thread Johannes Bechberger
On Fri, 17 Feb 2023 14:00:45 GMT, Jorn Vernee wrote: > But, in that case, please leave a comment that explains why we can have sp > > unextended_sp. Could you be so kind to synthesize a comment for me? I'm slightly overwhelmed by the discussion. - PR: https://git.openjdk.org/jdk/

Re: RFR: JDK-8302320: AsyncGetCallTrace obtains too few frames in sanity test [v2]

2023-02-17 Thread Jorn Vernee
On Thu, 16 Feb 2023 14:25:15 GMT, Johannes Bechberger wrote: >> Extends the existing AsyncGetCallTrace test case and fixes the issue by >> modifying `MethodHandles` code. > > Johannes Bechberger has updated the pull request incrementally with one > additional commit since the last revision: >

Re: RFR: 8300575: JVMTI support when using alternative virtual thread implementation [v3]

2023-02-17 Thread Serguei Spitsyn
On Thu, 16 Feb 2023 17:03:32 GMT, Patricio Chilano Mateo wrote: > Yes, the elist comment was related to the other issue. The reason why I > didn't explicitly added this check is because it will we done in the > suspend/resume call already (while holding the handshake lock which > serializes t

Re: RFR: 8300575: JVMTI support when using alternative virtual thread implementation [v5]

2023-02-17 Thread Serguei Spitsyn
On Thu, 16 Feb 2023 16:59:05 GMT, Patricio Chilano Mateo wrote: >> Please review the following change. Some of the JVMTI functions had to be >> modified since they are not supported by the specs on virtual threads >> (StopThread, RunAgentThread, GetCurrentThreadCpuTime, GetThreadCpuTime) or >

Re: RFR: 8300575: JVMTI support when using alternative virtual thread implementation [v5]

2023-02-17 Thread Serguei Spitsyn
On Thu, 16 Feb 2023 16:59:05 GMT, Patricio Chilano Mateo wrote: >> Please review the following change. Some of the JVMTI functions had to be >> modified since they are not supported by the specs on virtual threads >> (StopThread, RunAgentThread, GetCurrentThreadCpuTime, GetThreadCpuTime) or >

Re: RFR: JDK-8302320: AsyncGetCallTrace obtains too few frames in sanity test [v2]

2023-02-17 Thread Richard Reingruber
On Thu, 16 Feb 2023 14:25:15 GMT, Johannes Bechberger wrote: >> Extends the existing AsyncGetCallTrace test case and fixes the issue by >> modifying `MethodHandles` code. > > Johannes Bechberger has updated the pull request incrementally with one > additional commit since the last revision: >