Integrated: 8308270: ARM32 build broken after JDK-8304913

2023-05-17 Thread Boris Ulasevich
On Wed, 17 May 2023 08:45:23 GMT, Boris Ulasevich wrote: > Build issue happens after https://git.openjdk.org/jdk/pull/13585: > > $ make bundles > ... > jdk.tools.jlink.plugin.PluginException: ModuleTarget is malformed: No enum > constant jdk.internal.util.Architecture.ARM > at >

Re: RFR: 8308270: ARM32 build broken after JDK-8304913

2023-05-17 Thread Boris Ulasevich
On Wed, 17 May 2023 08:45:23 GMT, Boris Ulasevich wrote: > Build issue happens after https://git.openjdk.org/jdk/pull/13585: > > $ make bundles > ... > jdk.tools.jlink.plugin.PluginException: ModuleTarget is malformed: No enum > constant jdk.internal.util.Architecture.ARM > at >

Re: RFR: 8308046: Move Solaris related charsets from java.base to jdk.charsets module [v2]

2023-05-17 Thread Naoto Sato
On Wed, 17 May 2023 23:29:40 GMT, Naoto Sato wrote: >You can import classes in `java.base/sun.nio.cs` with the wild card so that it >would work on all platforms (`Big5` either in `java.base` or `jdk.charsets`) Scratch that, you've already did it. Then you can remove these: import

Re: RFR: 8308046: Move Solaris related Japanese charsets from java.base to jdk.charsets module [v2]

2023-05-17 Thread Naoto Sato
On Tue, 16 May 2023 17:13:02 GMT, Naoto Sato wrote: >> Ichiroh Takiguchi has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 8308046: Move Solaris related Japanese charsets from java.base to >> jdk.charsets module > > I now think it is

Re: RFR: 8308046: Move Solaris related Japanese charsets from java.base to jdk.charsets module [v2]

2023-05-17 Thread Naoto Sato
On Tue, 16 May 2023 15:14:03 GMT, Ichiroh Takiguchi wrote: >> According to "JDK 20 Internationalization Guide" >> https://docs.oracle.com/en/java/javase/20/intl/supported-encodings.html >> Following Solaris related Japanese charsets are in "contained in >> jdk.charsets module" list. >> >> -

Re: RFR: 8308293: A linker should expose the layouts it supports [v2]

2023-05-17 Thread Maurizio Cimadamore
On Wed, 17 May 2023 22:41:16 GMT, Paul Sandoz wrote: > So maybe this comes down to the linker supporting a subset ABI's data types, > and that subset might increase over time, but never decrease? In this respect > could we present a table for each supported linker ABI listing the ABI type >

Re: RFR: 8308293: A linker should expose the layouts it supports [v2]

2023-05-17 Thread Paul Sandoz
On Wed, 17 May 2023 22:34:32 GMT, Maurizio Cimadamore wrote: >> src/java.base/share/classes/java/lang/foreign/Linker.java line 219: >> >>> 217: * >>> 218: * the alignment constraint of {@code G} is set to its >> href="MemoryLayout.html#layout-align">natural alignment; >>> 219: * the size

Re: RFR: 8308293: A linker should expose the layouts it supports [v2]

2023-05-17 Thread Paul Sandoz
On Wed, 17 May 2023 18:18:03 GMT, Maurizio Cimadamore wrote: >> This patch adds an instance method on `Linker`, namely >> `Linker::canonicalLayouts` which returns all the layouts known by the linker >> as implementing some ABI type. For instance, if I call this on my machine >> (Linux/x64) I

Re: RFR: 8308293: A linker should expose the layouts it supports [v2]

2023-05-17 Thread Maurizio Cimadamore
On Wed, 17 May 2023 22:08:57 GMT, Paul Sandoz wrote: >> Maurizio Cimadamore has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Tweak javadoc > > src/java.base/share/classes/java/lang/foreign/Linker.java line 219: > >> 217: * >> 218: *

Re: RFR: 8308293: A linker should expose the layouts it supports [v2]

2023-05-17 Thread Paul Sandoz
On Wed, 17 May 2023 18:18:03 GMT, Maurizio Cimadamore wrote: >> This patch adds an instance method on `Linker`, namely >> `Linker::canonicalLayouts` which returns all the layouts known by the linker >> as implementing some ABI type. For instance, if I call this on my machine >> (Linux/x64) I

Re: RFR: 8308276: Change layout API to work with bytes, not bits

2023-05-17 Thread Paul Sandoz
On Tue, 16 May 2023 13:53:32 GMT, Maurizio Cimadamore wrote: > As explained in [1], memory layouts and memory segments describe sizes using > different units. Memory layouts use bits, whereas memory segments use bytes. > This is historical: memory layouts were designed after the Minimal LDL

Re: RFR: 8308276: Change layout API to work with bytes, not bits

2023-05-17 Thread Paul Sandoz
On Tue, 16 May 2023 13:53:32 GMT, Maurizio Cimadamore wrote: > As explained in [1], memory layouts and memory segments describe sizes using > different units. Memory layouts use bits, whereas memory segments use bytes. > This is historical: memory layouts were designed after the Minimal LDL

