Integrated: 8288214: serviceability/jvmti/vthread/VThreadNotifyFramePopTest/VThreadNotifyFramePopTest.java test failed

2022-06-14 Thread Alan Bateman
On Sat, 11 Jun 2022 08:11:34 GMT, Alan Bateman wrote: > This test connects to http://openjdk.java.net/ so it's not reliable if the > host name can't be resolved or a HTTP connection cannot be established. I've > changed the test to use a local HTTP server so the original t

Re: RFR: 8288324: Loom: Uninitialized JvmtiEnvs in VM_Virtual* ops

2022-06-14 Thread Alan Bateman
On Tue, 14 Jun 2022 07:42:08 GMT, David Holmes wrote: > I'm confused by the comments above. The code failed to initialize the `_env` > member but then makes calls via this uninitialized pointer! Surely we should > have crashed? JvmtiEnvBase::get_frame_count is static and I think

Re: RFR: 8288324: Loom: Uninitialized JvmtiEnvs in VM_Virtual* ops

2022-06-14 Thread Alan Bateman
On Mon, 13 Jun 2022 18:14:56 GMT, Aleksey Shipilev wrote: > SonarCloud reports a few uninitialized fields in new VM_Virtual* ops. Those > fields are used, and therefore this is a serious bug. These ops seem to be > used only from a few corner cases, which is probably why this was never >

RFR: 8286176: Add JNI_VERSION_19 to jni.h and JNI spec

2022-06-13 Thread Alan Bateman
JNI is updated in Java 19 so we need to define JNI_VERSION_19 and change GetVersion to return this version. test/hotspot/jtreg/native_sanity/JniVersion.java is updated to check that JNI_VERSION_19 is returned. The native library in the JMX agent, and several tests, define JNI_OnLoad that

RFR: 8288214: serviceability/jvmti/vthread/VThreadNotifyFramePopTest/VThreadNotifyFramePopTest.java test failed

2022-06-12 Thread Alan Bateman
This test connects to http://openjdk.java.net/ so it's not reliable if the host name can't be resolved or a HTTP connection cannot be established. I've changed the test to use a local HTTP server so the original test works as before, it's just a local rather than remote HTTP connection. I did

Re: RFR: 8288222: ProblemList serviceability/jvmti/vthread/VThreadNotifyFramePopTest/VThreadNotifyFramePopTest.java

2022-06-10 Thread Alan Bateman
On Fri, 10 Jun 2022 15:21:34 GMT, Daniel D. Daugherty wrote: > A trivial fix to ProblemList > serviceability/jvmti/vthread/VThreadNotifyFramePopTest/VThreadNotifyFramePopTest.java. Marked as reviewed by alanb (Reviewer). - PR: https://git.openjdk.org/jdk19/pull/4

Re: RFR: 8286983: rename jdb -trackvthreads and debug agent enumeratevthreads options and clarify "Preview Feature" nature of these options [v5]

