Re: RFR: 8302667: Improve message format when failing to load symbols or libraries [v2]

2023-02-17 Thread Julian Waters
On Fri, 17 Feb 2023 14:08:34 GMT, Julian Waters wrote: >> DLL_ERROR4 is a macro expanding to an error message when a failure to load a >> generic item (shared libraries or an exported symbol from said libraries for >> example) occurs. "Error: loading:" is not a very pretty message, so this >>

Re: RFR: 8292914: Drop the counter from lambda class names [v6]

2023-02-17 Thread David M . Lloyd
On Fri, 17 Feb 2023 02:11:10 GMT, Mandy Chung wrote: >> David M. Lloyd has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Use a unique index for the dumped lambda class instead of a time stamp > > `this_class` in the classbyte is shown in

Re: RFR: JDK-8302666: Replace CHM with VarHandle in ForeachOrderedTask [v2]

2023-02-17 Thread ExE Boss
On Fri, 17 Feb 2023 11:39:21 GMT, Viktor Klang wrote: >> I noticed when looking at the code that there was no real need to use a CHM >> to perform the tracking of activation in an ordered fashion on >> ForEachOrderedTask, but instead a VarHandle can be used, reducing >> allocations and

Re: RFR: 8302154: Hidden classes created by LambdaMetaFactory can't be unloaded [v2]

2023-02-17 Thread Mandy Chung
On Fri, 17 Feb 2023 20:01:08 GMT, Volker Simonis wrote: > Finally, the PR fixes a regression compared to the JDK 11 behavior. This is an intended change that improves the C heap memory usage. In addition, the spec of `LambdaMetafactory` has no guarantee of the spinned classes be unloaded

Re: RFR: 8302315: Examine cost of clone of primitive arrays compared to arraycopy

2023-02-17 Thread David Schlosnagle
On Fri, 17 Feb 2023 09:58:54 GMT, Claes Redestad wrote: > During work on #12453 @schlosna reported that `array.clone()` might > underperform `System.arraycopy` in microbenchmarks and I opted to go with > `arraycopy` throughout while investigating. > > Testing on x86 (SandyBridge, AVX2) I

Re: RFR: 8302664: Fix several incorrect usages of Preconditions.checkFromIndexSize

2023-02-17 Thread Jaikiran Pai
On Thu, 16 Feb 2023 14:42:52 GMT, Jaikiran Pai wrote: > Can I please get a review of this change which fixes the usage of > `Preconditions.checkFromIndexSize`? This addresses > https://bugs.openjdk.org/browse/JDK-8302664. > > There was an oversight when these changes were introduced in >

Integrated: 8302664: Fix several incorrect usages of Preconditions.checkFromIndexSize

2023-02-17 Thread Jaikiran Pai
On Thu, 16 Feb 2023 14:42:52 GMT, Jaikiran Pai wrote: > Can I please get a review of this change which fixes the usage of > `Preconditions.checkFromIndexSize`? This addresses > https://bugs.openjdk.org/browse/JDK-8302664. > > There was an oversight when these changes were introduced in >

RFR: 8302806: (fs) Remove unused enum sun.nio.file.SensitivityWatchEventModifier

2023-02-17 Thread Brian Burkhalter
This enum is not used in the JDK and did not appear in external source code searches. - Commit messages: - 8302806: (fs) Remove unused enum sun.nio.file.SensitivityWatchEventModifier Changes: https://git.openjdk.org/jdk/pull/12626/files Webrev:

Re: RFR: 8302590: Add String.indexOf(int ch, int fromIndex, int toIndex)

2023-02-17 Thread Raffaello Giulietti
On Fri, 17 Feb 2023 21:21:30 GMT, ExE Boss wrote: >> Add an `indexOf()` variant allowing to specify both a lower and an upper >> bound on the search. > > Could we also get a similar overload for `String::lastIndexOf`? @ExE-Boss See the second half