Re: RFR: 8308270: ARM32 build broken after JDK-8304913

2023-05-17 Thread Roger Riggs
On Wed, 17 May 2023 08:45:23 GMT, Boris Ulasevich wrote: > Build issue happens after https://git.openjdk.org/jdk/pull/13585: > > $ make bundles > ... > jdk.tools.jlink.plugin.PluginException: ModuleTarget is malformed: No enum > constant jdk.internal.util.Architecture.ARM > at >

Re: RFR: 8308248: Revisit alignment of layout constants on 32-bit platforms [v2]

2023-05-17 Thread Paul Sandoz
On Wed, 17 May 2023 11:15:11 GMT, Maurizio Cimadamore wrote: >> The FFM API exposes layout constants for Java primitives. Among those there >> are constants for `JAVA_LONG` and `JAVA_DOUBLE`. Currently, the alignment of >> these layouts is set the same as their size (e.g. 8 bytes). >> >>

Re: RFR: 8308016: Use snippets in java.io package [v7]

2023-05-17 Thread Brian Burkhalter
> Replace `{@code ...}` patterns and the like with `{@snippet > lang=java : ...}`. Brian Burkhalter 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 contains

Integrated: 8307483: New micros for j.u.c.LockSupport

2023-05-17 Thread Eric Caspole
On Thu, 4 May 2023 20:17:11 GMT, Eric Caspole wrote: > These micros were developed while investigating JDK-8305670 by myself and > Sergey Kuksenko. The order of thread creation was important in that bug, so > there are 2 JMH for creating sleepers before and after the worker threads. This pull

Re: RFR: 8307990: jspawnhelper must close its writing side of a pipe before reading from it

2023-05-17 Thread Joe Darcy
On Wed, 17 May 2023 14:42:45 GMT, Roger Riggs wrote: > > Should this issue have a CSR for any behavioral changes? > > Well, you can certainly argue that every bug fix is a behavioral changes, > right :) > > But seriously, I don't see how this PR could require a CSR. The only > behavioral

RFR: 8308108: Support Unicode extension for collation settings

2023-05-17 Thread Naoto Sato
This change intends to interpret the BCP47 U extension wrt collation settings in the given `Locale`, then applies them to the created instances in the 1-arg factory method in `Collator`. A corresponding CSR has also been drafted. - Commit messages: - 8308108: Support Unicode

Re: RFR: 8308270: ARM32 build broken after JDK-8304913

2023-05-17 Thread Thomas Stuefe
On Wed, 17 May 2023 08:45:23 GMT, Boris Ulasevich wrote: > Build issue happens after https://git.openjdk.org/jdk/pull/13585: > > $ make bundles > ... > jdk.tools.jlink.plugin.PluginException: ModuleTarget is malformed: No enum > constant jdk.internal.util.Architecture.ARM > at >

Re: RFR: JDK-8027711: Unify wildcarding syntax for CompileCommand and CompileOnly

2023-05-17 Thread Tobias Hartmann
On Thu, 4 May 2023 13:36:22 GMT, Tobias Holenstein wrote: > At the moment `CompileCommand` and `CompileOnly` use different syntax for > matching methods. > > ### Old CompileOnly format > - matching a **method name** with **class name** and **package name**: >

Re: RFR: 8308293: A linker should expose the layouts it supports [v2]

2023-05-17 Thread Maurizio Cimadamore
> This patch adds an instance method on `Linker`, namely > `Linker::canonicalLayouts` which returns all the layouts known by the linker > as implementing some ABI type. For instance, if I call this on my machine > (Linux/x64) I get this: > > > jshell> import java.lang.foreign.*; > > jshell>

Re: The introduction of Sequenced collections is not a source compatible change

2023-05-17 Thread Maurizio Cimadamore
On 17/05/2023 18:52, Maurizio Cimadamore wrote: I believe that would be an experiment worth doing (if you can!), and report back if you find any compilation problems. Ah - I missed this critical last line: P.S.: To be honest: I tried to pass "--release 21" when compiling Lucene and it

Re: RFR: 8308293: A linker should expose the layouts it supports

2023-05-17 Thread Maurizio Cimadamore
On Wed, 17 May 2023 17:15:06 GMT, Maurizio Cimadamore wrote: > This patch adds an instance method on `Linker`, namely > `Linker::canonicalLayouts` which returns all the layouts known by the linker > as implementing some ABI type. For instance, if I call this on my machine > (Linux/x64) I get

RFR: 8308293: A linker should expose the layouts it supports

2023-05-17 Thread Maurizio Cimadamore
This patch adds an instance method on `Linker`, namely `Linker::canonicalLayouts` which returns all the layouts known by the linker as implementing some ABI type. For instance, if I call this on my machine (Linux/x64) I get this: jshell> import java.lang.foreign.*; jshell>

Re: The introduction of Sequenced collections is not a source compatible change

2023-05-17 Thread Maurizio Cimadamore
On 17/05/2023 08:58, Uwe Schindler wrote: If we would change to Java 21 as compilation target, we may need to adapt our code. I believe that would be an experiment worth doing (if you can!), and report back if you find any compilation problems. E.g. using --release 17 effectively shields

