Re: RFR: 8257967: JFR: Events for loaded agents [v15]

2023-04-04 Thread Serguei Spitsyn
On Tue, 4 Apr 2023 14:41:13 GMT, Markus Grönlund wrote: >> src/hotspot/share/prims/agent.hpp line 1: >> >>> 1: /* >> >> The name for class and file is too general. >> I'm thinking if renaming the files to jvmtiAgent and the class to JvmtiAgent >> would work. >> In general, there exists a conve

Re: RFR: 8305490: CommandProcessor command "dumpclass" produces classes with invalid field descriptors [v2]

2023-04-04 Thread Adam Sotona
On Wed, 5 Apr 2023 06:30:51 GMT, Adam Sotona wrote: >> CommandProcessor command "dumpclass" produces classes with invalid field >> descriptors. >> >> Proposed patch fixes >> `sun.jvm.hotspot.oops.InstanceKlass::getFieldSignatureIndex` to return >> correct `getSignatureIndex` instead of inval

Re: RFR: 8305490: CommandProcessor command "dumpclass" produces classes with invalid field descriptors [v2]

2023-04-04 Thread Adam Sotona
> CommandProcessor command "dumpclass" produces classes with invalid field > descriptors. > > Proposed patch fixes > `sun.jvm.hotspot.oops.InstanceKlass::getFieldSignatureIndex` to return > correct `getSignatureIndex` instead of invalid `getGenericSignatureIndex`. > > Added condition to `Clh

Re: RFR: 8303563: GetCurrentThreadCpuTime and GetThreadCpuTime need further clarification for virtual threads

2023-04-04 Thread Alan Bateman
On Tue, 4 Apr 2023 20:33:46 GMT, Serguei Spitsyn wrote: > This is a follow-up to > [JDK-8302615](https://bugs.openjdk.org/browse/JDK-8302615) where > GetCurrentThreadCpuTime and GetThreadCpuTime were changed from being not > supported to optional, when called from/with a virtual thread. There

Re: RFR: 8305209: JDWP exit error AGENT_ERROR_INVALID_THREAD(203): missing entry in running thread table [v2]

2023-04-04 Thread Chris Plummer
On Tue, 4 Apr 2023 20:50:21 GMT, Leonid Mesnik wrote: >> Chris Plummer has updated the pull request incrementally with one additional >> commit since the last revision: >> >> minor comment fix > > test/jdk/com/sun/jdi/TestScaffold.java line 721: > >> 719: throw new RuntimeExcepti

Re: RFR: 8303563: GetCurrentThreadCpuTime and GetThreadCpuTime need further clarification for virtual threads

2023-04-04 Thread David Holmes
On Tue, 4 Apr 2023 20:33:46 GMT, Serguei Spitsyn wrote: > This is a follow-up to > [JDK-8302615](https://bugs.openjdk.org/browse/JDK-8302615) where > GetCurrentThreadCpuTime and GetThreadCpuTime were changed from being not > supported to optional, when called from/with a virtual thread. There

Re: RFR: 8257967: JFR: Events for loaded agents [v16]

2023-04-04 Thread David Holmes
On Tue, 4 Apr 2023 14:39:19 GMT, Markus Grönlund wrote: >> Greetings, >> >> We are adding support to let JFR report on Agents. >> >> Design >> >> An Agent is a library that uses any instrumentation or profiling APIs. Most >> agents are started and initialized on the command line, but age

Re: RFR: 8305608: Change VMConnection to use "test.class.path"instead of "test.classes"

2023-04-04 Thread Serguei Spitsyn
On Tue, 4 Apr 2023 23:52:45 GMT, Leonid Mesnik wrote: >> test/jdk/com/sun/jdi/VMConnection.java line 54: >> >>> 52: // When we run under jtreg, test.classes contains the pathname >>> of >>> 53: // the dir in which the .class files will be placed. >>> 54: // When we run j

Re: RFR: 8291555: Implement alternative fast-locking scheme [v52]

2023-04-04 Thread David Holmes
On Tue, 4 Apr 2023 22:12:03 GMT, David Holmes wrote: >>> Given the owner could release the monitor the moment after we check I don't >>> see how false results are an issue here. The existing code should be safe >>> when not executed at a safepoint.. >> >> I checked again. It looks like the Dea

Re: RFR: 8291555: Implement alternative fast-locking scheme [v53]

2023-04-04 Thread Daniel D . Daugherty
On Tue, 4 Apr 2023 19:09:31 GMT, Roman Kennke wrote: >> This change adds a fast-locking scheme as an alternative to the current >> stack-locking implementation. It retains the advantages of stack-locking >> (namely fast locking in uncontended code-paths), while avoiding the overload >> of the

Re: RFR: 8305608: Change VMConnection to use "test.class.path"instead of "test.classes"

2023-04-04 Thread Leonid Mesnik
On Tue, 4 Apr 2023 23:08:06 GMT, Serguei Spitsyn wrote: >> Currently, VMConnection run debugee using "test.classes" as a classpath. It >> cause test failures when virtual thread factory (wrapper) is enabled and >> test is not located the same directory as TestScaffold. > > test/jdk/com/sun/jdi/

Re: RFR: 8305608: Change VMConnection to use "test.class.path"instead of "test.classes"

2023-04-04 Thread Serguei Spitsyn
On Tue, 4 Apr 2023 20:42:34 GMT, Leonid Mesnik wrote: > Currently, VMConnection run debugee using "test.classes" as a classpath. It > cause test failures when virtual thread factory (wrapper) is enabled and test > is not located the same directory as TestScaffold. test/jdk/com/sun/jdi/VMConnec

Re: RFR: 8305607: Remove some unused test parameters in com/sun/jdi tests

2023-04-04 Thread Serguei Spitsyn
On Tue, 4 Apr 2023 20:15:41 GMT, Leonid Mesnik wrote: > Some tests set debugee name which is set by startUp() method. > > The test/jdk/com/sun/jdi/RedefineNestmateAttr/TestNestmateAttr.java set > classpath which is not required. Looks good. Good to know this about `TestScaffold` framework. Tha

Re: RFR: 8305209: JDWP exit error AGENT_ERROR_INVALID_THREAD(203): missing entry in running thread table [v2]

2023-04-04 Thread Serguei Spitsyn
On Tue, 4 Apr 2023 20:53:18 GMT, Leonid Mesnik wrote: >> I did a lot of testing on all platforms, including with product builds, but >> yes, it is possible that on some some platforms with some flags it might not >> be enough. I guess more testing will tell. Adjustments might be necessary. >>

Integrated: 8305237: CompilerDirectives DCmds permissions correction

2023-04-04 Thread Kevin Walls
On Fri, 31 Mar 2023 08:24:19 GMT, Kevin Walls wrote: > The Permissions in DCmds relate to remote usage over JMX. > "monitor" is generally for reading information, and "control" is generally > for making changes. > The DCmds for changing compiler directives should have "control" as the > requir

Re: RFR: 8305237: CompilerDirectives DCmds permissions correction

2023-04-04 Thread Kevin Walls
On Fri, 31 Mar 2023 08:24:19 GMT, Kevin Walls wrote: > The Permissions in DCmds relate to remote usage over JMX. > "monitor" is generally for reading information, and "control" is generally > for making changes. > The DCmds for changing compiler directives should have "control" as the > requir

Re: RFR: 8291555: Implement alternative fast-locking scheme [v52]

2023-04-04 Thread David Holmes
On Tue, 4 Apr 2023 19:04:03 GMT, Roman Kennke wrote: >>> Not at all clear to me how this fits here. ?? >> >> This block checks whether the monitor is in waiting state. When it is >> anonymously locked it must be waiting. I added a comment. > >> Given the owner could release the monitor the mome

Re: RFR: 8291555: Implement alternative fast-locking scheme [v52]

2023-04-04 Thread David Holmes
On Tue, 4 Apr 2023 12:57:38 GMT, Thomas Stuefe wrote: >> Thanks @tstuefe . I see at that level if the object doesn't match the top of >> the lock-stack then we take the slow path. But then I'm lost - AFAICS the >> slow path is `InterpreterRuntime::monitorexit` and that doesn't have any >> fast

RFR: 8298048: Combine CDS archive heap into a single block

2023-04-04 Thread Ioi Lam
This PR combines the "open" and "closed" regions of the CDS archive heap into a single region. This significantly simplifies the implementation, making it more compatible with non-G1 collectors. There's a net removal of ~1000 lines in src code and another ~1200 lines of tests. **Notes for revie

Re: RFR: 8305608: Change VMConnection to use "test.class.path"instead of "test.classes"

2023-04-04 Thread Leonid Mesnik
On Tue, 4 Apr 2023 20:42:34 GMT, Leonid Mesnik wrote: > Currently, VMConnection run debugee using "test.classes" as a classpath. It > cause test failures when virtual thread factory (wrapper) is enabled and test > is not located the same directory as TestScaffold. Might be always use use to s

RFR: 8305608: Change VMConnection to use "test.class.path"instead of "test.classes"

2023-04-04 Thread Leonid Mesnik
Currently, VMConnection run debugee using "test.classes" as a classpath. It cause test failures when virtual thread factory (wrapper) is enabled and test is not located the same directory as TestScaffold. - Commit messages: - more tests are added - updated vmconnection Changes: h

Re: RFR: 8305209: JDWP exit error AGENT_ERROR_INVALID_THREAD(203): missing entry in running thread table [v2]

2023-04-04 Thread Leonid Mesnik
On Tue, 4 Apr 2023 18:51:21 GMT, Chris Plummer wrote: >> The real purpose of this PR is to add virtual thread support to >> ThreadMemoryLeakTest.java, but this exposed bugs in both the debug agent and >> in TestScaffold, so those are being fixed also (and the debug agent bug is >> the CR being

Re: RFR: 8305209: JDWP exit error AGENT_ERROR_INVALID_THREAD(203): missing entry in running thread table [v2]

2023-04-04 Thread Leonid Mesnik
On Tue, 4 Apr 2023 18:42:57 GMT, Chris Plummer wrote: >> test/jdk/com/sun/jdi/ThreadMemoryLeakTest.java line 74: >> >>> 72: // that get queued up, so we need to slow >>> it down a bit more >>> 73: // than we do for platform threads to avoi

RFR: 8303563: GetCurrentThreadCpuTime and GetThreadCpuTime need further clarification for virtual threads

2023-04-04 Thread Serguei Spitsyn
This is a follow-up to [JDK-8302615](https://bugs.openjdk.org/browse/JDK-8302615) where GetCurrentThreadCpuTime and GetThreadCpuTime were changed from being not supported to optional, when called from/with a virtual thread. There are two additional sentences that need adjustment to avoid creati

RFR: 8305607: Remove some unused test parameters in com/sun/jdi tests

2023-04-04 Thread Leonid Mesnik
Some tests set debugee name which is set by startUp() method. The test/jdk/com/sun/jdi/RedefineNestmateAttr/TestNestmateAttr.java set classpath which is not required. - Commit messages: - fixed tests Changes: https://git.openjdk.org/jdk/pull/13337/files Webrev: https://webrevs.op

Re: RFR: 8291555: Implement alternative fast-locking scheme [v52]

2023-04-04 Thread Roman Kennke
On Tue, 4 Apr 2023 19:01:44 GMT, Roman Kennke wrote: >> src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/JavaVFrame.java >> line 85: >> >>> 83: ( // we have marked ourself as pending on this monitor >>> 84: mark.monitor().equals(thread.getCurrentPendingMonitor()) ||

Re: RFR: 8291555: Implement alternative fast-locking scheme [v53]

2023-04-04 Thread Roman Kennke
> This change adds a fast-locking scheme as an alternative to the current > stack-locking implementation. It retains the advantages of stack-locking > (namely fast locking in uncontended code-paths), while avoiding the overload > of the mark word. That overloading causes massive problems with Li

Re: RFR: 8291555: Implement alternative fast-locking scheme [v52]

2023-04-04 Thread Roman Kennke
On Tue, 4 Apr 2023 12:57:38 GMT, Thomas Stuefe wrote: >> Thanks @tstuefe . I see at that level if the object doesn't match the top of >> the lock-stack then we take the slow path. But then I'm lost - AFAICS the >> slow path is `InterpreterRuntime::monitorexit` and that doesn't have any >> fast

Re: RFR: 8291555: Implement alternative fast-locking scheme [v52]

2023-04-04 Thread Roman Kennke
On Tue, 4 Apr 2023 06:46:02 GMT, David Holmes wrote: > One thing I can't quite get clear in my head is whether the small window > where an object's monitor is inflated and the object is still in the thread's > lock-stack, could cause an issue for any external observers trying to > determine th

Re: RFR: 8305209: JDWP exit error AGENT_ERROR_INVALID_THREAD(203): missing entry in running thread table [v2]

2023-04-04 Thread Chris Plummer
On Tue, 4 Apr 2023 08:27:53 GMT, Serguei Spitsyn wrote: >> Chris Plummer has updated the pull request incrementally with one additional >> commit since the last revision: >> >> minor comment fix > > test/jdk/com/sun/jdi/ThreadMemoryLeakTest.java line 74: > >> 72:

Re: RFR: 8305209: JDWP exit error AGENT_ERROR_INVALID_THREAD(203): missing entry in running thread table [v2]

2023-04-04 Thread Chris Plummer
> The real purpose of this PR is to add virtual thread support to > ThreadMemoryLeakTest.java, but this exposed bugs in both the debug agent and > in TestScaffold, so those are being fixed also (and the debug agent bug is > the CR being used). > > The debug agent bug is due to a race condition

Re: RFR: 8305490: CommandProcessor command "dumpclass" produces classes with invalid field descriptors

2023-04-04 Thread Frederic Parain
On Tue, 4 Apr 2023 07:44:40 GMT, Adam Sotona wrote: > CommandProcessor command "dumpclass" produces classes with invalid field > descriptors. > > Proposed patch fixes > `sun.jvm.hotspot.oops.InstanceKlass::getFieldSignatureIndex` to return > correct `getSignatureIndex` instead of invalid `ge

Re: RFR: 8305490: CommandProcessor command "dumpclass" produces classes with invalid field descriptors

2023-04-04 Thread Chris Plummer
On Tue, 4 Apr 2023 07:44:40 GMT, Adam Sotona wrote: > CommandProcessor command "dumpclass" produces classes with invalid field > descriptors. > > Proposed patch fixes > `sun.jvm.hotspot.oops.InstanceKlass::getFieldSignatureIndex` to return > correct `getSignatureIndex` instead of invalid `ge

Integrated: 8305511: Remove ignore from com/sun/jdi/PopAndInvokeTest.java

2023-04-04 Thread Leonid Mesnik
On Tue, 4 Apr 2023 03:18:37 GMT, Leonid Mesnik wrote: > Test com/sun/jdi/PopAndInvokeTest.java has > @ignore 6951287 > bug 6951287 is closed as a dup for 6417053 which is closed as not reproduced. This pull request has now been integrated. Changeset: c5941192 Author:Leonid Mesnik URL:

Re: RFR: 8257967: JFR: Events for loaded agents [v15]

2023-04-04 Thread Markus Grönlund
On Sat, 1 Apr 2023 03:31:48 GMT, Serguei Spitsyn wrote: >> Markus Grönlund has updated the pull request incrementally with one >> additional commit since the last revision: >> >> fixes > > src/hotspot/share/prims/agent.hpp line 1: > >> 1: /* > > The name for class and file is too general. >

Re: RFR: 8257967: JFR: Events for loaded agents [v16]

2023-04-04 Thread Markus Grönlund
> Greetings, > > We are adding support to let JFR report on Agents. > > Design > > An Agent is a library that uses any instrumentation or profiling APIs. Most > agents are started and initialized on the command line, but agents can also > be loaded dynamically during runtime. Because comm

Re: RFR: 8291555: Implement alternative fast-locking scheme [v52]

2023-04-04 Thread Thomas Stuefe
On Mon, 3 Apr 2023 11:05:41 GMT, Roman Kennke wrote: >> This change adds a fast-locking scheme as an alternative to the current >> stack-locking implementation. It retains the advantages of stack-locking >> (namely fast locking in uncontended code-paths), while avoiding the overload >> of the

Re: RFR: 8291555: Implement alternative fast-locking scheme [v52]

2023-04-04 Thread Thomas Stuefe
On Tue, 4 Apr 2023 12:25:19 GMT, David Holmes wrote: >> That is done one layer up in InterpreterMacroAssembler::unlock_object. > > Thanks @tstuefe . I see at that level if the object doesn't match the top of > the lock-stack then we take the slow path. But then I'm lost - AFAICS the > slow path

Re: RFR: 8304725: AsyncGetCallTrace can cause SIGBUS on M1 [v5]

2023-04-04 Thread David Holmes
On Mon, 3 Apr 2023 08:29:55 GMT, Johannes Bechberger wrote: >> Fixes the issue by disabling PCDesc cache modifications when in ASGCT. >> >> Tested on my M1 mac. > > Johannes Bechberger has updated the pull request incrementally with two > additional commits since the last revision: > > - Fix

Re: RFR: 8291555: Implement alternative fast-locking scheme [v52]

2023-04-04 Thread David Holmes
On Tue, 4 Apr 2023 08:17:14 GMT, Thomas Stuefe wrote: >> src/hotspot/cpu/x86/macroAssembler_x86.cpp line 9739: >> >>> 9737: get_thread(thread); >>> 9738: #endif >>> 9739: subl(Address(thread, JavaThread::lock_stack_top_offset()), oopSize); >> >> Is this code used for monitorexit or only ret

Re: RFR: 8305209: JDWP exit error AGENT_ERROR_INVALID_THREAD(203): missing entry in running thread table

2023-04-04 Thread Serguei Spitsyn
On Thu, 30 Mar 2023 16:03:05 GMT, Chris Plummer wrote: > The real purpose of this PR is to add virtual thread support to > ThreadMemoryLeakTest.java, but this exposed bugs in both the debug agent and > in TestScaffold, so those are being fixed also (and the debug agent bug is > the CR being us

Re: RFR: 8305209: JDWP exit error AGENT_ERROR_INVALID_THREAD(203): missing entry in running thread table

2023-04-04 Thread Serguei Spitsyn
On Thu, 30 Mar 2023 16:03:05 GMT, Chris Plummer wrote: > The real purpose of this PR is to add virtual thread support to > ThreadMemoryLeakTest.java, but this exposed bugs in both the debug agent and > in TestScaffold, so those are being fixed also (and the debug agent bug is > the CR being us

Re: RFR: 8291555: Implement alternative fast-locking scheme [v52]

2023-04-04 Thread Thomas Stuefe
On Tue, 4 Apr 2023 05:54:09 GMT, David Holmes wrote: >> Roman Kennke has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Fix typo > > src/hotspot/cpu/x86/macroAssembler_x86.cpp line 9739: > >> 9737: get_thread(thread); >> 9738: #endif >>

Re: RFR: 8305511: Remove ignore from com/sun/jdi/PopAndInvokeTest.java

2023-04-04 Thread Serguei Spitsyn
On Tue, 4 Apr 2023 03:18:37 GMT, Leonid Mesnik wrote: > Test com/sun/jdi/PopAndInvokeTest.java has > @ignore 6951287 > bug 6951287 is closed as a dup for 6417053 which is closed as not reproduced. Marked as reviewed by sspitsyn (Reviewer). - PR Review: https://git.openjdk.org/jdk/

RFR: 8305490: CommandProcessor command "dumpclass" produces classes with invalid field descriptors

2023-04-04 Thread Adam Sotona
CommandProcessor command "dumpclass" produces classes with invalid field descriptors. Proposed patch fixes `sun.jvm.hotspot.oops.InstanceKlass::getFieldSignatureIndex` to return correct `getSignatureIndex` instead of invalid `getGenericSignatureIndex`. Added condition to `ClhsdbDumpclass` te

Re: RFR: 8305237: CompilerDirectives DCmds permissions correction

2023-04-04 Thread Serguei Spitsyn
On Fri, 31 Mar 2023 08:24:19 GMT, Kevin Walls wrote: > The Permissions in DCmds relate to remote usage over JMX. > "monitor" is generally for reading information, and "control" is generally > for making changes. > The DCmds for changing compiler directives should have "control" as the > requir

Integrated: 8305520: ToggleNotifyJvmtiTest.java fails with release VMs

2023-04-04 Thread Jie Fu
On Tue, 4 Apr 2023 06:09:02 GMT, Jie Fu wrote: > Add `-XX:+UnlockDiagnosticVMOptions` to fix the failure with release VMs. > Thanks. This pull request has now been integrated. Changeset: a663d5d6 Author:Jie Fu URL: https://git.openjdk.org/jdk/commit/a663d5d69486447d80cab040830abf0b1

Re: RFR: 8305520: ToggleNotifyJvmtiTest.java fails with release VMs

2023-04-04 Thread Jie Fu
On Tue, 4 Apr 2023 07:20:11 GMT, Serguei Spitsyn wrote: > Looks good and trivial. Thank you for taking care about it. -Serguei Thanks @sspitsyn for your review. - PR Comment: https://git.openjdk.org/jdk/pull/13318#issuecomment-1495485094

Re: RFR: 8304725: AsyncGetCallTrace can cause SIGBUS on M1 [v5]

2023-04-04 Thread Johannes Bechberger
On Mon, 3 Apr 2023 08:29:55 GMT, Johannes Bechberger wrote: >> Fixes the issue by disabling PCDesc cache modifications when in ASGCT. >> >> Tested on my M1 mac. > > Johannes Bechberger has updated the pull request incrementally with two > additional commits since the last revision: > > - Fix

Re: RFR: 8304725: AsyncGetCallTrace can cause SIGBUS on M1 [v5]

2023-04-04 Thread David Holmes
On Mon, 3 Apr 2023 08:29:55 GMT, Johannes Bechberger wrote: >> Fixes the issue by disabling PCDesc cache modifications when in ASGCT. >> >> Tested on my M1 mac. > > Johannes Bechberger has updated the pull request incrementally with two > additional commits since the last revision: > > - Fix

Re: RFR: 8305520: ToggleNotifyJvmtiTest.java fails with release VMs

2023-04-04 Thread Serguei Spitsyn
On Tue, 4 Apr 2023 06:09:02 GMT, Jie Fu wrote: > Add `-XX:+UnlockDiagnosticVMOptions` to fix the failure with release VMs. > Thanks. Looks good and trivial. Thank you for taking care about it. -Serguei - Marked as reviewed by sspitsyn (Reviewer). PR Review: https://git.openjdk.org