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

2022-11-23 Thread Leonid Mesnik
On Wed, 23 Nov 2022 10:14:23 GMT, Serguei Spitsyn wrote: >> This problem has two sides. >> One is that the `VirtualThread::run() `cashes the field `notifyJvmtiEvents` >> value. >> It caused the native method `notifyJvmtiUnmountBegin()` not called after the >> field `notifyJvmtiEvents` >> value

Re: RFR: 8296546: Add @spec tags to API [v3]

2022-11-23 Thread Joe Wang
On Wed, 23 Nov 2022 18:57:03 GMT, Jonathan Gibbons wrote: >> Please review a "somewhat automated" change to insert `@spec` tags into doc >> comments, as appropriate, to leverage the recent new javadoc feature to >> generate a new page listing the references to all external specifications >>

Re: RFR: 8296546: Add @spec tags to API [v3]

2022-11-23 Thread Joe Wang
On Wed, 23 Nov 2022 18:57:03 GMT, Jonathan Gibbons wrote: >> Please review a "somewhat automated" change to insert `@spec` tags into doc >> comments, as appropriate, to leverage the recent new javadoc feature to >> generate a new page listing the references to all external specifications >>

Re: RFR: 8296546: Add @spec tags to API [v3]

2022-11-23 Thread Jonathan Gibbons
On Wed, 23 Nov 2022 19:20:53 GMT, Daniel Fuchs wrote: > The java.base/net/, java.http/, java.naming/ changes look reasonable to me - > though like Alan I wonder if it wouldn't be better to have an inline `{@spec > }` tag - similar to `{@systemProperty }`, rather than repeating all the >

Re: RFR: 8295146: Clean up native code with newer C/C++ language features [v3]

2022-11-23 Thread Kim Barrett
On Wed, 23 Nov 2022 05:22:10 GMT, Kim Barrett wrote: >> It's to avoid redefining the linkage as static in os_windows.cpp (where it's >> implemented) after an extern declaration (inside the class), which is >> forbidden by C++11: >> >>> The linkages implied by successive declarations for a

Re: RFR: 8290313: Produce warning when user specified java.io.tmpdir directory doesn't exist [v5]

2022-11-23 Thread Roger Riggs
Please review a PR to put the test on the ProblemList until the test is fixed. https://github.com/openjdk/jdk/pull/11334 Thanks, Roger On 11/23/22 3:27 PM, Daniel D. Daugherty wrote: On Mon, 21 Nov 2022 16:35:46 GMT, Weibing Xiao wrote: print warning message for java.io.tmpdir when it is

Re: RFR: 8290313: Produce warning when user specified java.io.tmpdir directory doesn't exist [v5]

2022-11-23 Thread Daniel D . Daugherty
On Mon, 21 Nov 2022 16:35:46 GMT, Weibing Xiao wrote: >> print warning message for java.io.tmpdir when it is set through the command >> line and the value is not good for creating file folder. > > Weibing Xiao has updated the pull request incrementally with one additional > commit since the

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

2022-11-23 Thread Serguei Spitsyn
On Wed, 23 Nov 2022 10:31:00 GMT, Alan Bateman wrote: >> Fixed the `yieldContinuation()` method. >> There is also `switchToCarrierThread()` method that returns the >> `notifyJvmtiEvents` value. >> It seems to be an optimization. I'm not sure yet, if we need to fix these >> places as well. > >>

Re: RFR: 8296546: Add @spec tags to API [v3]

2022-11-23 Thread Daniel Fuchs
On Wed, 23 Nov 2022 18:57:03 GMT, Jonathan Gibbons wrote: >> Please review a "somewhat automated" change to insert `@spec` tags into doc >> comments, as appropriate, to leverage the recent new javadoc feature to >> generate a new page listing the references to all external specifications >>

Re: RFR: JDK-8285932 Implementation of JEP 430 String Templates (Preview) [v30]

2022-11-23 Thread Jim Laskey
On Wed, 23 Nov 2022 17:26:58 GMT, Roger Riggs wrote: >> Will clean up javadoc for FormatProcessor::process. >> >> It is unfortunate. If you have any ideas will gladly take them on. On the >> other hand, not sure if the exception is any worse that a static initializer >> exception visually. >