RFR: 8308270: ARM32 build broken after JDK-8304913

2023-05-17 Thread Boris Ulasevich
Build issue happens after https://git.openjdk.org/jdk/pull/13585: $ make bundles ... jdk.tools.jlink.plugin.PluginException: ModuleTarget is malformed: No enum constant jdk.internal.util.Architecture.ARM at

Re: RFR: 8291065: Creating a VarHandle for a static field triggers class initialization [v3]

2023-05-17 Thread Chen Liang
> Also fixed the bug with NPE in `IndirectVarHandle::isAccessModeSupported`. > > A few implementation-detail methods in VarHandle are now documented with the > implied constraints to avoid subtle problems in the future. Changed > `IndirectVarHandle` to call `asDirect` lazily to accomodate the

Re: Leap second handling in Windows timestamps

2023-05-17 Thread Roger Riggs
Hi, Thanks for the report, I created a Jira issue to track the investigation. https://bugs.openjdk.org/browse/JDK-8308302 Regards, Roger On 5/13/23 2:43 PM, andr...@flueckiger.ch wrote: Subject: Leap second handling in Windows timestamps From: Date: 5/13/23, 2:43 PM To: Hello, This is

Re: RFR: 8307990: jspawnhelper must close its writing side of a pipe before reading from it [v3]

2023-05-17 Thread Roger Riggs
On Wed, 17 May 2023 16:00:23 GMT, Volker Simonis wrote: >> Since JDK13, executing commands in a sub-process defaults to the so called >> `POSIX_SPAWN` launching mechanism (i.e. >> `-Djdk.lang.Process.launchMechanism=POSIX_SPAWN`) on Linux. This works by >> using `posix_spawn(3)` to firstly

Re: RFR: 8308016: Use snippets in java.io package [v6]

2023-05-17 Thread Brian Burkhalter
> Replace `{@code ...}` patterns and the like with `{@snippet > lang=java : ...}`. Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision: 8308016: Reinstate @snippet for RandomAccessFile::readLong - Changes: - all:

Re: RFR: JDK-8027711: Unify wildcarding syntax for CompileCommand and CompileOnly

2023-05-17 Thread Vladimir Kozlov
On Thu, 4 May 2023 13:36:22 GMT, Tobias Holenstein wrote: > At the moment `CompileCommand` and `CompileOnly` use different syntax for > matching methods. > > ### Old CompileOnly format > - matching a **method name** with **class name** and **package name**: >

Re: RFR: 8307990: jspawnhelper must close its writing side of a pipe before reading from it [v2]

2023-05-17 Thread Thomas Stuefe
On Wed, 17 May 2023 16:05:58 GMT, Volker Simonis wrote: >> src/java.base/unix/native/jspawnhelper/jspawnhelper.c line 140: >> >>> 138: struct stat buf; >>> 139: /* argv[0] contains the fd number to read all the child info */ >>> 140: int r, fdinr, fdinw, fdout; >> >> Since you are

Re: RFR: 8307990: jspawnhelper must close its writing side of a pipe before reading from it

2023-05-17 Thread Volker Simonis
On Wed, 17 May 2023 14:42:45 GMT, Roger Riggs wrote: > if parent process dies prematurely @RogerRiggs , I've created a release note for the issue based on your suggestions. Please feel free to proof-read and enhance it :) - PR Comment:

Re: RFR: 8307483: New micros for j.u.c.LockSupport [v4]

2023-05-17 Thread Eric Caspole
> These micros were developed while investigating JDK-8305670 by myself and > Sergey Kuksenko. The order of thread creation was important in that bug, so > there are 2 JMH for creating sleepers before and after the worker threads. Eric Caspole has updated the pull request incrementally with one

Re: RFR: 8307990: jspawnhelper must close its writing side of a pipe before reading from it [v2]

2023-05-17 Thread Volker Simonis
On Wed, 17 May 2023 14:10:59 GMT, Thomas Stuefe wrote: >> Volker Simonis has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Added test case > > src/java.base/unix/native/libjava/ProcessImpl_md.c line 490: > >> 488: pid_t resultPid; >>

Re: The introduction of Sequenced collections is not a source compatible change

2023-05-17 Thread Joe Darcy
On 5/17/2023 7:07 AM, Ethan McCue wrote: > if they have setup their projects correctly. Can you be more clear about what "setup their projects correctly" means? If you are referring to usage of --release, you seem to be making a pretty strong argument that this will not be the case. Use

Re: RFR: 8307990: jspawnhelper must close its writing side of a pipe before reading from it [v2]

2023-05-17 Thread Volker Simonis
On Wed, 17 May 2023 13:46:29 GMT, Thomas Stuefe wrote: >> Volker Simonis has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Added test case > > src/java.base/unix/native/jspawnhelper/jspawnhelper.c line 140: > >> 138: struct stat buf;

Re: RFR: 8307990: jspawnhelper must close its writing side of a pipe before reading from it [v3]

2023-05-17 Thread Volker Simonis
> Since JDK13, executing commands in a sub-process defaults to the so called > `POSIX_SPAWN` launching mechanism (i.e. > `-Djdk.lang.Process.launchMechanism=POSIX_SPAWN`) on Linux. This works by > using `posix_spawn(3)` to firstly start a tiny helper program called > `jspawnhelper` in a

