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

2023-04-03 Thread David Holmes
On Thu, 30 Mar 2023 14:30:28 GMT, Roman Kennke wrote: >> Please explain why you think this is "not safe". Yes, you can observe state >> that is in >> the process of changing, but do you think that we'll see a crash with >> allowing >> `Threads::owning_thread_from_object()` to be called from a n

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

2023-04-03 Thread David Holmes
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

RFR: 8305520: ToggleNotifyJvmtiTest.java fails with release VMs

2023-04-03 Thread Jie Fu
Add `-XX:+UnlockDiagnosticVMOptions` to fix the failure with release VMs. Thanks. - Commit messages: - 8305520: ToggleNotifyJvmtiTest.java fails with release VMs Changes: https://git.openjdk.org/jdk/pull/13318/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=13318&range=00

Re: RFR: 8305341: Alignment outside of HotSpot should be enforced by alignas instead of compiler specific attributes

2023-04-03 Thread Chris Plummer
On Fri, 31 Mar 2023 06:07:39 GMT, Julian Waters wrote: > C11 has been stable for a long time on all platforms, so native code can use > the standard alignas operator for alignment requirements I'm not sure what you mean by hotspot requiring a special review, but serviceability code does requir

Re: RFR: 8305341: Alignment outside of HotSpot should be enforced by alignas instead of compiler specific attributes

2023-04-03 Thread Julian Waters
On Fri, 31 Mar 2023 06:07:39 GMT, Julian Waters wrote: > C11 has been stable for a long time on all platforms, so native code can use > the standard alignas operator for alignment requirements globalDefinitions_visCPP.hpp (and the corresponding globalDefinitions file for gcc based compilers) a

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

2023-04-03 Thread David Holmes
On Mon, 3 Apr 2023 08:29:55 GMT, Johannes Bechberger wrote: >> Fixes the issue by transitioning the thread into the WXWrite mode while >> walking the stack in AsyncGetCallTrace. >> >> Tested on my M1 mac. > > Johannes Bechberger has updated the pull request incrementally with two > additional

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

2023-04-03 Thread Chris Plummer
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. Looks good, and trivial. - Marked as reviewed by cjplummer (Reviewer). PR Review: h

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

2023-04-03 Thread Leonid Mesnik
Test com/sun/jdi/PopAndInvokeTest.java has @ignore 6951287 bug 6951287 is closed as a dup for 6417053 which is closed as not reproduced. - Commit messages: - @ignore removed Changes: https://git.openjdk.org/jdk/pull/13317/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=1331

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

2023-04-03 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. The test pass. If it start failing in CI it is needed to file a new bug and problemlist test. --

Integrated: 8297286: runtime/vthread tests crashing after JDK-8296324

2023-04-03 Thread Serguei Spitsyn
On Wed, 22 Mar 2023 02:12:12 GMT, Serguei Spitsyn wrote: > The fix is to enable virtual threads support for late binding JVMTI agents. > The fix includes: > - New function `JvmtiEnvBase::enable_virtual_threads_notify_jvmti()` which > does enabling JVMTI VTMS transition notifications in case of a

Integrated: 8305421: Work around JDK-8305420 in CDSJDITest.java