Re: RFR: 8302154: Hidden classes created by LambdaMetaFactory can't be unloaded [v2]

2023-02-17 Thread Thomas Stuefe
On Thu, 9 Feb 2023 18:11:18 GMT, Volker Simonis wrote: >> Prior to >> [JDK-8239384](https://bugs.openjdk.org/browse/JDK-8239384)/[JDK-8238358](https://bugs.openjdk.org/browse/JDK-8238358) >> LambdaMetaFactory has created VM-anonymous classes which could easily be >> unloaded once they were

Re: RFR: JDK-8302028: Port fdlibm atan2 to Java [v2]

2023-02-17 Thread Joe Darcy
On Fri, 17 Feb 2023 21:12:25 GMT, Joe Darcy wrote: > Well spotted; corrected the code and added additional tests to catch that > case. Thanks. PS From some quick manual inspections, the other recent ports of FDLIBM methods don't look vulnerable to this kind of problem. However, as follow-up

Re: RFR: 8302154: Hidden classes created by LambdaMetaFactory can't be unloaded [v2]

2023-02-17 Thread Jorn Vernee
On Fri, 17 Feb 2023 20:01:08 GMT, Volker Simonis wrote: > (because they are all not referenced from the program any more). So, it sounds like this is testing a case where `LambdaMetafactory.metafactory` is being called directly? I'd like to point out that, while I buy that people are doing

Re: RFR: 8302590: Add String.indexOf(int ch, int fromIndex, int toIndex)

2023-02-17 Thread ExE Boss
On Thu, 16 Feb 2023 17:16:35 GMT, Raffaello Giulietti wrote: > Add an `indexOf()` variant allowing to specify both a lower and an upper > bound on the search. Could we also get a similar overload for `String::lastIndexOf`? - PR: https://git.openjdk.org/jdk/pull/12600

Re: RFR: JDK-8302028: Port fdlibm atan2 to Java [v2]

2023-02-17 Thread Joe Darcy
On Fri, 17 Feb 2023 13:50:17 GMT, Raffaello Giulietti wrote: >> Joe Darcy 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 three additional

Re: RFR: JDK-8302028: Port fdlibm atan2 to Java [v3]

2023-02-17 Thread Joe Darcy
> Working down the porting list, next stop, atan2. Joe Darcy has updated the pull request incrementally with one additional commit since the last revision: Correct and test for issue found in code review. - Changes: - all: https://git.openjdk.org/jdk/pull/12608/files - new:

Re: RFR: 8298939: Refactor open/test/jdk/javax/rmi/ssl/SSLSocketParametersTest.sh to jtreg java test [v4]

2023-02-17 Thread Matthew Donovan
On Fri, 17 Feb 2023 15:17:59 GMT, Roger Riggs wrote: >> Matthew Donovan 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 six additional >>

Re: RFR: 8298939: Refactor open/test/jdk/javax/rmi/ssl/SSLSocketParametersTest.sh to jtreg java test [v3]

2023-02-17 Thread Matthew Donovan
On Fri, 17 Feb 2023 19:57:18 GMT, Roger Riggs wrote: >> test/jdk/javax/rmi/ssl/SSLSocketParametersTest.java line 211: >> >>> 209: throw exc; >>> 210: } >>> 211: } >> >> Having exception handling in the run() method and also in this

Re: RFR: 8298939: Refactor open/test/jdk/javax/rmi/ssl/SSLSocketParametersTest.sh to jtreg java test [v3]

2023-02-17 Thread Matthew Donovan
On Fri, 17 Feb 2023 19:33:04 GMT, Stuart Marks wrote: >> Matthew Donovan has updated the pull request incrementally with one >> additional commit since the last revision: >> >> added exceptions for cases 4 and 5 > > test/jdk/javax/rmi/ssl/SSLSocketParametersTest.java line 163: > >> 161:

Re: RFR: 8298939: Refactor open/test/jdk/javax/rmi/ssl/SSLSocketParametersTest.sh to jtreg java test [v4]