Re: RFR: 8307990: jspawnhelper must close its writing side of a pipe before reading from it [v2]

2023-05-17 Thread Volker Simonis
On Wed, 17 May 2023 14:55:00 GMT, Roger Riggs wrote: >> Volker Simonis has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Added test case > > src/java.base/unix/native/libjava/childproc.c line 408: > >> 406: * or the newly created

Re: RFR: 8308016: Use snippets in java.io package [v2]

2023-05-17 Thread Roger Riggs
On Sun, 14 May 2023 05:50:20 GMT, Tagir F. Valeev wrote: >> Brian Burkhalter has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 8308016: Remove ellipses ("...") from snippets > > src/java.base/share/classes/java/io/RandomAccessFile.java

Re: RFR: 8308246: PPC64le build broken after JDK-8304913 [v2]

2023-05-17 Thread Roger Riggs
On Wed, 17 May 2023 10:31:25 GMT, Alan Bateman wrote: >> Yes, linux-ppc64 is big endian. The 2 flavors are completely incompatible. >> linux-ppc64le is basically a new platform. Endianness should actually get >> checked in addition to the archName. > >> Yes, linux-ppc64 is big endian. The 2

Integrated: JDK-8308239: Tighten up accessibility of nested classes in java.lang.invoke

2023-05-17 Thread Joe Darcy
On Tue, 16 May 2023 21:35:14 GMT, Joe Darcy wrote: > Tightening up accessibility of a few nested classes. There is no practical > impact on source compatibility -- source uses within the package still work, > but by default the ability to reflectively call methods on these classes is >

Re: RFR: 8132995: Matcher$ImmutableMatchResult should be optimized to reduce space usage [v4]

2023-05-17 Thread Raffaello Giulietti
On Wed, 17 May 2023 15:05:53 GMT, Raffaello Giulietti wrote: >> When appropriate and useful, copies only the relevant portion of the >> `CharSequence` to the match result. > > Raffaello Giulietti has updated the pull request incrementally with one > additional commit since the last revision:

Integrated: 8308246: PPC64le build broken after JDK-8304913

2023-05-17 Thread Martin Doerr
On Wed, 17 May 2023 07:16:17 GMT, Martin Doerr wrote: > PPC64le needs to get recognized as PPC64. Otherwise, jlink doesn't recognize > the platform and throws a PluginException: ModuleTarget is malformed: No enum > constant jdk.internal.util.Architecture.PPC64LE. This pull request has now

Re: RFR: 8307990: jspawnhelper must close its writing side of a pipe before reading from it

2023-05-17 Thread Bernd
On Wed, 17 May 2023 12:40:58 GMT, Volker Simonis wrote: > If we do a short read we will work with corrupted `ChildStuff` and > `SpawnInfo` structures. i would agree failing after readFully returns short reads is fine. It won’t stop the method from retrying/completing endlessly in a

Re: RFR: 8132995: Matcher$ImmutableMatchResult should be optimized to reduce space usage [v3]

2023-05-17 Thread Claes Redestad
On Wed, 17 May 2023 09:19:10 GMT, Raffaello Giulietti wrote: >> When appropriate and useful, copies only the relevant portion of the >> `CharSequence` to the match result. > > Raffaello Giulietti has updated the pull request with a new target base due > to a merge or a rebase. The incremental

Re: RFR: 8132995: Matcher$ImmutableMatchResult should be optimized to reduce space usage [v3]

2023-05-17 Thread Raffaello Giulietti
On Wed, 17 May 2023 14:42:52 GMT, Claes Redestad wrote: >> Raffaello Giulietti 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 contains five >>

Re: RFR: 8308246: PPC64le build broken after JDK-8304913 [v2]

2023-05-17 Thread Martin Doerr
On Wed, 17 May 2023 09:42:58 GMT, Martin Doerr wrote: >> PPC64le needs to get recognized as PPC64. Otherwise, jlink doesn't recognize >> the platform and throws a PluginException: ModuleTarget is malformed: No >> enum constant jdk.internal.util.Architecture.PPC64LE. > > Martin Doerr has

Re: RFR: 8307990: jspawnhelper must close its writing side of a pipe before reading from it

2023-05-17 Thread Roger Riggs
On Wed, 17 May 2023 12:48:17 GMT, Volker Simonis wrote: > > Should this issue have a CSR for any behavioral changes? > > Well, you can certainly argue that every bug fix is a behavioral changes, > right :) > > But seriously, I don't see how this PR could require a CSR. The only > behavioral

Re: RFR: 8132995: Matcher$ImmutableMatchResult should be optimized to reduce space usage [v4]

2023-05-17 Thread Raffaello Giulietti
> When appropriate and useful, copies only the relevant portion of the > `CharSequence` to the match result. Raffaello Giulietti has updated the pull request incrementally with one additional commit since the last revision: Simplified text capturing. - Changes: - all:

Re: RFR: 8307990: jspawnhelper must close its writing side of a pipe before reading from it [v2]