Re: RFR: JDK-8286666: JEP 429: Implementation of Scoped Values (Incubator) [v25]

2022-11-23 Thread Paul Sandoz
On Wed, 23 Nov 2022 18:39:19 GMT, Andrew Haley wrote: >> JEP 429 implementation. > > Andrew Haley has updated the pull request with a new target base due to a > merge or a rebase. The pull request now contains 52 commits: > > - Merge master > - javadoc > - Feedback from reviewers > -

Re: RFR: 8296546: Add @spec tags to API [v3]

2022-11-23 Thread Jonathan Gibbons
> Please review a "somewhat automated" change to insert `@spec` tags into doc > comments, as appropriate, to leverage the recent new javadoc feature to > generate a new page listing the references to all external specifications > listed in the `@spec` tags. > > "Somewhat automated" means that

Re: RFR: JDK-8286666: JEP 429: Implementation of Scoped Values (Incubator) [v25]

2022-11-23 Thread Andrew Haley
> JEP 429 implementation. Andrew Haley has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 52 commits: - Merge master - javadoc - Feedback from reviewers - Update src/hotspot/share/classfile/vmSymbols.hpp - Merge branch

Re: RFR: JDK-8286666: JEP 429: Implementation of Scoped Values (Incubator) [v11]

2022-11-23 Thread Andrew Haley
On Fri, 18 Nov 2022 15:19:35 GMT, Alan Bateman wrote: >> Andrew Haley has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Reviewer feedback > > src/java.base/share/classes/java/lang/Thread.java line 787: > >> 785: >> 786: //

Re: RFR: JDK-8286666: JEP 429: Implementation of Scoped Values (Incubator) [v24]

2022-11-23 Thread Andrew Haley
> JEP 429 implementation. Andrew Haley has updated the pull request incrementally with one additional commit since the last revision: javadoc - Changes: - all: https://git.openjdk.org/jdk/pull/10952/files - new: https://git.openjdk.org/jdk/pull/10952/files/7ac61ba2..8c526003

Re: RFR: 8296024: Usage of DIrectBuffer::address should be guarded [v12]

2022-11-23 Thread Per Minborg
On Wed, 23 Nov 2022 16:14:52 GMT, Maurizio Cimadamore wrote: >> Per Minborg has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Cleanup > > src/java.base/share/classes/jdk/internal/access/JavaNioAccess.java line 125: > >> 123: * @see

Re: RFR: 8295857: Clarify that cleanup code can be skipped when the JVM terminates (e.g. when calling halt()) [v4]