2023-04-03 Thread Ioi Lam
On Sun, 2 Apr 2023 22:11:40 GMT, Ioi Lam wrote: > Please review this trivial work-around that removes logging that would > trigger [JDK-8305420](https://bugs.openjdk.org/browse/JDK-8305420). > > I also fixed an incorrect parameter in the `executeAndLog()` call, which > caused the dumping proce

Re: RFR: 8297286: runtime/vthread tests crashing after JDK-8296324 [v17]

2023-04-03 Thread Serguei Spitsyn
> The fix is to enable virtual threads support for late binding JVMTI agents. > The fix includes: > - New function `JvmtiEnvBase::enable_virtual_threads_notify_jvmti()` which > does enabling JVMTI VTMS transition notifications in case of agent loaded > into running VM. This function executes a VM

Re: RFR: 8305421: Work around JDK-8305420 in CDSJDITest.java

2023-04-03 Thread Ioi Lam
On Mon, 3 Apr 2023 18:59:03 GMT, Chris Plummer wrote: >> Please review this trivial work-around that removes logging that would >> trigger [JDK-8305420](https://bugs.openjdk.org/browse/JDK-8305420). >> >> I also fixed an incorrect parameter in the `executeAndLog()` call, which >> caused the du

Re: RFR: 8297286: runtime/vthread tests crashing after JDK-8296324 [v16]

2023-04-03 Thread Serguei Spitsyn
On Mon, 3 Apr 2023 18:17:13 GMT, Serguei Spitsyn wrote: >> The fix is to enable virtual threads support for late binding JVMTI agents. >> The fix includes: >> - New function `JvmtiEnvBase::enable_virtual_threads_notify_jvmti()` which >> does enabling JVMTI VTMS transition notifications in case o

Re: RFR: 8297286: runtime/vthread tests crashing after JDK-8296324 [v9]

2023-04-03 Thread Patricio Chilano Mateo
On Wed, 29 Mar 2023 22:15:35 GMT, Patricio Chilano Mateo wrote: >> Serguei Spitsyn has updated the pull request incrementally with one >> additional commit since the last revision: >> >> review: updated correction of jt->jvmti_thread_state() links in >> VM_SetNotifyJvmtiEventsMode > > Hi Se

Re: RFR: 8297286: runtime/vthread tests crashing after JDK-8296324 [v16]

2023-04-03 Thread Patricio Chilano Mateo
On Mon, 3 Apr 2023 18:17:13 GMT, Serguei Spitsyn wrote: >> The fix is to enable virtual threads support for late binding JVMTI agents. >> The fix includes: >> - New function `JvmtiEnvBase::enable_virtual_threads_notify_jvmti()` which >> does enabling JVMTI VTMS transition notifications in case o

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

2023-04-03 Thread Chris Plummer
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: 8305341: Alignment outside of HotSpot should be enforced by alignas instead of compiler specific attributes

2023-04-03 Thread Chris Plummer
On Fri, 31 Mar 2023 06:07:39 GMT, Julian Waters wrote: > C11 has been stable for a long time on all platforms, so native code can use > the standard alignas operator for alignment requirements > I don't think I can touch the freetype code since I think it's an external > library that was impor

Re: RFR: 8297286: runtime/vthread tests crashing after JDK-8296324 [v9]

2023-04-03 Thread Serguei Spitsyn
On Wed, 29 Mar 2023 22:15:35 GMT, Patricio Chilano Mateo wrote: >> Serguei Spitsyn has updated the pull request incrementally with one >> additional commit since the last revision: >> >> review: updated correction of jt->jvmti_thread_state() links in >> VM_SetNotifyJvmtiEventsMode > > Hi Se

Re: RFR: 8305237: CompilerDirectives DCmds permissions correction

2023-04-03 Thread Chris Plummer
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: 8305421: Work around JDK-8305420 in CDSJDITest.java

2023-04-03 Thread Chris Plummer
On Sun, 2 Apr 2023 22:11:40 GMT, Ioi Lam wrote: > Please review this trivial work-around that removes logging that would > trigger [JDK-8305420](https://bugs.openjdk.org/browse/JDK-8305420). > > I also fixed an incorrect parameter in the `executeAndLog()` call, which > caused the dumping proce

Re: RFR: 8297286: runtime/vthread tests crashing after JDK-8296324 [v16]

2023-04-03 Thread Serguei Spitsyn
> The fix is to enable virtual threads support for late binding JVMTI agents. > The fix includes: > - New function `JvmtiEnvBase::enable_virtual_threads_notify_jvmti()` which > does enabling JVMTI VTMS transition notifications in case of agent loaded > into running VM. This function executes a VM

Re: RFR: 8297286: runtime/vthread tests crashing after JDK-8296324 [v13]

2023-04-03 Thread Patricio Chilano Mateo
On Fri, 31 Mar 2023 05:13:04 GMT, Serguei Spitsyn wrote: >> So the race I am talking about is between the main thread running >> finishThreads() and the launcher thread running startThreads(). The main >> thread could execute finishThreads() before the launcher executes >> startThreads(). If y

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

2023-04-03 Thread Markus Grönlund
On Sat, 1 Apr 2023 03:47:26 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/agentList.cpp line 204: > >> 202: >> 203: // Invokes Agent_OnAttach for agents

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

2023-04-03 Thread Roman Kennke
On Mon, 3 Apr 2023 08:37:51 GMT, Fei Yang wrote: > Looks like there is a typo here. I think this should be: > > ``` > assert(LockingMode != 2, "should not be called with new lightweight locking"); > ``` Thanks for catching this! I pushed a fix. You might want to try the riscv port again, I have

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

2023-04-03 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: 8257967: JFR: Events for loaded agents [v15]

2023-04-03 Thread Serguei Spitsyn
On Fri, 31 Mar 2023 11:18:23 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 ag

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

2023-04-03 Thread Fei Yang
On Sun, 2 Apr 2023 21:41:47 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: 8304725: AsyncGetCallTrace can cause SIGBUS on M1 [v4]

2023-04-03 Thread Johannes Bechberger
On Fri, 24 Mar 2023 10:35:36 GMT, Johannes Bechberger wrote: >> Fixes the issue by transitioning the thread into the WXWrite mode while >> walking the stack in AsyncGetCallTrace. >> >> Tested on my M1 mac. > > Johannes Bechberger has updated the pull request incrementally with two > additiona

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

2023-04-03 Thread Johannes Bechberger
> Fixes the issue by transitioning the thread into the WXWrite mode while > walking the stack in AsyncGetCallTrace. > > Tested on my M1 mac. Johannes Bechberger has updated the pull request incrementally with two additional commits since the last revision: - Fix fix - Fix minor issues -

Re: RFR: 8305341: Alignment outside of HotSpot should be enforced by alignas instead of compiler specific attributes

2023-04-03 Thread Julian Waters
On Fri, 31 Mar 2023 06:07:39 GMT, Julian Waters wrote: > C11 has been stable for a long time on all platforms, so native code can use > the standard alignas operator for alignment requirements Just checked, the pragmas in the freetype code now seems to be pointless since there is no alignment

Re: RFR: 8305341: Alignment outside of HotSpot should be enforced by alignas instead of compiler specific attributes

2023-04-03 Thread Julian Waters
On Fri, 31 Mar 2023 06:07:39 GMT, Julian Waters wrote: > C11 has been stable for a long time on all platforms, so native code can use > the standard alignas operator for alignment requirements I don't think I can touch the freetype code since I think it's an external library that was imported.

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

2023-04-03 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