2023-05-17 Thread Roger Riggs
On Wed, 17 May 2023 12:33:48 GMT, Volker Simonis wrote: >> Since JDK13, executing commands in a sub-process defaults to the so called >> `POSIX_SPAWN` launching mechanism (i.e. >> `-Djdk.lang.Process.launchMechanism=POSIX_SPAWN`) on Linux. This works by >> using `posix_spawn(3)` to firstly

Re: RFR: JDK-8027711: Unify wildcarding syntax for CompileCommand and CompileOnly

2023-05-17 Thread Tobias Holenstein
On Thu, 4 May 2023 13:36:22 GMT, Tobias Holenstein wrote: > At the moment `CompileCommand` and `CompileOnly` use different syntax for > matching methods. > > ### Old CompileOnly format > - matching a **method name** with **class name** and **package name**: >

RFR: JDK-8027711: Unify wildcarding syntax for CompileCommand and CompileOnly

2023-05-17 Thread Tobias Holenstein
At the moment `CompileCommand` and `CompileOnly` use different syntax for matching methods. ### Old CompileOnly format - matching a **method name** with **class name** and **package name**: `-XX:CompileOnly=package/path/Class.method` `-XX:CompileOnly=package/path/Class::method`

Re: RFR: 8308281: Java snippets in the FFM API need to be updated

2023-05-17 Thread Chen Liang
On Wed, 17 May 2023 11:46:39 GMT, Per Minborg wrote: > As the API has improved over the recent releases, not all `{@snippet ..}` > sections have been kept in sync. > > This PR suggests all snippets used should be verified against real code that > is placed in a new `snippet-files` folder and

Re: RFR: 8307990: jspawnhelper must close its writing side of a pipe before reading from it [v2]

2023-05-17 Thread Thomas Stuefe
On Wed, 17 May 2023 12:33:48 GMT, Volker Simonis wrote: >> Since JDK13, executing commands in a sub-process defaults to the so called >> `POSIX_SPAWN` launching mechanism (i.e. >> `-Djdk.lang.Process.launchMechanism=POSIX_SPAWN`) on Linux. This works by >> using `posix_spawn(3)` to firstly

Re: The introduction of Sequenced collections is not a source compatible change

2023-05-17 Thread Ethan McCue
> if they have setup their projects correctly. Can you be more clear about what "setup their projects correctly" means? If you are referring to usage of --release, you seem to be making a pretty strong argument that this will not be the case. > We tested Apache Lucene and Apache Solr with Java

Re: RFR: 7065228: To interpret case-insensitive string locale independently [v2]

2023-05-17 Thread Darragh Clarke
On Wed, 17 May 2023 10:41:57 GMT, Daniel Jeliński wrote: >> Darragh Clarke has updated the pull request incrementally with two >> additional commits since the last revision: >> >> - Update >> src/java.base/share/classes/sun/net/www/protocol/http/DigestAuthentication.java >> >>

Re: RFR: 7065228: To interpret case-insensitive string locale independently [v2]

2023-05-17 Thread Darragh Clarke
> Updated instances of `toLowerCase` and `toUpperCase` in several net and io > files to specify `Locale.ROOT` to ensure that case conversion issues don't > occur, > > I didn't add any new tests but ran tier 1-3 with no issues Darragh Clarke has updated the pull request incrementally with two

Re: RFR: 8306842: Classfile API performance improvements [v8]

2023-05-17 Thread Chen Liang
On Wed, 17 May 2023 13:41:16 GMT, Adam Sotona wrote: >> Following improvements implemented: >> - Switch over `String` replaced with switch single char >> - Binary search for frames in `StackMapGenerator` >> - `StackMapGenerator.rawHandlers` with pre-calculated offsets >> - `ClassEntry` is

Re: RFR: 8306842: Classfile API performance improvements [v7]

2023-05-17 Thread Chen Liang
On Wed, 17 May 2023 13:28:53 GMT, Adam Sotona wrote: >> Good, I think it makes perfect sense for the MTD parameter list to be >> immutable and shareable without copying. > > Thank you for the review. > Yes, I'm looking forward to see it together with Constants API improvements > in one

Re: RFR: 8306842: Classfile API performance improvements [v8]

2023-05-17 Thread Adam Sotona
> Following improvements implemented: > - Switch over `String` replaced with switch single char > - Binary search for frames in `StackMapGenerator` > - `StackMapGenerator.rawHandlers` with pre-calculated offsets > - `ClassEntry` is caching `ClassDesc` symbol > - Caching of type symbols in

Re: RFR: 8306842: Classfile API performance improvements [v7]

2023-05-17 Thread Adam Sotona
On Tue, 16 May 2023 22:00:18 GMT, Claes Redestad wrote: >> I plan to share a backing list in #13186, with API additions so users can >> avoid copying their input immutable parameter list as well. I see no reason >> to use a direct array, for MTD is not passed to and used by the VM, unlike >>

Re: RFR: 8306457: Classfile API components implementations should not be exposed [v3]

2023-05-17 Thread Adam Sotona
On Tue, 16 May 2023 18:10:08 GMT, Chen Liang wrote: >> The jdk.internal.classfile.components package's interfaces have >> implementations in their nested classes, which are implicitly public and >> exported with the package. They are now moved to the impl package to avoid >> unwanted