2022-11-23 Thread Stuart Marks
On Tue, 22 Nov 2022 00:50:51 GMT, Brent Christian wrote: >> [JDK-8290036](https://bugs.openjdk.org/browse/JDK-8290036) documented the >> shutdown sequence, noting that calling Runtime.halt() skips the shutdown >> sequence and immediately terminates the VM. Thus, "threads' current methods >>

Re: RFR: 8295857: Clarify that cleanup code can be skipped when the JVM terminates (e.g. when calling halt()) [v4]

2022-11-23 Thread Stuart Marks
On Tue, 22 Nov 2022 22:24:00 GMT, David Holmes wrote: >> Brent Christian has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Update Runtime class doc re: other unexpected behaviors > > src/java.base/share/classes/java/lang/Runtime.java line

Re: RFR: 8295044: Implementation of Foreign Function and Memory API (Second Preview) [v31]

2022-11-23 Thread Maurizio Cimadamore
> This PR contains the API and implementation changes for JEP-434 [1]. A more > detailed description of such changes, to avoid repetitions during the review > process, is included as a separate comment. > > [1] - https://openjdk.org/jeps/434 Maurizio Cimadamore has updated the pull request

Re: RFR: JDK-8285932 Implementation of JEP 430 String Templates (Preview) [v30]

2022-11-23 Thread Roger Riggs
On Wed, 23 Nov 2022 16:40:10 GMT, Jim Laskey wrote: >> src/java.base/share/classes/java/util/FormatProcessor.java line 85: >> >>> 83: >>> 84: /** >>> 85: * {@inheritDoc} >> >> The javadoc should describe in more detail what `process` does and the >> errors than can occur. >> That

Integrated: 8290313: Produce warning when user specified java.io.tmpdir directory doesn't exist

2022-11-23 Thread Weibing Xiao
On Tue, 15 Nov 2022 19:02:30 GMT, Weibing Xiao wrote: > print warning message for java.io.tmpdir when it is set through the command > line and the value is not good for creating file folder. This pull request has now been integrated. Changeset: 8df3bc4e Author:Weibing Xiao Committer:

Re: RFR: 8296546: Add @spec tags to API [v2]

2022-11-23 Thread Jonathan Gibbons
On Wed, 23 Nov 2022 12:43:16 GMT, Daniel Fuchs wrote: > Thanks for adding the RFC prefix to the RFC link. What is the purpose of > editing non exported classes though, like those in the `sun.net` subpackages? That was not intentional, and is a result of the scripted edit. I will look to

Re: RFR: JDK-8285932 Implementation of JEP 430 String Templates (Preview) [v30]

2022-11-23 Thread Jim Laskey
On Wed, 23 Nov 2022 16:08:33 GMT, Roger Riggs wrote: >> Jim Laskey has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Update @since > > src/java.base/share/classes/java/util/FormatProcessor.java line 85: > >> 83: >> 84: /** >> 85:

Re: RFR: JDK-8285932 Implementation of JEP 430 String Templates (Preview) [v30]

2022-11-23 Thread Roger Riggs
On Wed, 23 Nov 2022 13:55:38 GMT, Jim Laskey wrote: >> Enhance the Java programming language with string templates, which are >> similar to string literals but contain embedded expressions. A string >> template is interpreted at run time by replacing each expression with the >> result of

Re: RFR: JDK-8285932 Implementation of JEP 430 String Templates (Preview) [v28]

2022-11-23 Thread Jim Laskey
On Wed, 23 Nov 2022 15:57:54 GMT, Roger Riggs wrote: >> Kind of blows the whole concept of embedded expressions. This is one of >> those, just because you can, doesn't mean you should. > > ok, still what is the behavior if the format includes an index? > The pattern scanner in FormatProcessor

Re: RFR: 8296024: Usage of DIrectBuffer::address should be guarded [v12]

2022-11-23 Thread Maurizio Cimadamore
On Wed, 23 Nov 2022 12:39:40 GMT, Per Minborg wrote: >> This PR proposes the introduction of **guarding** of the use of >> `DirectBuffer::address` within the JDK. With the introduction of the Foreign >> Function and Memory access, it is possible to derive Buffer instances that >> are backed

Re: RFR: JDK-8285932 Implementation of JEP 430 String Templates (Preview) [v28]

2022-11-23 Thread Roger Riggs
On Tue, 22 Nov 2022 20:17:41 GMT, Jim Laskey wrote: >> src/java.base/share/classes/java/util/FormatProcessor.java line 64: >> >>> 62: * >>> 63: * @implSpec Since, values are found within the string template, >>> argument indexing >>> 64: * specifiers are unsupported. >> >> What is the

Re: RFR: 8236919: Refactor com.sun.tools.javac.main.CommandLine into a reusable module for other JDK tools [v3]

2022-11-23 Thread Christian Stein
> This PR copies the `CommandLine.java` file from module `jdk.compiler` > (package `com.sun.tools.javac.main`) into the `jdk.internal.opt` module, > creating a new package with name `jdk.internal.opt`. That new > `jdk.internal.opt` package is then exported to the following modules: > -

Re: RFR: JDK-8285932 Implementation of JEP 430 String Templates (Preview) [v30]

2022-11-23 Thread Roger Riggs
On Wed, 23 Nov 2022 13:55:38 GMT, Jim Laskey wrote: >> Enhance the Java programming language with string templates, which are >> similar to string literals but contain embedded expressions. A string >> template is interpreted at run time by replacing each expression with the >> result of

Re: RFR: 8297451: ProcessHandleImpl should assert privilege when modifying reaper thread

2022-11-23 Thread Roger Riggs
On Wed, 23 Nov 2022 08:38:02 GMT, Chris Hegarty wrote: >> This commit guards thread modifications for the process reaper thread with >> doPrivileged. > > src/java.base/share/classes/jdk/internal/misc/InnocuousThread.java line 137: > >> 135: public static Thread newSystemThread(String name,

Re: RFR: 8297385: Remove duplicated null typos in javadoc

2022-11-23 Thread Roger Riggs
On Wed, 23 Nov 2022 06:58:09 GMT, Dongxu Wang wrote: > 8297385: Remove duplicated null typos in javadoc Looks good. - Marked as reviewed by rriggs (Reviewer). PR: https://git.openjdk.org/jdk/pull/11311

Re: RFR: JDK-8286666: JEP 429: Implementation of Scoped Values (Incubator) [v23]

2022-11-23 Thread Andrew Haley
> JEP 429 implementation. Andrew Haley has updated the pull request incrementally with one additional commit since the last revision: Feedback from reviewers - Changes: - all: https://git.openjdk.org/jdk/pull/10952/files - new:

Re: RFR: JDK-8286666: JEP 429: Implementation of Scoped Values (Incubator) [v21]

2022-11-23 Thread Andrew Haley
On Tue, 22 Nov 2022 17:34:22 GMT, Andrew Haley wrote: >> JEP 429 implementation. > > Andrew Haley has updated the pull request incrementally with three additional > commits since the last revision: > > - Merge branch 'JDK-828' of https://github.com/theRealAph/jdk into > JDK-828 > -

Re: RFR: JDK-8286666: JEP 429: Implementation of Scoped Values (Incubator) [v22]

2022-11-23 Thread Andrew Haley
> JEP 429 implementation. Andrew Haley has updated the pull request incrementally with one additional commit since the last revision: Update src/hotspot/share/classfile/vmSymbols.hpp - Changes: - all: https://git.openjdk.org/jdk/pull/10952/files - new:

Re: RFR: JDK-8286666: JEP 429: Implementation of Scoped Values (Incubator) [v6]

2022-11-23 Thread Andrew Haley
On Wed, 16 Nov 2022 13:13:59 GMT, Alan Bateman wrote: >> Note that `ScopedValue` can currently be bound to `null`, but by using >> `Optional`, there would be no way to differentiate an unbound `ScopedValue` >> from one bound to `null`. > >> Note that `ScopedValue` can currently be bound to 

Re: RFR: JDK-8286666: JEP 429: Implementation of Scoped Values (Incubator) [v15]

2022-11-23 Thread Andrew Haley
On Fri, 18 Nov 2022 17:31:30 GMT, Alan Bateman wrote: >> Andrew Haley has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - Reviewer feedback >> - Reviewer feedback Javadoc fixes > > src/java.base/share/classes/java/lang/Thread.java line

Re: RFR: JDK-8285932 Implementation of JEP 430 String Templates (Preview) [v30]

2022-11-23 Thread Jim Laskey
> Enhance the Java programming language with string templates, which are > similar to string literals but contain embedded expressions. A string > template is interpreted at run time by replacing each expression with the > result of evaluating that expression, possibly after further validation

Re: RFR: JDK-8285932 Implementation of JEP 430 String Templates (Preview) [v29]

2022-11-23 Thread Jim Laskey
> Enhance the Java programming language with string templates, which are > similar to string literals but contain embedded expressions. A string > template is interpreted at run time by replacing each expression with the > result of evaluating that expression, possibly after further validation

Withdrawn: 8292937: Improve performance of some read operations of RandomAccessFile

2022-11-23 Thread duke
On Thu, 25 Aug 2022 17:14:20 GMT, Sergey Tsypanov wrote: > Currently some operations of RandomAccessFile are implemented with multiple > read() invocations: > > public final int readInt() throws IOException { > int ch1 = this.read(); > int ch2 = this.read(); > int ch3 =

Re: RFR: JDK-8285932 Implementation of JEP 430 String Templates (Preview) [v28]

2022-11-23 Thread Jim Laskey
On Tue, 22 Nov 2022 19:09:12 GMT, Roger Riggs wrote: >> Jim Laskey has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Seal Digits > > src/java.base/share/classes/java/lang/template/StringTemplate.java line 319: > >> 317: * This

Re: RFR: 8296546: Add @spec tags to API [v2]

2022-11-23 Thread Daniel Fuchs
On Tue, 22 Nov 2022 22:04:57 GMT, Jonathan Gibbons wrote: >> Please review a "somewhat automated" change to insert `@spec` tags into doc >> comments, as appropriate, to leverage the recent new javadoc feature to >> generate a new page listing the references to all external specifications >>

Re: RFR: 8296024: Usage of DIrectBuffer::address should be guarded [v12]

2022-11-23 Thread Per Minborg
> This PR proposes the introduction of **guarding** of the use of > `DirectBuffer::address` within the JDK. With the introduction of the Foreign > Function and Memory access, it is possible to derive Buffer instances that > are backed by native memory that, in turn, can be closed asynchronously

Re: RFR: 8297385: Remove duplicated null typos in javadoc

2022-11-23 Thread Daniel Fuchs
On Wed, 23 Nov 2022 06:58:09 GMT, Dongxu Wang wrote: > 8297385: Remove duplicated null typos in javadoc LGTM - Marked as reviewed by dfuchs (Reviewer). PR: https://git.openjdk.org/jdk/pull/11311

Re: RFR: 8296024: Usage of DIrectBuffer::address should be guarded [v11]

2022-11-23 Thread Per Minborg
> This PR proposes the introduction of **guarding** of the use of > `DirectBuffer::address` within the JDK. With the introduction of the Foreign > Function and Memory access, it is possible to derive Buffer instances that > are backed by native memory that, in turn, can be closed asynchronously

Re: RFR: 8295044: Implementation of Foreign Function and Memory API (Second Preview) [v30]

2022-11-23 Thread Maurizio Cimadamore
> This PR contains the API and implementation changes for JEP-434 [1]. A more > detailed description of such changes, to avoid repetitions during the review > process, is included as a separate comment. > > [1] - https://openjdk.org/jeps/434 Maurizio Cimadamore has updated the pull request

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

2022-11-23 Thread Alan Bateman
On Wed, 23 Nov 2022 10:16:44 GMT, Serguei Spitsyn wrote: > There is also `switchToCarrierThread()` method that returns the > `notifyJvmtiEvents` value. > It seems to be an optimization. I'm not sure yet, if we need to fix these > places as well. It was to ensure that hide(true) and

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

2022-11-23 Thread Serguei Spitsyn
On Wed, 23 Nov 2022 10:01:07 GMT, Serguei Spitsyn wrote: >> src/java.base/share/classes/java/lang/VirtualThread.java line 273: >> >>> 271: private void run(Runnable task) { >>> 272: assert state == RUNNING; >>> 273: boolean notifyJvmti = notifyJvmtiEvents; >> >> Don't we

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

2022-11-23 Thread Serguei Spitsyn
> This problem has two sides. > One is that the `VirtualThread::run() `cashes the field `notifyJvmtiEvents` > value. > It caused the native method `notifyJvmtiUnmountBegin()` not called after the > field `notifyJvmtiEvents` > value has been set to `true` when an agent library is loaded into

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

2022-11-23 Thread Serguei Spitsyn
On Wed, 23 Nov 2022 02:17:43 GMT, Leonid Mesnik wrote: >> This problem has two sides. >> One is that the `VirtualThread::run() `cashes the field `notifyJvmtiEvents` >> value. >> It caused the native method `notifyJvmtiUnmountBegin()` not called after the >> field `notifyJvmtiEvents` >> value

Re: RFR: 8297451: ProcessHandleImpl should assert privilege when modifying reaper thread

2022-11-23 Thread Chris Hegarty
On Wed, 23 Nov 2022 05:01:40 GMT, Ryan Ernst wrote: > This commit guards thread modifications for the process reaper thread with > doPrivileged. Changes requested by chegar (Reviewer). src/java.base/share/classes/jdk/internal/misc/InnocuousThread.java line 137: > 135: public static

Re: RFR: 8297451: ProcessHandleImpl should assert privilege when modifying reaper thread

2022-11-23 Thread Chris Hegarty
On Wed, 23 Nov 2022 05:01:40 GMT, Ryan Ernst wrote: > This commit guards thread modifications for the process reaper thread with > doPrivileged. Hi @rjernst Thanks for taking this one on. I agree with adding the privileged blocks around the calls to Thread::setName, but the usage raises a