2023-02-17 Thread Matthew Donovan
> Removed SSLSocketParametersTest.sh script (which just called a Java file) and > configured the java code to run directly with jtreg Matthew Donovan 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

Re: RFR: 8302154: Hidden classes created by LambdaMetaFactory can't be unloaded [v2]

2023-02-17 Thread Rémi Forax
On Thu, 9 Feb 2023 18:11:18 GMT, Volker Simonis wrote: >> Prior to >> [JDK-8239384](https://bugs.openjdk.org/browse/JDK-8239384)/[JDK-8238358](https://bugs.openjdk.org/browse/JDK-8238358) >> LambdaMetaFactory has created VM-anonymous classes which could easily be >> unloaded once they were

Re: RFR: 8298939: Refactor open/test/jdk/javax/rmi/ssl/SSLSocketParametersTest.sh to jtreg java test [v3]

2023-02-17 Thread Matthew Donovan
On Fri, 17 Feb 2023 15:27:04 GMT, Roger Riggs wrote: >> Matthew Donovan has updated the pull request incrementally with one >> additional commit since the last revision: >> >> added exceptions for cases 4 and 5 > > test/jdk/javax/rmi/ssl/SSLSocketParametersTest.java line 34: > >> 32: *

Re: RFR: 8302154: Hidden classes created by LambdaMetaFactory can't be unloaded [v2]

2023-02-17 Thread Volker Simonis
On Thu, 9 Feb 2023 18:11:18 GMT, Volker Simonis wrote: >> Prior to >> [JDK-8239384](https://bugs.openjdk.org/browse/JDK-8239384)/[JDK-8238358](https://bugs.openjdk.org/browse/JDK-8238358) >> LambdaMetaFactory has created VM-anonymous classes which could easily be >> unloaded once they were

Re: RFR: 8298939: Refactor open/test/jdk/javax/rmi/ssl/SSLSocketParametersTest.sh to jtreg java test [v3]

2023-02-17 Thread Roger Riggs
On Fri, 17 Feb 2023 19:53:10 GMT, Stuart Marks wrote: >> Matthew Donovan has updated the pull request incrementally with one >> additional commit since the last revision: >> >> added exceptions for cases 4 and 5 > > test/jdk/javax/rmi/ssl/SSLSocketParametersTest.java line 211: > >> 209:

Re: RFR: 8298939: Refactor open/test/jdk/javax/rmi/ssl/SSLSocketParametersTest.sh to jtreg java test [v3]

2023-02-17 Thread Stuart Marks
On Tue, 7 Feb 2023 20:38:40 GMT, Matthew Donovan wrote: >> Removed SSLSocketParametersTest.sh script (which just called a Java file) >> and configured the java code to run directly with jtreg > > Matthew Donovan has updated the pull request incrementally with one > additional commit since the

Re: RFR: 8298939: Refactor open/test/jdk/javax/rmi/ssl/SSLSocketParametersTest.sh to jtreg java test [v3]

2023-02-17 Thread Stuart Marks
On Tue, 7 Feb 2023 20:38:40 GMT, Matthew Donovan wrote: >> Removed SSLSocketParametersTest.sh script (which just called a Java file) >> and configured the java code to run directly with jtreg > > Matthew Donovan has updated the pull request incrementally with one > additional commit since the

Re: RFR: 8292914: Drop the counter from lambda class names [v8]

2023-02-17 Thread David M . Lloyd
> The class generated for lambda proxies is now defined as a hidden class. This > means that the counter, which was used to ensure a unique class name and > avoid clashes, is now redundant. In addition to performing redundant work, > this also impacts build reproducibility for native image

Re: RFR: 8293667: Align jlink's --compress option with jmod's --compress option [v9]

2023-02-17 Thread Ian Graves
On Fri, 17 Feb 2023 02:12:41 GMT, Mandy Chung wrote: >> Thanks. I note that there is a non-localized warning done this way elsewhere >> in jlink. May need to make a bug to localize this. > > I prefer this one should use the localized message. The other ones should be > followed up in a

Re: RFR: JDK-8302028: Port fdlibm atan2 to Java [v2]

2023-02-17 Thread Joe Darcy
On Fri, 17 Feb 2023 14:02:35 GMT, Raffaello Giulietti wrote: >> Joe Darcy 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 three additional

Re: RFR: 8298939: Refactor open/test/jdk/javax/rmi/ssl/SSLSocketParametersTest.sh to jtreg java test [v3]

2023-02-17 Thread Stuart Marks
On Tue, 7 Feb 2023 20:38:40 GMT, Matthew Donovan wrote: >> Removed SSLSocketParametersTest.sh script (which just called a Java file) >> and configured the java code to run directly with jtreg > > Matthew Donovan has updated the pull request incrementally with one > additional commit since the

Re: RFR: JDK-8302028: Port fdlibm atan2 to Java [v2]

2023-02-17 Thread Joe Darcy
On Fri, 17 Feb 2023 13:48:32 GMT, Raffaello Giulietti wrote: >> Joe Darcy 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 three additional

Re: RFR: 8292914: Drop the counter from lambda class names [v7]

2023-02-17 Thread Brian Goetz
On Fri, 17 Feb 2023 17:02:56 GMT, David M. Lloyd wrote: >> The class generated for lambda proxies is now defined as a hidden class. >> This means that the counter, which was used to ensure a unique class name >> and avoid clashes, is now redundant. In addition to performing redundant >> work,

Re: RFR: 8301627: System.exit and Runtime.exit debug logging [v6]

2023-02-17 Thread Alan Bateman
On Fri, 17 Feb 2023 17:27:50 GMT, Roger Riggs wrote: >> It can be difficult to find the cause of calls to >> `java.lang.System.exit(status)` and `Runtime.exit(status)` because the Java >> runtime exits. >> The status value and stack trace are logged using the System Logger named >>

Re: RFR: 8292914: Drop the counter from lambda class names [v7]

2023-02-17 Thread Ioi Lam
On Fri, 17 Feb 2023 17:02:56 GMT, David M. Lloyd wrote: >> The class generated for lambda proxies is now defined as a hidden class. >> This means that the counter, which was used to ensure a unique class name >> and avoid clashes, is now redundant. In addition to performing redundant >> work,

Speed up latin1 case folding

2023-02-17 Thread Eirik Bjørsnøs
Hi, The following PR suggests we can speed up Character.toUpperCase and Character.toLowerCase for latin1 code points by applying 'the oldest ASCII trick in the book': https://github.com/openjdk/jdk/pull/12623 Thanks, Eirik.

Re: RFR: 8301627: System.exit and Runtime.exit debug logging [v6]

2023-02-17 Thread Roger Riggs
> It can be difficult to find the cause of calls to > `java.lang.System.exit(status)` and `Runtime.exit(status)` because the Java > runtime exits. > The status value and stack trace are logged using the System Logger named > `java.lang.Runtime` with message level `System.Logger.Level.DEBUG`.

Re: RFR: 8294982: Implementation of Classfile API [v20]

2023-02-17 Thread Maurizio Cimadamore
On Fri, 17 Feb 2023 09:20:21 GMT, Adam Sotona wrote: >> src/java.base/share/classes/jdk/internal/classfile/impl/ClassPrinterImpl.java >> line 563: >> >>> 561: list("attributes", "attribute", >>> clm.attributes().stream().map(Attribute::attributeName))) >>> 562:

Re: RFR: 8302667: Improve message format when failing to load symbols or libraries [v2]

2023-02-17 Thread Mandy Chung
On Fri, 17 Feb 2023 14:08:34 GMT, Julian Waters wrote: >> DLL_ERROR4 is a macro expanding to an error message when a failure to load a >> generic item (shared libraries or an exported symbol from said libraries for >> example) occurs. "Error: loading:" is not a very pretty message, so this >>

Re: RFR: 8292914: Drop the counter from lambda class names [v6]

2023-02-17 Thread David M . Lloyd
On Fri, 17 Feb 2023 16:55:28 GMT, Ioi Lam wrote: > Java doesn't guarantee to use unique names even for "regular" classes. You > can use two class loaders that load two completely different classes with the > exact same name. > > How does Graal and qbicc handle this? In qbicc, we keep

Re: RFR: 8292914: Drop the counter from lambda class names [v6]

2023-02-17 Thread David M . Lloyd
On Fri, 17 Feb 2023 15:18:25 GMT, Vojin Jovanovic wrote: > We didn't use the cryptographic hash as it is not resilient to the changes > that happen to the bytecode generators of hidden classes. If anything in the > bytecode generation (e.g., in `InnerClassLambdaMetafactory`) changes, the >

Re: RFR: 8292914: Drop the counter from lambda class names [v6]

2023-02-17 Thread Ioi Lam
On Thu, 16 Feb 2023 19:35:54 GMT, David M. Lloyd wrote: >> The class generated for lambda proxies is now defined as a hidden class. >> This means that the counter, which was used to ensure a unique class name >> and avoid clashes, is now redundant. In addition to performing redundant >> work,

Re: RFR: 8292914: Drop the counter from lambda class names [v7]

2023-02-17 Thread David M . Lloyd
> The class generated for lambda proxies is now defined as a hidden class. This > means that the counter, which was used to ensure a unique class name and > avoid clashes, is now redundant. In addition to performing redundant work, > this also impacts build reproducibility for native image

Re: RFR: JDK-8302666: Replace CHM with VarHandle in ForeachOrderedTask [v2]

2023-02-17 Thread Paul Sandoz
On Fri, 17 Feb 2023 11:39:21 GMT, Viktor Klang wrote: >> I noticed when looking at the code that there was no real need to use a CHM >> to perform the tracking of activation in an ordered fashion on >> ForEachOrderedTask, but instead a VarHandle can be used, reducing >> allocations and

Re: RFR: 8301627: System.exit and Runtime.exit debug logging [v5]

2023-02-17 Thread Roger Riggs
On Fri, 17 Feb 2023 07:48:41 GMT, Alan Bateman wrote: >> Roger Riggs has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Improve implNote for Runtime.exit() with review suggestions. > > src/java.base/share/classes/java/lang/Runtime.java

Re: RFR: 8298939: Refactor open/test/jdk/javax/rmi/ssl/SSLSocketParametersTest.sh to jtreg java test [v3]

2023-02-17 Thread Roger Riggs
On Tue, 7 Feb 2023 20:38:40 GMT, Matthew Donovan wrote: >> Removed SSLSocketParametersTest.sh script (which just called a Java file) >> and configured the java code to run directly with jtreg > > Matthew Donovan has updated the pull request incrementally with one > additional commit since the

Re: RFR: 8302204: Optimize BigDecimal.divide

2023-02-17 Thread Raffaello Giulietti
On Fri, 17 Feb 2023 08:58:13 GMT, Xiaowei Lu wrote: > > After making sure that `intVal` is even, and before attempting a division > > by a power of 10, it might help to check if 5 divides `intVal` in the first > > place. If it doesn't, there no point in performing the division. > > It can be

Re: RFR: 8292914: Drop the counter from lambda class names [v6]

2023-02-17 Thread Vojin Jovanovic
On Thu, 16 Feb 2023 19:35:54 GMT, David M. Lloyd wrote: >> The class generated for lambda proxies is now defined as a hidden class. >> This means that the counter, which was used to ensure a unique class name >> and avoid clashes, is now redundant. In addition to performing redundant >> work,

Integrated: 8302226 failure_handler native.core should wait for coredump to finish

2023-02-17 Thread Ludvig Janiuk
On Fri, 10 Feb 2023 18:19:01 GMT, Ludvig Janiuk wrote: > Update open/test/failure_handler/src/share/conf/(linux,mac).properties to > handle core dumps more correctly. This pull request has now been integrated. Changeset: 6120319a Author:Ludvig Janiuk Committer: Erik Joelsson URL:

Re: RFR: JDK-8302028: Port fdlibm atan2 to Java [v2]

2023-02-17 Thread Raffaello Giulietti
On Fri, 17 Feb 2023 04:18:30 GMT, Joe Darcy wrote: >> Working down the porting list, next stop, atan2. > > Joe Darcy 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

Re: RFR: 8302226 failure_handler native.core should wait for coredump to finish [v2]

2023-02-17 Thread Erik Joelsson
On Mon, 13 Feb 2023 10:21:05 GMT, Ludvig Janiuk wrote: >> Update open/test/failure_handler/src/share/conf/(linux,mac).properties to >> handle core dumps more correctly. > > Ludvig Janiuk has updated the pull request incrementally with one additional > commit since the last revision: > > add

Re: RFR: 8302667: Improve message format when failing to load symbols or libraries [v2]

2023-02-17 Thread Julian Waters
> DLL_ERROR4 is a macro expanding to an error message when a failure to load a > generic item (shared libraries or an exported symbol from said libraries for > example) occurs. "Error: loading:" is not a very pretty message, so this > small change results in "Error: Failed to load %s" instead,

Re: RFR: 8292914: Drop the counter from lambda class names [v6]

2023-02-17 Thread David M . Lloyd
On Thu, 16 Feb 2023 19:35:54 GMT, David M. Lloyd wrote: >> The class generated for lambda proxies is now defined as a hidden class. >> This means that the counter, which was used to ensure a unique class name >> and avoid clashes, is now redundant. In addition to performing redundant >> work,

Integrated: 8302158: PPC: test/jdk/jdk/internal/vm/Continuation/Fuzz.java: AssertionError: res: false shouldPin: false

2023-02-17 Thread Richard Reingruber
On Tue, 14 Feb 2023 14:10:08 GMT, Richard Reingruber wrote: > This fixes the linked issue by trimming the caller of a frame to be > deoptimized back to its `unextended_sp` iff it is compiled. The creation of > the section `dead after deoptimization` shown in the attachment >

Re: RFR: 8302664: Fix several incorrect usages of Preconditions.checkFromIndexSize

2023-02-17 Thread Alan Bateman
On Thu, 16 Feb 2023 14:42:52 GMT, Jaikiran Pai wrote: > Can I please get a review of this change which fixes the usage of > `Preconditions.checkFromIndexSize`? This addresses > https://bugs.openjdk.org/browse/JDK-8302664. > > There was an oversight when these changes were introduced in >

Re: RFR: 8294982: Implementation of Classfile API [v15]

2023-02-17 Thread Adam Sotona
On Thu, 9 Feb 2023 14:07:32 GMT, Maurizio Cimadamore wrote: >> Adam Sotona has updated the pull request incrementally with one additional >> commit since the last revision: >> >> AttributeElement.Kind removal (#48) > >

Re: RFR: 8294982: Implementation of Classfile API [v23]

2023-02-17 Thread Adam Sotona
> This is root pull request with Classfile API implementation, tests and > benchmarks initial drop into JDK. > > Following pull requests consolidating JDK class files parsing, generating, > and transforming ([JDK-8294957](https://bugs.openjdk.org/browse/JDK-8294957)) > will chain to this one.

Re: RFR: 8302158: PPC: test/jdk/jdk/internal/vm/Continuation/Fuzz.java: AssertionError: res: false shouldPin: false [v2]

2023-02-17 Thread Richard Reingruber
On Wed, 15 Feb 2023 20:30:00 GMT, Richard Reingruber wrote: >> This fixes the linked issue by trimming the caller of a frame to be >> deoptimized back to its `unextended_sp` iff it is compiled. The creation of >> the section `dead after deoptimization` shown in the attachment >>

Re: RFR: 8302664: Fix several incorrect usages of Preconditions.checkFromIndexSize

2023-02-17 Thread Daniel Fuchs
On Thu, 16 Feb 2023 14:42:52 GMT, Jaikiran Pai wrote: > Can I please get a review of this change which fixes the usage of > `Preconditions.checkFromIndexSize`? This addresses > https://bugs.openjdk.org/browse/JDK-8302664. > > There was an oversight when these changes were introduced in >

Re: RFR: 8298939: Refactor open/test/jdk/javax/rmi/ssl/SSLSocketParametersTest.sh to jtreg java test [v3]

2023-02-17 Thread Daniel Fuchs
On Tue, 7 Feb 2023 20:38:40 GMT, Matthew Donovan wrote: >> Removed SSLSocketParametersTest.sh script (which just called a Java file) >> and configured the java code to run directly with jtreg > > Matthew Donovan has updated the pull request incrementally with one > additional commit since the

Re: RFR: 8302664: Fix several incorrect usages of Preconditions.checkFromIndexSize

2023-02-17 Thread Daniel Jeliński
On Thu, 16 Feb 2023 14:42:52 GMT, Jaikiran Pai wrote: > Can I please get a review of this change which fixes the usage of > `Preconditions.checkFromIndexSize`? This addresses > https://bugs.openjdk.org/browse/JDK-8302664. > > There was an oversight when these changes were introduced in >

RFR: 8302664: Fix several incorrect usages of Preconditions.checkFromIndexSize

2023-02-17 Thread Jaikiran Pai
Can I please get a review of this change which fixes the usage of `Preconditions.checkFromIndexSize`? This addresses https://bugs.openjdk.org/browse/JDK-8302664. There was an oversight when these changes were introduced in https://github.com/openjdk/jdk/pull/4507. I have now gone through that

Re: RFR: 8294982: Implementation of Classfile API [v15]

2023-02-17 Thread Adam Sotona
On Thu, 16 Feb 2023 10:48:49 GMT, Adam Sotona wrote: >> The main difference is that if the given entry is not directly applicable >> (when it comes from 3rd constant pool or when the pool is not shared during >> transformation) - a new or matching entry to the target pool is returned. >> This

Re: RFR: 8294982: Implementation of Classfile API [v22]

2023-02-17 Thread Adam Sotona
> This is root pull request with Classfile API implementation, tests and > benchmarks initial drop into JDK. > > Following pull requests consolidating JDK class files parsing, generating, > and transforming ([JDK-8294957](https://bugs.openjdk.org/browse/JDK-8294957)) > will chain to this one.

Re: RFR: JDK-8302666: Replace CHM with VarHandle in ForeachOrderedTask [v2]

2023-02-17 Thread Viktor Klang
On Thu, 16 Feb 2023 22:01:01 GMT, Paul Sandoz wrote: >> @PaulSandoz I'm usually a bit weary of piggybacking if it is not done on the >> same object, as future reorderings of the code might break that assumption. >> I wouldn't want to break anything silently so I made a rather conservative >>

Re: RFR: JDK-8302666: Replace CHM with VarHandle in ForeachOrderedTask [v2]

2023-02-17 Thread Viktor Klang
> I noticed when looking at the code that there was no real need to use a CHM > to perform the tracking of activation in an ordered fashion on > ForEachOrderedTask, but instead a VarHandle can be used, reducing allocations > and indirection. Viktor Klang has updated the pull request

Re: RFR: 8292914: Drop the counter from lambda class names [v6]

2023-02-17 Thread Vojin Jovanovic
On Thu, 16 Feb 2023 19:35:54 GMT, David M. Lloyd wrote: >> The class generated for lambda proxies is now defined as a hidden class. >> This means that the counter, which was used to ensure a unique class name >> and avoid clashes, is now redundant. In addition to performing redundant >> work,

RFR: 8297587: Upgrade JLine to 3.22.0

2023-02-17 Thread Jan Lahoda
This is a proposal to upgrade the JLine inside JDK to 3.22.0. It was done by: -for shared/classes, taking a diff between JLine 3.20.0 and the existing JDK version, copying the JLine 3.22.0 into the JDK, repackaing, re-appling the patch (including trailing space removal, UTF-8 characters

Re: RFR: 8302315: Examine cost of clone of primitive arrays compared to arraycopy

2023-02-17 Thread Claes Redestad
On Fri, 17 Feb 2023 09:58:54 GMT, Claes Redestad wrote: > During work on #12453 @schlosna reported that `array.clone()` might > underperform `System.arraycopy` in microbenchmarks and I opted to go with > `arraycopy` throughout while investigating. > > Testing on x86 (SandyBridge, AVX2) I

RFR: 8302315: Examine cost of clone of primitive arrays compared to arraycopy

2023-02-17 Thread Claes Redestad
During work on #12453 @schlosna reported that `array.clone()` might underperform `System.arraycopy` in microbenchmarks and I opted to go with `arraycopy` throughout while investigating. Testing on x86 (SandyBridge, AVX2) I observe no difference at all between the setups. On aarch the only

Re: RFR: 8294982: Implementation of Classfile API [v20]

2023-02-17 Thread Adam Sotona
On Thu, 16 Feb 2023 12:11:06 GMT, Jens Lidestrom wrote: >> Adam Sotona has updated the pull request incrementally with one additional >> commit since the last revision: >> >> added 4-byte Unicode text to Utf8EntryTest > >

Re: RFR: 8294982: Implementation of Classfile API [v20]

2023-02-17 Thread Adam Sotona
On Thu, 16 Feb 2023 14:24:21 GMT, Maurizio Cimadamore wrote: >> Adam Sotona has updated the pull request incrementally with one additional >> commit since the last revision: >> >> added 4-byte Unicode text to Utf8EntryTest > >

Re: RFR: 8294982: Implementation of Classfile API [v20]

2023-02-17 Thread Adam Sotona
On Thu, 16 Feb 2023 11:00:48 GMT, Maurizio Cimadamore wrote: >> Adam Sotona has updated the pull request incrementally with one additional >> commit since the last revision: >> >> added 4-byte Unicode text to Utf8EntryTest > >

Re: RFR: 8294982: Implementation of Classfile API [v20]

2023-02-17 Thread Adam Sotona
On Thu, 16 Feb 2023 10:56:57 GMT, Maurizio Cimadamore wrote: >> Adam Sotona has updated the pull request incrementally with one additional >> commit since the last revision: >> >> added 4-byte Unicode text to Utf8EntryTest > >

Re: RFR: 8294982: Implementation of Classfile API [v21]

2023-02-17 Thread Adam Sotona
> This is root pull request with Classfile API implementation, tests and > benchmarks initial drop into JDK. > > Following pull requests consolidating JDK class files parsing, generating, > and transforming ([JDK-8294957](https://bugs.openjdk.org/browse/JDK-8294957)) > will chain to this one.

Re: RFR: 8299748: java/util/zip/Deinflate.java failing on s390x

2023-02-17 Thread Alan Bateman
On Thu, 16 Feb 2023 05:32:26 GMT, Amit Kumar wrote: > As you can see, the size of out1 is insufficient for the s390x. That's why I > proposed the fix to increase the buffer size. Because the compressor is not > deterministic, I don't want to be byte-perfect, so I changed the multiplier > to

Re: RFR: 8302204: Optimize BigDecimal.divide

2023-02-17 Thread Xiaowei Lu
On Fri, 17 Feb 2023 04:42:50 GMT, Xiaowei Lu wrote: > After making sure that `intVal` is even, and before attempting a division by > a power of 10, it might help to check if 5 divides `intVal` in the first > place. If it doesn't, there no point in performing the division. > > It can be shown