Re: RFR: 8307990: jspawnhelper must close its writing side of a pipe before reading from it

2023-05-17 Thread Volker Simonis
On Mon, 15 May 2023 19:55:45 GMT, Bernd wrote: > Independent of the actual fix, it was mentioned that it can block listening > sockets, aren’t those close on exec? Also should a write and read timeout be > used in addition? At least to call the close descriptor code before retrying? While the

Re: RFR: 8307483: New micros for j.u.c.LockSupport [v3]

2023-05-17 Thread Claes Redestad
On Tue, 9 May 2023 19:13:42 GMT, Eric Caspole wrote: >> These micros were developed while investigating JDK-8305670 by myself and >> Sergey Kuksenko. The order of thread creation was important in that bug, so >> there are 2 JMH for creating sleepers before and after the worker threads. > >

Re: RFR: 8305785: Avoid redundant HashMap.containsKey call in java.util.regex

2023-05-17 Thread Jaikiran Pai
On Mon, 3 Apr 2023 16:58:15 GMT, Andrey Turbanov wrote: > `Pattern.namedGroups` and `Matcher.namedGroups` contains only non-null > values. It means instead of separate `containsKey`+`get` calls, we can use > single `HashMap.get` call and then compare result with null. > Result code is a bit

Re: RFR: 8307990: jspawnhelper must close its writing side of a pipe before reading from it

2023-05-17 Thread Volker Simonis
On Mon, 15 May 2023 20:00:28 GMT, Joe Darcy wrote: > Should this issue have a CSR for any behavioral changes? Well, you can certainly argue that every bug fix is a behavioral changes, right :) But seriously, I don't see how this PR could require a CSR. The only behavioral change is really

Integrated: 8307326: Package jdk.internal.classfile.java.lang.constant become obsolete