2022-06-03 Thread Alan Bateman
On Tue, 31 May 2022 18:14:51 GMT, Chris Plummer wrote: >> As part of the loom integration, jdb added `-trackvthreads` and the debug >> agent added `enumeratevthreads`. These options are being renamed to >> `-trackallthreads` and `includevirtualthreads` (the shorthand `vthreads` >> should not

Re: RFR: 8287726: Fix JVMTI tests with "requires vm.continuations" after JDK-8287496

2022-06-02 Thread Alan Bateman
On Thu, 2 Jun 2022 09:54:31 GMT, Aleksey Shipilev wrote: > [JDK-8287496](https://bugs.openjdk.java.net/browse/JDK-8287496) brought the > alternative Loom implementation that can be used by ports as the fallback. > That fallback does not support JVMTI entirely, so lots of tests fail. Some >

Re: RFR: 8287726: Fix JVMTI tests with "requires vm.continuations" after JDK-8287496

2022-06-02 Thread Alan Bateman
On Thu, 2 Jun 2022 09:54:31 GMT, Aleksey Shipilev wrote: > [JDK-8287496](https://bugs.openjdk.java.net/browse/JDK-8287496) brought the > alternative Loom implementation that can be used by ports as the fallback. > That fallback does not support JVMTI entirely, so lots of tests fail. Some >

Integrated: 8287496: Alternative virtual thread implementation that maps to OS thread

2022-06-02 Thread Alan Bateman
On Sun, 29 May 2022 14:46:39 GMT, Alan Bateman wrote: > This patch adds an alternative virtual thread implementation where each > virtual thread is backed by an OS thread. It doesn't scale but it can be used > by ports that don't have continuations support in the VM. Aside from >

Re: RFR: 8287496: Alternative virtual thread implementation that maps to OS thread [v3]

2022-06-02 Thread Alan Bateman
On Wed, 1 Jun 2022 06:26:23 GMT, David Holmes wrote: >> Alan Bateman has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains 11 commits: >> >> - Fixed another typo in comment >> - Merge >> -

Re: RFR: 8287496: Alternative virtual thread implementation that maps to OS thread [v3]

2022-06-01 Thread Alan Bateman
A follow-up change would be to add "@requires > vm.continuations" to the ~70 serviceability/jvmti/vthread that run with > preview features enabled. Alan Bateman has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 11 commits

Re: RFR: 8287496: Alternative virtual thread implementation that maps to OS thread [v2]

2022-05-31 Thread Alan Bateman
On Tue, 31 May 2022 17:03:54 GMT, Aleksey Shipilev wrote: > I expected this change to fix the broken ARM32 port, but it doesn't work. There is work required to get the arm32 port working again, currently tracked as JDK-828636 but there may be further issues beyond that. - PR:

Re: RFR: 8287496: Alternative virtual thread implementation that maps to OS thread [v2]

2022-05-31 Thread Alan Bateman
A follow-up change would be to add "@requires > vm.continuations" to the ~70 serviceability/jvmti/vthread that run with > preview features enabled. Alan Bateman has updated the pull request incrementally with one additional commit since the last revision: Allowing linking wit

Re: RFR: 8287496: Alternative virtual thread implementation that maps to OS thread

2022-05-31 Thread Alan Bateman
On Sun, 29 May 2022 14:46:39 GMT, Alan Bateman wrote: > This patch adds an alternative virtual thread implementation where each > virtual thread is backed by an OS thread. It doesn't scale but it can be used > by ports that don't have continuations support in the VM. Aside from >

RFR: 8287496: Alternative virtual thread implementation that maps to OS thread

2022-05-31 Thread Alan Bateman
This patch adds an alternative virtual thread implementation where each virtual thread is backed by an OS thread. It doesn't scale but it can be used by ports that don't have continuations support in the VM. Aside from scalability, the lack of continuations support means: 1. JVM TI is not

Re: RFR: 8287200: Test java/lang/management/ThreadMXBean/VirtualThreadDeadlocks.java timed out after JDK-8287103 [v2]

2022-05-26 Thread Alan Bateman
On Thu, 26 May 2022 22:27:15 GMT, Leonid Mesnik wrote: >> Need to use proper synchronization. >> >> The CyclicBarriers might move the thread to WAITING state but not BLOCKED. >> So it should not confuse existing checks. > > Leonid Mesnik has updated the pull request incrementally with one

Re: RFR: 8287200: Test java/lang/management/ThreadMXBean/VirtualThreadDeadlocks.java timed out after JDK-8287103

2022-05-25 Thread Alan Bateman
On Wed, 25 May 2022 23:04:50 GMT, Leonid Mesnik wrote: >> test/jdk/java/lang/management/ThreadMXBean/VirtualThreadDeadlocks.java line >> 100: >> >>> 98: while (thread.getState() != Thread.State.BLOCKED) { >>> 99: Thread.sleep(10); >>> 100: if (thread.getState()

Re: RFR: 8286983: Add mention of "Preview Feature" for new loom related jdb and debug agent options [v2]

2022-05-25 Thread Alan Bateman
On Tue, 24 May 2022 19:36:02 GMT, Chris Plummer wrote: >> I don't think it is correct to say that this command line option is a >> preview feature. Maybe it can be clarified on a second line: >> >> >> -trackvthreadstrack virtual threads as they are created >>

Re: RFR: 8287200: Test java/lang/management/ThreadMXBean/VirtualThreadDeadlocks.java timed out after JDK-8287103

2022-05-25 Thread Alan Bateman
On Tue, 24 May 2022 19:52:57 GMT, Leonid Mesnik wrote: > Need to use proper synchronization. > > The CyclicBarriers might move the thread to WAITING state but not BLOCKED. So > it should not confuse existing checks. Marked as reviewed by alanb (Reviewer). - PR:

Integrated: 8287008: Improve tests for thread dumps in JSON format

2022-05-24 Thread Alan Bateman
On Thu, 19 May 2022 09:38:06 GMT, Alan Bateman wrote: > This change is mostly test infrastructure and improvements to the testing of > thread dumps in JSON format. It also tweaks the thread dump format so that > the process identifier and thread identifiers are a type string ra

Re: RFR: 8287008: Improve tests for thread dumps in JSON format [v5]

2022-05-23 Thread Alan Bateman
s added by JEP 425 are changed to use the test > infrastructure library. The tests for JEP 428 will also make use of this test > infrastructure. Alan Bateman has updated the pull request incrementally with one additional commit since the last revision: Review comments -

Re: RFR: 8286983: Add mention of "Preview Feature" for new loom related jdb and debug agent options [v2]

2022-05-23 Thread Alan Bateman
On Mon, 23 May 2022 02:52:38 GMT, David Holmes wrote: >> I was really trying to emphasize that the flag is preview, and therefore may >> change or go away. If I change as you suggest, the reader could imply that >> as long as virtual threads support is in place, then the flag will be also

Re: RFR: 8287008: Improve tests for thread dumps in JSON format [v4]

2022-05-23 Thread Alan Bateman
On Mon, 23 May 2022 16:44:12 GMT, Chris Plummer wrote: >> Alan Bateman has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Use string rater than number for process/thread identifiers > > test/lib/jdk/test/lib/t

Re: RFR: 8287008: Improve tests for thread dumps in JSON format [v4]

2022-05-23 Thread Alan Bateman
On Mon, 23 May 2022 08:30:51 GMT, Alan Bateman wrote: >> This change is mostly test infrastructure and improvements to the testing of >> thread dumps in JSON format. It also tweaks the thread dump format so that >> the process identifier and thread identifiers are a type

Re: RFR: 8287008: Improve tests for thread dumps in JSON format [v4]

2022-05-23 Thread Alan Bateman
s added by JEP 425 are changed to use the test > infrastructure library. The tests for JEP 428 will also make use of this test > infrastructure. Alan Bateman has updated the pull request incrementally with one additional commit since the last revision: Use string rater than number for pr

Re: RFR: 8287008: Improve tests for thread dumps in JSON format [v3]

2022-05-23 Thread Alan Bateman
On Mon, 23 May 2022 06:09:58 GMT, Chris Plummer wrote: >> Alan Bateman has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Remove spurious colon > > test/jdk/com/sun/management/HotSpotDiagnosticMXBean/DumpTh

Re: RFR: 8287103: java/lang/management/ThreadMXBean/VirtualThreadDeadlocks.java fails with Xcomp [v2]

2022-05-21 Thread Alan Bateman
On Sat, 21 May 2022 16:34:32 GMT, Leonid Mesnik wrote: >> Sync improved in test > > Leonid Mesnik has updated the pull request incrementally with one additional > commit since the last revision: > > fix Marked as reviewed by alanb (Reviewer). - PR:

Re: RFR: 8287103: java/lang/management/ThreadMXBean/VirtualThreadDeadlocks.java fails with Xcomp

2022-05-20 Thread Alan Bateman
On Fri, 20 May 2022 22:27:29 GMT, Leonid Mesnik wrote: > Sync improved in test test/jdk/java/lang/management/ThreadMXBean/VirtualThreadDeadlocks.java line 43: > 41: private static final Object LOCK2 = new Object(); > 42: > 43: private static volatile boolean lock2Obtained = false;

Re: RFR: 8287103: java/lang/management/ThreadMXBean/VirtualThreadDeadlocks.java fails with Xcomp

2022-05-20 Thread Alan Bateman
On Fri, 20 May 2022 22:27:29 GMT, Leonid Mesnik wrote: > Sync improved in test Can you add `@bug 8284161 8287103` to the test description? - PR: https://git.openjdk.java.net/jdk/pull/8821

Re: RFR: 8287008: Improve tests for thread dumps in JSON format [v3]

2022-05-20 Thread Alan Bateman
a test class that parses the > thread dump. The tests for JEP 428 like make use of the test infrastructure > too. Alan Bateman has updated the pull request incrementally with one additional commit since the last revision: Remove spurious colon - Changes: - all: https://gi

Re: RFR: 8287008: Improve tests for thread dumps in JSON format

2022-05-20 Thread Alan Bateman
On Fri, 20 May 2022 04:22:21 GMT, Chris Plummer wrote: > I think a short example dump would actually be easier to read alongside the > code. That's a good idea. I've updated the class description to include an example and also a code example of how it can be used in tests. The thread dump

Re: RFR: 8287008: Improve tests for thread dumps in JSON format [v2]

2022-05-20 Thread Alan Bateman
a test class that parses the > thread dump. The tests for JEP 428 like make use of the test infrastructure > too. Alan Bateman has updated the pull request incrementally with one additional commit since the last revision: Add example thread dump and usage to class description

Re: RFR: 8287008: Improve tests for thread dumps in JSON format

2022-05-19 Thread Alan Bateman
On Thu, 19 May 2022 09:38:06 GMT, Alan Bateman wrote: > This is a test-only change to add some test infrastructure and improve the > testing of thread dumps in JSON format. The new tests added by JEP 425 for > this thread dump format search the JSON text for strings but do

Re: RFR: 8287008: Improve tests for thread dumps in JSON format

2022-05-19 Thread Alan Bateman
On Thu, 19 May 2022 15:28:01 GMT, Chris Plummer wrote: > It would be useful if ThreadDump.java contained a comment with a description > of the JSON file syntax. It could either be in the form of a simple dump or > as a simple syntactic description. Still TBD on where the JSON "schema" will be

Re: RFR: 8286983: Add mention of "Preview Feature" for new loom related jdb and debug agent options

2022-05-19 Thread Alan Bateman
On Thu, 19 May 2022 00:10:15 GMT, Chris Plummer wrote: > As part of the loom integration, jdb added -trackvthreads and the debug agent > added "enumeratevthreads". The help text for these options should call out > that they are Preview Features.

RFR: 8287008: Improve tests for thread dumps in JSON format

2022-05-19 Thread Alan Bateman
This is a test-only change to add some test infrastructure and improve the testing of thread dumps in JSON format. The new tests added by JEP 425 for this thread dump format search the JSON text for strings but don't parse it completely. These tests can be improved with a test class that

Re: RFR: 8286441: Remove mode parameter from jdk.internal.perf.Perf.attach() [v2]

2022-05-11 Thread Alan Bateman
On Wed, 11 May 2022 02:43:21 GMT, Ioi Lam wrote: >> The `mode` parameter for ` jdk.internal.perf.Perf.attach()` has never >> supported the value `"rw"` since the source code was imported to the openjdk >> repo more than 15 years ago. In fact HotSpot throws >> `IllegalArgumentException` when

Re: RFR: 8286441: Remove mode parameter from jdk.internal.perf.Perf.attach()

2022-05-10 Thread Alan Bateman
On Tue, 10 May 2022 04:00:29 GMT, Ioi Lam wrote: > The `mode` parameter for ` jdk.internal.perf.Perf.attach()` has never > supported the value `"rw"` since the source code was imported to the openjdk > repo more than 15 years ago. In fact HotSpot throws > `IllegalArgumentException` when such

Re: RFR: 8286441: Remove mode parameter from jdk.internal.perf.Perf.attach()

2022-05-10 Thread Alan Bateman
On Tue, 10 May 2022 04:00:29 GMT, Ioi Lam wrote: > The `mode` parameter for ` jdk.internal.perf.Perf.attach()` has never > supported the value `"rw"` since the source code was imported to the openjdk > repo more than 15 years ago. In fact HotSpot throws > `IllegalArgumentException` when such

Re: RFR: 8278123: serviceability/dcmd/vm/ClassLoaderStatsTest.java failing with java.lang.AssertionError: Should have a hidden class [v2]

2022-05-09 Thread Alan Bateman
On Thu, 28 Apr 2022 21:58:46 GMT, Leonid Mesnik wrote: >> The test failed if GC happens somewhere between >> Class c = Class.forName("TestClass", true, dummyloader); >> and >> OutputAnalyzer output = executor.execute("VM.classloader_stats"); >> >> The fix is to make hc static as Chris proposed.

Integrated: 8284161: Implementation of Virtual Threads (Preview)

2022-05-07 Thread Alan Bateman
On Fri, 8 Apr 2022 13:43:39 GMT, Alan Bateman wrote: > This is the implementation of JEP 425: Virtual Threads (Preview). > > We will refresh this PR periodically to pick up changes and fixes from the > loom repo. > > Most of the new mechanisms in the HotSpot VM are d

Re: RFR: 8284161: Implementation of Virtual Threads (Preview) [v14]

2022-05-07 Thread Alan Bateman
Extent Locals. This is to > make life a bit easier and avoid having to separate VM changes and juggle > branches at this time. Alan Bateman has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 23 commits: - Refresh 4e99b5185eef9398c4cc

Re: RFR: 8284161: Implementation of Virtual Threads (Preview) [v13]

2022-05-06 Thread Alan Bateman
On Fri, 6 May 2022 06:48:46 GMT, Alan Bateman wrote: >> This is the implementation of JEP 425: Virtual Threads (Preview). >> >> We will refresh this PR periodically to pick up changes and fixes from the >> loom repo. >> >> Most of the new mechanisms in th

Re: RFR: 8284161: Implementation of Virtual Threads (Preview) [v13]

2022-05-06 Thread Alan Bateman
Extent Locals. This is to > make life a bit easier and avoid having to separate VM changes and juggle > branches at this time. Alan Bateman has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 21 commits: - Refresh 6ace49bf42e5504c69fa

Re: RFR: 8284161: Implementation of Virtual Threads (Preview) [v12]

2022-05-05 Thread Alan Bateman
On Thu, 5 May 2022 17:43:58 GMT, Aleksey Shipilev wrote: > I am sorry to be a buzzkill here, but this integration would break lots of > platforms even when Loom functionality is not enabled/used. For example, > running `java -version` on RISC-V runs into many issues: >

Re: RFR: 8284161: Implementation of Virtual Threads (Preview) [v11]

2022-05-05 Thread Alan Bateman
On Wed, 4 May 2022 16:02:36 GMT, Aleksey Shipilev wrote: > So, does this PR pass current GHA checks? I see they are not enabled for this > PR. It would be unfortunate for this large integration to break builds/tests > for smaller PRs that would follow it. I've enabled it on my fork and we'll

Re: RFR: 8284161: Implementation of Virtual Threads (Preview) [v12]

2022-05-05 Thread Alan Bateman
Extent Locals. This is to > make life a bit easier and avoid having to separate VM changes and juggle > branches at this time. Alan Bateman has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 19 commits: - Refresh 12aa09ce7efd48425cc0

Re: RFR: 8284161: Implementation of Virtual Threads (Preview) [v11]

2022-05-04 Thread Alan Bateman
Extent Locals. This is to > make life a bit easier and avoid having to separate VM changes and juggle > branches at this time. Alan Bateman has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 17 commits: - Refresh d77f7a49af75bcc5b206

Re: RFR: 8284161: Implementation of Virtual Threads (Preview) [v10]

2022-05-03 Thread Alan Bateman
Extent Locals. This is to > make life a bit easier and avoid having to separate VM changes and juggle > branches at this time. Alan Bateman has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 15 commits: - Refresh 6091080db743ece5f1b2

Re: RFR: 8284161: Implementation of Virtual Threads (Preview) [v8]

2022-05-03 Thread Alan Bateman
On Mon, 2 May 2022 17:29:02 GMT, Leonid Mesnik wrote: >> test/hotspot/jtreg/serviceability/jvmti/events/Breakpoint/breakpoint01/libbreakpoint01.cpp >> line 139: >> >>> 137:thr_info.name,(jni->IsVirtualThread(thread) == >>> JNI_TRUE) ? "virtual" : "kernel", >>> 138:

Re: RFR: 8284161: Implementation of Virtual Threads (Preview) [v8]

2022-05-02 Thread Alan Bateman
On Fri, 29 Apr 2022 23:14:45 GMT, Mikhailo Seledtsov wrote: >> Alan Bateman has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Refresh 7965cc6b168e567ac2596f2fbc3b00a7d99b7e1e > > test/lib/jdk/test/lib/thr

Re: RFR: 8284161: Implementation of Virtual Threads (Preview) [v8]

2022-05-02 Thread Alan Bateman
On Fri, 29 Apr 2022 20:57:01 GMT, Erik Gahlin wrote: >> test/jdk/jdk/jfr/api/consumer/TestManyRecordings.java line 57: >> >>> 55: int classLoaderCount = Integer.parseInt(args[0]); >>> 56: int classCount = Integer.parseInt(args[1]); >>> 57: for (int i = 0; i > >> Did you

Re: RFR: JDK-8285676: Add missing @param tags for type parameters on classes and interfaces [v4]

2022-04-28 Thread Alan Bateman
On Thu, 28 Apr 2022 16:58:40 GMT, Joe Darcy wrote: >> To enable more complete doclint checking (courtesy @jonathan-gibbons), >> please review this PR to add type-level @param tags where they are missing. >> >> To the maintainers of java.util.concurrent, those changes could be separated >> out

Re: RFR: 8284161: Implementation of Virtual Threads (Preview) [v8]

2022-04-28 Thread Alan Bateman
On Thu, 28 Apr 2022 15:10:18 GMT, Markus Grönlund wrote: >> src/jdk.jfr/share/classes/jdk/jfr/events/VirtualThreadSubmitFailedEvent.java >> line 35: >> >>> 33: >>> 34: @Category({"Java Runtime"}) >>> 35: @Label("Virtual thread submit task failed") >> >> The label is a bit a long, would

Re: RFR: JDK-8285676: Add missing @param tags for type parameters on classes and interfaces [v3]

2022-04-28 Thread Alan Bateman
On Thu, 28 Apr 2022 01:34:19 GMT, Joe Darcy wrote: >> To enable more complete doclint checking (courtesy @jonathan-gibbons), >> please review this PR to add type-level @param tags where they are missing. >> >> To the maintainers of java.util.concurrent, those changes could be separated >> out

Re: RFR: 8284161: Implementation of Virtual Threads (Preview) [v8]

2022-04-28 Thread Alan Bateman
On Wed, 27 Apr 2022 19:43:22 GMT, Paul Sandoz wrote: >> Alan Bateman has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Refresh 7965cc6b168e567ac2596f2fbc3b00a7d99b7e1e > > src/java.base/shar

Re: RFR: 8278123: serviceability/dcmd/vm/ClassLoaderStatsTest.java failing with java.lang.AssertionError: Should have a hidden class

2022-04-28 Thread Alan Bateman
On Thu, 28 Apr 2022 04:46:35 GMT, Chris Plummer wrote: >> This line added by 8238358: Implementation of JEP 371: Hidden Classes which >> has many co-authors. Hope someone could provide an explanation during this >> review. >> >> It might be possible that the goal was to verify that

Re: RFR: 8284161: Implementation of Virtual Threads (Preview) [v8]

2022-04-27 Thread Alan Bateman
On Wed, 27 Apr 2022 18:16:54 GMT, Mandy Chung wrote: >> I was wondering that too, but held off commenting since it's not super >> performance critical given `classToHashes` is synchronized on. However, it >> does make the code a little clearer. > > It's not critical and no problem if this is

Re: RFR: 8284161: Implementation of Virtual Threads (Preview) [v8]

2022-04-27 Thread Alan Bateman
On Wed, 27 Apr 2022 17:53:01 GMT, Mandy Chung wrote: >> Alan Bateman has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Refresh 7965cc6b168e567ac2596f2fbc3b00a7d99b7e1e > > src/java.base/share/classes/jdk/inte

Re: RFR: 8284161: Implementation of Virtual Threads (Preview) [v8]

2022-04-27 Thread Alan Bateman
r Structured Concurrency and Scope Locals. This is to > make life a bit easier and avoid having to separate VM changes and juggle > branches at this time. Alan Bateman has updated the pull request incrementally with one additional commit since the last revision: Refresh 79

Re: RFR: 8284161: Implementation of Virtual Threads (Preview) [v7]

2022-04-27 Thread Alan Bateman
On Wed, 27 Apr 2022 11:34:51 GMT, Daniel Fuchs wrote: >> Alan Bateman has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Refresh 8d8f0a2fd646e57fe6b4e8ab669f836dc46dda69 > > src/jdk.management/sh

Re: RFR: 8284161: Implementation of Virtual Threads (Preview) [v7]

2022-04-27 Thread Alan Bateman
On Tue, 26 Apr 2022 18:58:23 GMT, Daniel Fuchs wrote: >> Alan Bateman has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Refresh 8d8f0a2fd646e57fe6b4e8ab669f836dc46dda69 > > src/java.base/share/classes/sun/n

Re: RFR: 8284161: Implementation of Virtual Threads (Preview) [v7]

2022-04-26 Thread Alan Bateman
r Structured Concurrency and Scope Locals. This is to > make life a bit easier and avoid having to separate VM changes and juggle > branches at this time. Alan Bateman has updated the pull request incrementally with one additional commit since the last revision: Refresh 8d

Re: RFR: 8284161: Implementation of Virtual Threads (Preview) [v6]

2022-04-25 Thread Alan Bateman
r Structured Concurrency and Scope Locals. This is to > make life a bit easier and avoid having to separate VM changes and juggle > branches at this time. Alan Bateman has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains ten commits

Re: RFR: 8284161: Implementation of Virtual Threads (Preview) [v2]

2022-04-25 Thread Alan Bateman
On Fri, 15 Apr 2022 21:24:58 GMT, Paul Sandoz wrote: >> Alan Bateman has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Refresh > > src/java.base/share/classes/jdk/internal/vm/Continuation.java line 115: &g

Re: RFR: 8284161: Implementation of Virtual Threads (Preview) [v5]

2022-04-25 Thread Alan Bateman
On Fri, 22 Apr 2022 02:26:50 GMT, ExE Boss wrote: >> Alan Bateman has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Refresh > > src/java.base/share/classes/java/lang/ThreadLocal.java line 179: > &

Re: RFR: 8284161: Implementation of Virtual Threads (Preview) [v2]

2022-04-21 Thread Alan Bateman
On Fri, 15 Apr 2022 21:31:09 GMT, Paul Sandoz wrote: >> Alan Bateman has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Refresh > > src/java.base/share/classes/jdk/internal/vm/Continuation.java line 264: &g

Re: RFR: 8284161: Implementation of Virtual Threads (Preview) [v2]

2022-04-21 Thread Alan Bateman
On Sat, 16 Apr 2022 14:59:55 GMT, Alan Bateman wrote: >> src/java.base/share/classes/jdk/internal/vm/ThreadContainers.java line 184: >> >>> 182: * with the Thread API. >>> 183: */ >>> 184: private static class RootContainer extends Threa

Re: RFR: 8284161: Implementation of Virtual Threads (Preview) [v4]

2022-04-21 Thread Alan Bateman
On Tue, 19 Apr 2022 01:11:56 GMT, Mandy Chung wrote: >> Alan Bateman has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Refresh > > src/java.base/share/classes/java/lang/System.java line 2173: > &g

Re: RFR: 8284161: Implementation of Virtual Threads (Preview) [v5]

2022-04-21 Thread Alan Bateman
r Structured Concurrency and Scope Locals. This is to > make life a bit easier and avoid having to separate VM changes and juggle > branches at this time. Alan Bateman has updated the pull request incrementally with one additional commit since the last revision: Refresh ---

Re: RFR: 8284161: Implementation of Virtual Threads (Preview) [v4]

2022-04-19 Thread Alan Bateman
On Tue, 19 Apr 2022 00:09:04 GMT, Mandy Chung wrote: >> Alan Bateman has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Refresh > > src/java.base/share/classes/java/lang/ref/ReferenceQueue.java line 6

Re: RFR: 8284161: Implementation of Virtual Threads (Preview) [v2]

2022-04-17 Thread Alan Bateman
On Fri, 15 Apr 2022 21:15:45 GMT, Paul Sandoz wrote: >> Alan Bateman has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Refresh > > src/java.base/share/classes/jdk/internal/vm/Continuation.java line 94: >

Re: RFR: 8284161: Implementation of Virtual Threads (Preview) [v4]

2022-04-17 Thread Alan Bateman
r Structured Concurrency and Scope Locals. This is to > make life a bit easier and avoid having to separate VM changes and juggle > branches at this time. Alan Bateman has updated the pull request incrementally with one additional commit since the last revision: Refresh ---

Re: RFR: 8284161: Implementation of Virtual Threads (Preview) [v3]

2022-04-17 Thread Alan Bateman
On Sun, 17 Apr 2022 12:39:24 GMT, Jaikiran Pai wrote: > I had a look at the referenced > [JDK-4006245](https://bugs.openjdk.java.net/browse/JDK-4006245). The > previous/existing reference cleaning logic seems to have been added mainly to > `null` the reference to the user/application class

Re: RFR: 8284161: Implementation of Virtual Threads (Preview) [v3]

2022-04-17 Thread Alan Bateman
On Sun, 17 Apr 2022 03:49:19 GMT, Jaikiran Pai wrote: >> Alan Bateman 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: 8284161: Implementation of Virtual Threads (Preview) [v3]

2022-04-16 Thread Alan Bateman
On Sat, 16 Apr 2022 09:25:20 GMT, Jaikiran Pai wrote: >> Alan Bateman 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: 8284161: Implementation of Virtual Threads (Preview) [v2]

2022-04-16 Thread Alan Bateman
On Fri, 15 Apr 2022 22:01:10 GMT, Paul Sandoz wrote: >> Alan Bateman has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Refresh > > src/java.base/share/classes/jdk/internal/vm/ThreadConta

Re: RFR: 8284161: Implementation of Virtual Threads (Preview) [v2]

2022-04-16 Thread Alan Bateman
On Sat, 16 Apr 2022 12:31:41 GMT, ExE Boss wrote: >> Alan Bateman has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Refresh > > src/java.base/share/classes/jdk/internal/misc/Blocker.java line 111: > &

Re: RFR: 8284161: Implementation of Virtual Threads (Preview) [v3]

2022-04-16 Thread Alan Bateman
On Sat, 16 Apr 2022 11:05:47 GMT, Jaikiran Pai wrote: >> Alan Bateman 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: 8284161: Implementation of Virtual Threads (Preview) [v3]

2022-04-16 Thread Alan Bateman
On Sat, 16 Apr 2022 10:25:56 GMT, Jaikiran Pai wrote: >> Alan Bateman 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: 8284161: Implementation of Virtual Threads (Preview) [v3]

2022-04-16 Thread Alan Bateman
On Sat, 16 Apr 2022 10:29:36 GMT, Jaikiran Pai wrote: >> Alan Bateman 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: 8284161: Implementation of Virtual Threads (Preview) [v2]

2022-04-16 Thread Alan Bateman
On Fri, 15 Apr 2022 20:39:51 GMT, Paul Sandoz wrote: >> Alan Bateman has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Refresh > > src/java.base/share/classes/jdk/internal/misc/Blocker.java line 126:

Re: RFR: 8284161: Implementation of Virtual Threads (Preview) [v3]

2022-04-15 Thread Alan Bateman
On Fri, 15 Apr 2022 12:31:24 GMT, Andrey Turbanov wrote: > method seems unused now It's used by the SL API, which will follow later. I realize this may sound complicated but it avoids more complicated splits. - PR: https://git.openjdk.java.net/jdk/pull/8166

Re: RFR: 8284161: Implementation of Virtual Threads (Preview) [v2]

2022-04-15 Thread Alan Bateman
On Thu, 14 Apr 2022 21:39:17 GMT, Paul Sandoz wrote: >> Alan Bateman has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Refresh > > src/java.base/share/classes/java/lang/Thread.java line 862: > >> 86

Re: RFR: 8284161: Implementation of Virtual Threads (Preview) [v3]

2022-04-15 Thread Alan Bateman
r Structured Concurrency and Scope Locals. This is to > make life a bit easier and avoid having to separate VM changes and juggle > branches at this time. Alan Bateman has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unr

Re: RFR: 8284161: Implementation of Virtual Threads (Preview) [v2]

2022-04-13 Thread Alan Bateman
On Wed, 13 Apr 2022 11:38:55 GMT, ExE Boss wrote: >> Thanks - the same issue appears with `BufferedWriter`/`Writer`. > > The solution is to add the `private` constructor: > > private Reader(Object fallbackLock, Void internal) { > // assert fallbackLock != null; >

Re: RFR: 8284161: Implementation of Virtual Threads (Preview) [v2]

2022-04-13 Thread Alan Bateman
On Wed, 13 Apr 2022 11:35:33 GMT, ExE Boss wrote: > Actually, we can’t in case `InternalLock.CAN_USE_INTERNAL_LOCK` is ever  > `false` That's right, both StreamEncoder and StreamDecoder need the both cases. - PR: https://git.openjdk.java.net/jdk/pull/8166

Re: RFR: 8284161: Implementation of Virtual Threads (Preview) [v2]

2022-04-13 Thread Alan Bateman
r Structured Concurrency and Scope Locals. This is to > make life a bit easier and avoid having to separate VM changes and juggle > branches at this time. Alan Bateman has updated the pull request incrementally with one additional commit since the last revision: Refresh ---

Re: RFR: 8284161: Implementation of Virtual Threads (Preview)

2022-04-13 Thread Alan Bateman
On Tue, 12 Apr 2022 16:49:41 GMT, Daniel Jeliński wrote: > If it was, please update the javadoc - `NANOSECONDS.toMillis(-1)` = 0 implies > no waiting in Net.poll It's benign for the current usages but you are right, it was not intentional. - PR:

Re: RFR: 8284161: Implementation of Virtual Threads (Preview)

2022-04-12 Thread Alan Bateman
On Mon, 11 Apr 2022 17:27:11 GMT, Daniel Fuchs wrote: > Not sure if that even matters - but there will be a slight change of > behaviour here if `InternalLock.CAN_USE_INTERNAL_LOCK` is ever `false`. > Instead of synchronizing on `in`, the `BufferedReader` will synchronize on > `this`. Good!

Re: RFR: 8284616: Implement workaround for CODETOOLS-7901986 in serviceability/jvmti/RedefineClasses

2022-04-11 Thread Alan Bateman
On Mon, 11 Apr 2022 06:41:54 GMT, Alan Bateman wrote: >> The tests serviceability/jvmti/RedefineClasses start failing in loom-repo >> with CNFE like "java.lang.NoClassDefFoundError: >> jdk/test/lib/compiler/InMemoryJavaCompiler" >> >> It is not a loom

Re: RFR: 8284161: Implementation of Virtual Threads (Preview)

2022-04-11 Thread Alan Bateman
On Mon, 11 Apr 2022 07:33:20 GMT, ExE Boss wrote: > Maybe it should use a `MethodHandle` fetched using `IMPL_LOOKUP` instead, in  > order to avoid the runtime overhead of going through `CallerSensitive` > methods (`Class.forName` and `Constructor.newInstance`). > > It should probably also be 

Re: RFR: 8284161: Implementation of Virtual Threads (Preview)

2022-04-11 Thread Alan Bateman
On Sun, 10 Apr 2022 22:14:41 GMT, Magnus Ihse Bursie wrote: > Should this not be `jdk.internal.misc`? (Also, if this is the case, maybe > there's a test missing that could have discovered this...) The exception is in an incubator module, it's just that code in java.base can't statically

Re: RFR: 8284161: Implementation of Virtual Threads (Preview)

2022-04-11 Thread Alan Bateman
On Sun, 10 Apr 2022 00:40:02 GMT, ExE Boss wrote: > This is supposed to point to the `package‑summary.html` Thanks, this link is indeed wrong. Will be fixed when we refresh. - PR: https://git.openjdk.java.net/jdk/pull/8166

Re: RFR: 8284616: Implement workaround for CODETOOLS-7901986 in serviceability/jvmti/RedefineClasses

2022-04-11 Thread Alan Bateman
On Fri, 8 Apr 2022 22:15:21 GMT, Leonid Mesnik wrote: > The tests serviceability/jvmti/RedefineClasses start failing in loom-repo > with CNFE like "java.lang.NoClassDefFoundError: > jdk/test/lib/compiler/InMemoryJavaCompiler" > > It is not a loom specific bug, it might happen in jdk/jdk also.

RFR: 8284161: Implementation of Virtual Threads (Preview)

2022-04-08 Thread Alan Bateman
This is the implementation of JEP 425: Virtual Threads (Preview); TBD which JDK version to target. We will refresh this PR periodically to pick up changes and fixes from the loom repo. Most of the new mechanisms in the HotSpot VM are disabled by default and require running with

Re: RFR: 8282691: add jdb "-R" option for passing any argument to the launched debuggee process [v4]

2022-03-12 Thread Alan Bateman
On Sat, 12 Mar 2022 05:44:21 GMT, Chris Plummer wrote: >> jdb has 3 types of arguments: >> >> 1. Those that are jdb specific, such as -attach, -launch, and -listconnectors >> 2. Those that are passed to the JVM used to run jdb. These are all prefixed >> with -J, and any valid JVM argument can

Re: RFR: 8282691: add jdb "-R" option for passing any argument to the launched debuggee process [v3]

2022-03-11 Thread Alan Bateman
On Tue, 8 Mar 2022 19:26:41 GMT, Chris Plummer wrote: >> jdb has 3 types of arguments: >> >> 1. Those that are jdb specific, such as -attach, -launch, and -listconnectors >> 2. Those that are passed to the JVM used to run jdb. These are all prefixed >> with -J, and any valid JVM argument can

Re: RFR: 8282691: add jdb support for passing --enable-preview and --add-modules to the debuggee JVM [v2]

2022-03-08 Thread Alan Bateman
On Tue, 8 Mar 2022 03:37:44 GMT, Chris Plummer wrote: >> jdb has 3 types of arguments: >> >> 1. Those that are jdb specific, such as -attach, -launch, and -listconnectors >> 2. Those that are passed to the JVM used to run jdb. These are all prefixed >> with -J, and any valid JVM argument can

  1   2   3   4   5   6   7   8   9   10   >