2023-05-17 Thread Adam Sotona
On Mon, 15 May 2023 08:38:54 GMT, Adam Sotona wrote: > Package `jdk.internal.classfile.java.lang.constant` containing `ModuleDesc` > and `PackageDesc` become obsolete after > [JDK-8306729](https://bugs.openjdk.org/browse/JDK-8306729). > All references to

Re: RFR: 8307990: jspawnhelper must close its writing side of a pipe before reading from it

2023-05-17 Thread Volker Simonis
On Mon, 15 May 2023 18:45:24 GMT, Roger Riggs wrote: >> Since JDK13, executing commands in a sub-process defaults to the so called >> `POSIX_SPAWN` launching mechanism (i.e. >> `-Djdk.lang.Process.launchMechanism=POSIX_SPAWN`) on Linux. This works by >> using `posix_spawn(3)` to firstly start

Re: RFR: 8307990: jspawnhelper must close its writing side of a pipe before reading from it

2023-05-17 Thread Volker Simonis
On Tue, 16 May 2023 12:32:44 GMT, Thomas Stuefe wrote: > > > > I wonder if @Martin-Buchholz is able to look at this one? > > > > My concern with changes like this is that they fix an issue but then > > > > have unexpected side-effects themselves. > > > > > > > > > Are there any specific

RFR: 8308286 Fix clang warnings in linux code

2023-05-17 Thread Artem Semenov
When using the clang compiler to build OpenJDk on Linux, we encounter various "warnings as errors". They can be fixed with small changes. - Commit messages: - 8308286 Fix clang warnings in linux code Changes: https://git.openjdk.org/jdk/pull/14033/files Webrev:

Re: RFR: 8307990: jspawnhelper must close its writing side of a pipe before reading from it [v2]

2023-05-17 Thread Volker Simonis
> Since JDK13, executing commands in a sub-process defaults to the so called > `POSIX_SPAWN` launching mechanism (i.e. > `-Djdk.lang.Process.launchMechanism=POSIX_SPAWN`) on Linux. This works by > using `posix_spawn(3)` to firstly start a tiny helper program called > `jspawnhelper` in a

RFR: 8308281: Java snippets in the FFM API need to be updated

2023-05-17 Thread Per Minborg
As the API has improved over the recent releases, not all `{@snippet ..}` sections have been kept in sync. This PR suggests all snippets used should be verified against real code that is placed in a new `snippet-files` folder and erroneous snippets are updated. - Commit messages:

Re: RFR: 8308281: Java snippets in the FFM API need to be updated

2023-05-17 Thread Maurizio Cimadamore
On Wed, 17 May 2023 11:46:39 GMT, Per Minborg wrote: > As the API has improved over the recent releases, not all `{@snippet ..}` > sections have been kept in sync. > > This PR suggests all snippets used should be verified against real code that > is placed in a new `snippet-files` folder and

Re: RFR: 8308046: Move Solaris related Japanese charsets from java.base to jdk.charsets module [v2]

2023-05-17 Thread Ichiroh Takiguchi
On Tue, 16 May 2023 17:13:02 GMT, Naoto Sato wrote: >> Ichiroh Takiguchi has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 8308046: Move Solaris related Japanese charsets from java.base to >> jdk.charsets module > > I now think it is

Re: RFR: 8308276: Change layout API to work with bytes, not bits

2023-05-17 Thread Maurizio Cimadamore
On Tue, 16 May 2023 13:53:32 GMT, Maurizio Cimadamore wrote: > As explained in [1], memory layouts and memory segments describe sizes using > different units. Memory layouts use bits, whereas memory segments use bytes. > This is historical: memory layouts were designed after the Minimal LDL

RFR: 8308276: Change layout API to work with bytes, not bits

2023-05-17 Thread Maurizio Cimadamore
As explained in [1], memory layouts and memory segments describe sizes using different units. Memory layouts use bits, whereas memory segments use bytes. This is historical: memory layouts were designed after the Minimal LDL [2], which allowed layout strings to be used to describe both memory

Re: RFR: 8308248: Revisit alignment of layout constants on 32-bit platforms [v2]

2023-05-17 Thread Maurizio Cimadamore
> The FFM API exposes layout constants for Java primitives. Among those there > are constants for `JAVA_LONG` and `JAVA_DOUBLE`. Currently, the alignment of > these layouts is set the same as their size (e.g. 8 bytes). > > This is obviously correct on 64-bit platforms, but on 32-bit platform it

Re: RFR: 7065228: To interpret case-insensitive string locale independently

2023-05-17 Thread Daniel Jeliński
On Tue, 16 May 2023 10:38:52 GMT, Darragh Clarke wrote: > Updated instances of `toLowerCase` and `toUpperCase` in several net and io > files to specify `Locale.ROOT` to ensure that case conversion issues don't > occur, > > I didn't add any new tests but ran tier 1-3 with no issues

Re: RFR: 8308246: PPC64le build broken after JDK-8304913 [v2]

2023-05-17 Thread Alan Bateman
On Wed, 17 May 2023 09:07:03 GMT, Martin Doerr wrote: > Yes, linux-ppc64 is big endian. The 2 flavors are completely incompatible. > linux-ppc64le is basically a new platform. Endianness should actually get > checked in addition to the archName. Okay, I was only asking because the

Re: RFR: 8307483: New micros for j.u.c.LockSupport [v3]

2023-05-17 Thread Aleksey Shipilev
On Tue, 9 May 2023 19:13:42 GMT, Eric Caspole wrote: >> These micros were developed while investigating JDK-8305670 by myself and >> Sergey Kuksenko. The order of thread creation was important in that bug, so >> there are 2 JMH for creating sleepers before and after the worker threads. > >

Re: RFR: 8308246: PPC64le build broken after JDK-8304913 [v2]

2023-05-17 Thread Matthias Baesken
On Wed, 17 May 2023 09:42:58 GMT, Martin Doerr wrote: >> PPC64le needs to get recognized as PPC64. Otherwise, jlink doesn't recognize >> the platform and throws a PluginException: ModuleTarget is malformed: No >> enum constant jdk.internal.util.Architecture.PPC64LE. > > Martin Doerr has

Re: JEP 442: Foreign Function & Memory API => why is it again preview API?

2023-05-17 Thread Kasper Nielsen
> In contrast the foreign memory API is very stable already since Java 19 and > the changes were minimal in 21. If you take a look at differences from Java 20 to Java 21 on Java Almanac [1] for java.lang.foreign. I wouldn't really call it minimal. Lots of classes and methods were added and

Re: RFR: 8308248: Revisit alignment of layout constants on 32-bit platforms

2023-05-17 Thread Maurizio Cimadamore
On Tue, 16 May 2023 11:18:09 GMT, Maurizio Cimadamore wrote: > The FFM API exposes layout constants for Java primitives. Among those there > are constants for `JAVA_LONG` and `JAVA_DOUBLE`. Currently, the alignment of > these layouts is set the same as their size (e.g. 8 bytes). > > This is

Re: RFR: JDK-8308239: Tighten up accessibility of nested classes in java.lang.invoke

2023-05-17 Thread Alan Bateman
On Tue, 16 May 2023 21:35:14 GMT, Joe Darcy wrote: > Tightening up accessibility of a few nested classes. There is no practical > impact on source compatibility -- source uses within the package still work, > but by default the ability to reflectively call methods on these classes is >

RFR: 8308248: Revisit alignment of layout constants on 32-bit platforms

2023-05-17 Thread Maurizio Cimadamore
The FFM API exposes layout constants for Java primitives. Among those there are constants for `JAVA_LONG` and `JAVA_DOUBLE`. Currently, the alignment of these layouts is set the same as their size (e.g. 8 bytes). This is obviously correct on 64-bit platforms, but on 32-bit platform it is not,

Re: RFR: 8308246: PPC64le build broken after JDK-8304913 [v2]

2023-05-17 Thread Martin Doerr
> PPC64le needs to get recognized as PPC64. Otherwise, jlink doesn't recognize > the platform and throws a PluginException: ModuleTarget is malformed: No enum > constant jdk.internal.util.Architecture.PPC64LE. Martin Doerr has updated the pull request incrementally with one additional commit

Re: RFR: 8132995: Matcher$ImmutableMatchResult should be optimized to reduce space usage [v2]

2023-05-17 Thread Raffaello Giulietti
On Wed, 17 May 2023 04:50:14 GMT, Stuart Marks wrote: >> src/java.base/share/classes/java/util/regex/Matcher.java line 1381: >> >>> 1379: >>> 1380: // Capture the input sequence as a string on first >>> find >>> 1381: textAsString = captureText(); >> >> Is

Re: RFR: 8132995: Matcher$ImmutableMatchResult should be optimized to reduce space usage [v2]

2023-05-17 Thread Raffaello Giulietti
On Tue, 16 May 2023 13:29:26 GMT, Claes Redestad wrote: >> Raffaello Giulietti has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Added some randomness in tests. > > src/java.base/share/classes/java/util/regex/Matcher.java line 359: > >>

Re: RFR: 8132995: Matcher$ImmutableMatchResult should be optimized to reduce space usage [v2]

2023-05-17 Thread Raffaello Giulietti
On Wed, 17 May 2023 05:24:28 GMT, Stuart Marks wrote: >> Raffaello Giulietti has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Added some randomness in tests. > > src/java.base/share/classes/java/util/regex/Matcher.java line 271: > >>

Re: RFR: 8132995: Matcher$ImmutableMatchResult should be optimized to reduce space usage [v3]

2023-05-17 Thread Raffaello Giulietti
> When appropriate and useful, copies only the relevant portion of the > `CharSequence` to the match result. Raffaello Giulietti 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.

Re: RFR: 8308246: PPC64le build broken after JDK-8304913

2023-05-17 Thread Martin Doerr
On Wed, 17 May 2023 08:48:53 GMT, Aleksey Shipilev wrote: >> PPC64le needs to get recognized as PPC64. Otherwise, jlink doesn't recognize >> the platform and throws a PluginException: ModuleTarget is malformed: No >> enum constant jdk.internal.util.Architecture.PPC64LE. > >

Re: RFR: 8308246: PPC64le build broken after JDK-8304913

2023-05-17 Thread Martin Doerr
On Wed, 17 May 2023 09:00:01 GMT, Alan Bateman wrote: >> PPC64le needs to get recognized as PPC64. Otherwise, jlink doesn't recognize >> the platform and throws a PluginException: ModuleTarget is malformed: No >> enum constant jdk.internal.util.Architecture.PPC64LE. > >

Re: JEP 442: Foreign Function & Memory API => why is it again preview API?

2023-05-17 Thread Maurizio Cimadamore
On 17/05/2023 08:28, Uwe Schindler wrote: # You changed the lifetime abstractions in Java 20 and again in 21. To me this is 2 rounds. After 19 people were not happy, so you added 20. In 20 there was some additional cleanup (in my impression it was a step back to Java 18 state just with

Re: RFR: 8308246: PPC64le build broken after JDK-8304913

2023-05-17 Thread Alan Bateman
On Wed, 17 May 2023 07:16:17 GMT, Martin Doerr wrote: > PPC64le needs to get recognized as PPC64. Otherwise, jlink doesn't recognize > the platform and throws a PluginException: ModuleTarget is malformed: No enum > constant jdk.internal.util.Architecture.PPC64LE.

Re: RFR: 8308246: PPC64le build broken after JDK-8304913

2023-05-17 Thread Aleksey Shipilev
On Wed, 17 May 2023 07:16:17 GMT, Martin Doerr wrote: > PPC64le needs to get recognized as PPC64. Otherwise, jlink doesn't recognize > the platform and throws a PluginException: ModuleTarget is malformed: No enum > constant jdk.internal.util.Architecture.PPC64LE. Looks fine, but I have a

Re: JEP 442: Foreign Function & Memory API => why is it again preview API?

2023-05-17 Thread Maurizio Cimadamore
Hi Uwe, * If there are changes again would that mean we get another preview round? --- unfortunate! This seems to be indeed the case for most of the stuff we finalize. E.g. Loom and amber feature were finalized pretty much "as is" after a round of very (very) light changes. In fact,

Re: JEP 442: Foreign Function & Memory API => why is it again preview API?

2023-05-17 Thread forax
- Original Message - > From: "Uwe Schindler" > To: "Remi Forax" > Cc: "core-libs-dev" > Sent: Wednesday, May 17, 2023 9:13:35 AM > Subject: Re: JEP 442: Foreign Function & Memory API => why is it again > preview API? > Hi Remi, > > thanks for the reponse! > >>> yesterday Apache

Re: The introduction of Sequenced collections is not a source compatible change

2023-05-17 Thread Uwe Schindler
Hi Remi, hi all, I'd like to add some information from open source projects and why I don't see the problem discussed here is a really serious one. Background: We tested Apache Lucene and Apache Solr with Java 21. The compilation with Gradle went fine. So actually there are no problems with

Re: JEP 442: Foreign Function & Memory API => why is it again preview API?

2023-05-17 Thread Uwe Schindler
Hi, Am 17.05.2023 um 00:41 schrieb Maurizio Cimadamore: On 16/05/2023 19:03, - wrote: For FFI, I would prefer some parts of the FFI, especially generic ones like Indirect Var Handles, to be promoted from the preview status. They are useful for non-FFI purposes. These parts (e.g. the

  1   2   >