Re: RFR: 8300917: Regression 2x and bimodal startup on Mac aarch64 in b27

2023-01-31 Thread Per Minborg
On Wed, 1 Feb 2023 07:21:10 GMT, Viktor Klang wrote: >> This PR proposed to reduce contention in synchronized methods mainly by >> doing I/O operations outside synch blocks. > > src/java.base/share/classes/java/lang/Module.java line 281: > >> 279: >> 280: private static boolean isNativeAcc

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

2023-01-31 Thread Alan Bateman
On Tue, 31 Jan 2023 09:00:18 GMT, Alan Bateman wrote: >> Hi @jaikiran , >> On my system OS's zlib is being used. and here is stack-trace. >> >> --System.out:(2/78)-- >> level:-1, strategy: 0, dowrap: false >> m=525312, n=498060, len=524288, eq=false >> --System.err:(11/58

Re: RFR: 8300917: Regression 2x and bimodal startup on Mac aarch64 in b27

2023-01-31 Thread Viktor Klang
On Wed, 25 Jan 2023 12:26:26 GMT, Per Minborg wrote: > This PR proposed to reduce contention in synchronized methods mainly by doing > I/O operations outside synch blocks. src/java.base/share/classes/java/lang/Module.java line 281: > 279: > 280: private static boolean isNativeAccessEnable

Re: RFR: 8301569: list mode of jmod and jimage cannot be used normally in turkish locale

2023-01-31 Thread Alan Bateman
On Sun, 29 Jan 2023 15:37:28 GMT, Glavo wrote: > When the default Locale is `tr`, the jmod and jimage commands have the > following problems: > > * The jmod command does not correctly recognize the `list` mode typed in > lowercase; > * The jimage command cannot obtain the help information of t

Re: RFR: 8301492: Modernize equals() method of ResourceBundle.CacheKey and Bundles.CacheKey [v2]

2023-01-31 Thread Sergey Tsypanov
> `ResourceBundle.CacheKey.equals()` and `Bundles.CacheKey.equals()` are quire > outdated. This simple clean-up modernizes them. Sergey Tsypanov has updated the pull request incrementally with one additional commit since the last revision: Fix logic - Changes: - all: https://g

Re: RFR: JDK-8301392: Port fdlibm log1p to Java [v3]

2023-01-31 Thread Joe Darcy
> Another day, another PR to port FDLBIM to Java, this time for the log1p > method. > > Other than using the two-argument form of the __HI method in Java > transliteration version rather than C macro, there are no appreciable > differences between the original C source in > > src/java.base/sh

Re: RFR: 8301552: Use AtomicReferenceArray for caching instead of CHM in ZoneOffset

2023-01-31 Thread Viktor Klang
On Tue, 31 Jan 2023 16:02:07 GMT, Per Minborg wrote: >> `ZoneOffset` instances are cached by the `ZoneOffset` class itself for >> values in the range [-18h, 18h] for each second that is on an even quarter >> of an hour (i.e. at most 2*18*4+1 = 145 values). >> >> Instead of using a `Concurrent

Re: RFR: 8300917: Regression 2x and bimodal startup on Mac aarch64 in b27

2023-01-31 Thread Alan Bateman
On Wed, 1 Feb 2023 06:17:37 GMT, David Holmes wrote: > I can't quite see the effect of the change here. @minborg Have you used the wrong JBS issue by any chance? There is no information in the JBS issue, or here, that the proposed change fixes the reported startup regression after the JEP 434

Re: RFR: 8300917: Regression 2x and bimodal startup on Mac aarch64 in b27

2023-01-31 Thread David Holmes
On Wed, 25 Jan 2023 12:26:26 GMT, Per Minborg wrote: > This PR proposed to reduce contention in synchronized methods mainly by doing > I/O operations outside synch blocks. I can't quite see the effect of the change here. You went from a synchronized instance method, to a non-synchronized stati

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

2023-01-31 Thread Amit Kumar
On Tue, 31 Jan 2023 09:00:18 GMT, Alan Bateman wrote: >> Hi @jaikiran , >> On my system OS's zlib is being used. and here is stack-trace. >> >> --System.out:(2/78)-- >> level:-1, strategy: 0, dowrap: false >> m=525312, n=498060, len=524288, eq=false >> --System.err:(11/58

Re: RFR: 8301569: list mode of jmod and jimage cannot be used normally in turkish locale

2023-01-31 Thread Glavo
On Sun, 29 Jan 2023 15:37:28 GMT, Glavo wrote: > When the default Locale is `tr`, the jmod and jimage commands have the > following problems: > > * The jmod command does not correctly recognize the `list` mode typed in > lowercase; > * The jimage command cannot obtain the help information of t

RFR: 8301569: list mode of jmod and jimage cannot be used normally in turkish locale

2023-01-31 Thread Glavo
When the default Locale is `tr`, the jmod and jimage commands have the following problems: * The jmod command does not correctly recognize the `list` mode typed in lowercase; * The jimage command cannot obtain the help information of the `list` mode. - Commit messages: - list mode

Re: RFR: 8301043: Super-interface for PrintStream and PrintWriter [v2]

2023-01-31 Thread Tingjun Yuan
On Tue, 31 Jan 2023 18:28:59 GMT, Alan Bateman wrote: > A PR may be a bit premature as this probably needs discussion first on > whether this is worth doing. Yes, there are common methods between the two > but at the same time, the byte and character hierarchies have always been > distinct. Ha

Re: RFR: JDK-8299994: java/security/Policy/Root/Root.java fails when home directory is read-only [v3]

2023-01-31 Thread Bill Huang
> Root.java is changed to a manual test because it requires test to be run with > the root user privilege, and it requires to modify the user policy file in > the home director. Bill Huang has updated the pull request incrementally with one additional commit since the last revision: Check ro

Re: ZIP entry copy without recompression

2023-01-31 Thread Lance Andersen
I have not add a chance to look or think about this yet but wanted to know I will On Jan 19, 2023, at 2:03 PM, Eirik Bjørsnøs mailto:eir...@gmail.com>> wrote: Hi, A common use case for java.util.zip in build tools involves copying entries from a ZipFile or ZipInputStream to a ZipOutputStream w

Re: module opens directive and Lookup::defineClass

2023-01-31 Thread Kasper Nielsen
On Tue, 31 Jan 2023 at 21:21, wrote: > > There is no conflict with JLS 7.2.2 as I can see. Thanks for getting back to me. Maybe there isn't a direct conflict. But I still think this is not very intuitive. If I have an application with two packages: com.acme.foreveryone com.acme.secret

Re: RFR: JDK-8299994: java/security/Policy/Root/Root.java fails when home directory is read-only [v2]

2023-01-31 Thread Bill Huang
> Root.java is changed to a manual test because it requires test to be run with > the root user privilege, and it requires to modify the user policy file in > the home director. Bill Huang has updated the pull request incrementally with one additional commit since the last revision: Implemen

Re: RFR: JDK-8299994: java/security/Policy/Root/Root.java fails when home directory is read-only

2023-01-31 Thread Rajan Halade
On Tue, 31 Jan 2023 22:35:21 GMT, Bill Huang wrote: > Root.java is changed to a manual test because it requires test to be run with > the root user privilege, and it requires to modify the user policy file in > the home director. test/jdk/java/security/Policy/Root/Root.java line 34: > 32: >

RFR: JDK-8299994: java/security/Policy/Root/Root.java fails when home directory is read-only

2023-01-31 Thread Bill Huang
Root.java is changed to a manual test because it requires test to be run with the root user privilege, and it requires to modify the user policy file in the home director. - Commit messages: - JDK-824 java/security/Policy/Root/Root.java fails when home directory is read-only

Withdrawn: 8291917: Windows - Improve error messages when the C Runtime Libraries or jvm.dll cannot be loaded

2023-01-31 Thread duke
On Thu, 4 Aug 2022 16:26:19 GMT, Julian Waters wrote: > Please review a small patch for dumping the failure reason when the MSVCRT > libraries or the Java Virtual Machine fails to load on Windows, which can > provide invaluable insight when debugging related launcher issues. > > See https://bu

Re: RFR: 8300869: Make use of the Double.toString(double) algorithm in java.util.Formatter [v7]

2023-01-31 Thread Joe Darcy
On Tue, 31 Jan 2023 18:30:14 GMT, Raffaello Giulietti wrote: >> Align `double` and `float` decimal conversions in `java.util.Formatter` with >> the algorithm used in `Double.toString(double)`. > > Raffaello Giulietti has updated the pull request incrementally with one > additional commit since

Integrated: JDK-8300909: Update com/sun/jndi/dns/Test6991580.java manual test instruction

2023-01-31 Thread Bill Huang
On Tue, 31 Jan 2023 19:08:08 GMT, Bill Huang wrote: > Test failed for exception in thread "main" java.lang.IllegalAccessError: > class IPv6NameserverPlatformParsingTest (in unnamed module @0x72a8ab1a) > cannot access class com.sun.jndi.dns.DnsContextFactory (in module > jdk.naming.dns) because

Re: NPE throwing behavior of immutable collections

2023-01-31 Thread Remi Forax
> From: "Glavo" > To: "Stuart Marks" > Cc: "John Hendrikx" , "core-libs-dev" > > Sent: Tuesday, January 31, 2023 10:12:24 PM > Subject: Re: NPE throwing behavior of immutable collections > I understand that null is prohibited by default, but can we also provide a set > of factory methods that a

Re: module opens directive and Lookup::defineClass

2023-01-31 Thread mandy . chung
There is no conflict with JLS 7.2.2 as I can see. Opens `some.package` to `some.other.module` means just one package.  It's true that the open packages can be extended at runtime. For example, `some.other.module` can update this module to open the package to another module at runtime via `Modu

Re: NPE throwing behavior of immutable collections

2023-01-31 Thread Glavo
I understand that null is prohibited by default, but can we also provide a set of factory methods that accept null? They can be named like List.ofNullable/copyOfNullable. On Tue, Jan 31, 2023 at 10:13 AM Stuart Marks wrote: > In this reply I'll focus on the null handling issues in collections. >

Re: RFR: JDK-8300909: Update com/sun/jndi/dns/Test6991580.java manual test instruction [v2]

2023-01-31 Thread Alan Bateman
On Tue, 31 Jan 2023 19:38:22 GMT, Bill Huang wrote: >> Test failed for exception in thread "main" java.lang.IllegalAccessError: >> class IPv6NameserverPlatformParsingTest (in unnamed module @0x72a8ab1a) >> cannot access class com.sun.jndi.dns.DnsContextFactory (in module >> jdk.naming.dns) bec

Re: RFR: JDK-8300909: Update com/sun/jndi/dns/Test6991580.java manual test instruction [v2]

2023-01-31 Thread Bill Huang
> Test failed for exception in thread "main" java.lang.IllegalAccessError: > class IPv6NameserverPlatformParsingTest (in unnamed module @0x72a8ab1a) > cannot access class com.sun.jndi.dns.DnsContextFactory (in module > jdk.naming.dns) because module jdk.naming.dns does not export > com.sun.jndi

Re: RFR: JDK-8300909: Update com/sun/jndi/dns/Test6991580.java manual test instruction

2023-01-31 Thread Bill Huang
On Tue, 31 Jan 2023 19:25:55 GMT, Alan Bateman wrote: >> Test failed for exception in thread "main" java.lang.IllegalAccessError: >> class IPv6NameserverPlatformParsingTest (in unnamed module @0x72a8ab1a) >> cannot access class com.sun.jndi.dns.DnsContextFactory (in module >> jdk.naming.dns) b

Re: RFR: JDK-8300909: Update com/sun/jndi/dns/Test6991580.java manual test instruction

2023-01-31 Thread Alan Bateman
On Tue, 31 Jan 2023 19:08:08 GMT, Bill Huang wrote: > Test failed for exception in thread "main" java.lang.IllegalAccessError: > class IPv6NameserverPlatformParsingTest (in unnamed module @0x72a8ab1a) > cannot access class com.sun.jndi.dns.DnsContextFactory (in module > jdk.naming.dns) because

RFR: JDK-8300909: Update com/sun/jndi/dns/Test6991580.java manual test instruction

2023-01-31 Thread Bill Huang
Test failed for exception in thread "main" java.lang.IllegalAccessError: class IPv6NameserverPlatformParsingTest (in unnamed module @0x72a8ab1a) cannot access class com.sun.jndi.dns.DnsContextFactory (in module jdk.naming.dns) because module jdk.naming.dns does not export com.sun.jndi.dns to unn

Re: RFR: JDK-8301392: Port fdlibm log1p to Java [v2]

2023-01-31 Thread Joe Darcy
On Tue, 31 Jan 2023 06:49:28 GMT, Andrey Turbanov wrote: >> Joe Darcy has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Implement review feedback. > > src/java.base/share/classes/java/lang/FdLibm.java line 911: > >> 909: k = 1

Re: RFR: JDK-8301392: Port fdlibm log1p to Java [v2]

2023-01-31 Thread Joe Darcy
> Another day, another PR to port FDLBIM to Java, this time for the log1p > method. > > Other than using the two-argument form of the __HI method in Java > transliteration version rather than C macro, there are no appreciable > differences between the original C source in > > src/java.base/sh

Re: RFR: 8301043: Super-interface for PrintStream and PrintWriter [v2]

2023-01-31 Thread Alan Bateman
On Sun, 29 Jan 2023 07:11:26 GMT, Tingjun Yuan wrote: >> Add `java.io.PrintOutput` to represent print operations, and modify >> `java.io.PrintStream` and `java.io.PrintWriter` to implement it. > > Tingjun Yuan has updated the pull request incrementally with one additional > commit since the las

Re: RFR: 8300869: Make use of the Double.toString(double) algorithm in java.util.Formatter [v4]

2023-01-31 Thread Raffaello Giulietti
On Tue, 31 Jan 2023 18:12:45 GMT, Brian Burkhalter wrote: >> In this specific `*.java.template` case, I think that the bug id in the >> comment somehow replaces the lack of the @bug line. >> But I have no problems in removing it if there are stronger opinions. > > The `@bug` tag is in `BasicTest

Re: RFR: 8300869: Make use of the Double.toString(double) algorithm in java.util.Formatter [v7]

2023-01-31 Thread Raffaello Giulietti
> Align `double` and `float` decimal conversions in `java.util.Formatter` with > the algorithm used in `Double.toString(double)`. Raffaello Giulietti has updated the pull request incrementally with one additional commit since the last revision: 8300869: Make use of the Double.toString(double)

Re: RFR: 8300917: Regression 2x and bimodal startup on Mac aarch64 in b27

2023-01-31 Thread Alan Bateman
On Wed, 25 Jan 2023 12:26:26 GMT, Per Minborg wrote: > This PR proposed to reduce contention in synchronized methods mainly by doing > I/O operations outside synch blocks. BTW: Is this PR meant by openjdk/jdk20 or openjdk/jdk? - PR: https://git.openjdk.org/jdk/pull/12193

Re: RFR: 8300869: Make use of the Double.toString(double) algorithm in java.util.Formatter [v4]

2023-01-31 Thread Brian Burkhalter
On Mon, 30 Jan 2023 20:10:17 GMT, Raffaello Giulietti wrote: >> I see; it might suffice in this case to rely on the bug information in the >> SCM history, but I don't have a strong opinion. > > In this specific `*.java.template` case, I think that the bug id in the > comment somehow replaces t

Re: RFR: 8300917: Regression 2x and bimodal startup on Mac aarch64 in b27

2023-01-31 Thread Alan Bateman
On Wed, 25 Jan 2023 12:26:26 GMT, Per Minborg wrote: > This PR proposed to reduce contention in synchronized methods mainly by doing > I/O operations outside synch blocks. src/java.base/share/classes/java/lang/Module.java line 318: > 316: } > 317: > 318: private static boolean casEnab

Re: RFR: JDK-8301392: Port fdlibm log1p to Java

2023-01-31 Thread Joe Darcy
On Tue, 31 Jan 2023 06:45:27 GMT, Andrey Turbanov wrote: >> Another day, another PR to port FDLBIM to Java, this time for the log1p >> method. >> >> Other than using the two-argument form of the __HI method in Java >> transliteration version rather than C macro, there are no appreciable >> di

Re: RFR: 8300917: Regression 2x and bimodal startup on Mac aarch64 in b27

2023-01-31 Thread Per Minborg
On Wed, 25 Jan 2023 12:26:26 GMT, Per Minborg wrote: > This PR proposed to reduce contention in synchronized methods mainly by doing > I/O operations outside synch blocks. The potential performance improvement in determining if native access is enabled is a small part of the overall benchmarks

RFR: 8300917: Regression 2x and bimodal startup on Mac aarch64 in b27

2023-01-31 Thread Per Minborg
This PR proposed to reduce contention in synchronized methods mainly by doing I/O operations outside synch blocks. - Commit messages: - Reduce contention Changes: https://git.openjdk.org/jdk/pull/12193/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=12193&range=00 Issue:

Re: RFR: 8301492: Modernize equals() method of ResourceBundle.CacheKey and Bundles.CacheKey

2023-01-31 Thread Mandy Chung
On Tue, 31 Jan 2023 11:40:43 GMT, Sergey Tsypanov wrote: > `ResourceBundle.CacheKey.equals()` and `Bundles.CacheKey.equals()` are quire > outdated. This simple clean-up modernizes them. return moduleRef.refersTo(otherEntry.getModule()) && callerRef.refersTo(otherEntry.getCallerModule())

Re: NPE throwing behavior of immutable collections

2023-01-31 Thread Tagir Valeev
Hello! I agree that collection factories should not throw on contains(null). This issue actually reduces their adoption. Imagine that I always returned from some method Collections.unmodifiableSet(new HashSet<>(Arrays.asList(non, null, values))); It's a verbose construct that creates inefficient d

Re: RFR: 8301306: java/net/httpclient/* fail with -Xcomp: java.io.IOException: HTTP/1.1 header parser received no bytes

2023-01-31 Thread Vladimir Kozlov
On Tue, 31 Jan 2023 07:17:59 GMT, Alan Bateman wrote: > There was some discussion about these test failures in the JBS issue and I > think @sunny868 has accepted that they need to be investigated to see if they > are test reliability issues or something else. As always, running tests with > -X

RFR: 8301367: Add exception handler method to the BaseLdapServer

2023-01-31 Thread Aleksei Efimov
The proposed change adds a new exception handler method to the `test/jdk/com/sun/jndi/ldap/lib/BaseLdapServer.java` LDAP test library class. It will allow LDAP tests to customize the handling of server-side exceptions. The current `BaseLdapTestServer` implementation prints an exception and its

Re: RFR: 8301552: Use AtomicReferenceArray for caching instead of CHM in ZoneOffset

2023-01-31 Thread Per Minborg
On Tue, 31 Jan 2023 15:57:43 GMT, Per Minborg wrote: > `ZoneOffset` instances are cached by the `ZoneOffset` class itself for values > in the range [-18h, 18h] for each second that is on an even quarter of an > hour (i.e. at most 2*18*4+1 = 145 values). > > Instead of using a `ConcurrentHashM

RFR: 8301552: Use AtomicReferenceArray for caching instead of CHM in ZoneOffset

2023-01-31 Thread Per Minborg
`ZoneOffset` instances are cached by the `ZoneOffset` class itself for values in the range [-18h, 18h] for each second that is on an even quarter of an hour (i.e. at most 2*18*4+1 = 145 values). Instead of using a `ConcurrentHashMap` for caching instanced, we could instead use an `AtomicRefere

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

2023-01-31 Thread Doug Simon
On Tue, 6 Dec 2022 21:14:07 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 71 commits: > > - Merge from JDK mainline > - Add comment > - Merge https://github.

Re: RFR: 8205592: BigDecimal.doubleValue() is depressingly slow

2023-01-31 Thread Raffaello Giulietti
On Thu, 7 Jul 2022 15:20:32 GMT, Raffaello Giulietti wrote: > A reimplementation of `BigDecimal.[double|float]Value()` to enhance > performance, avoiding an intermediate string and its subsequent parsing on > the slow path. This PR is waiting for a review - PR: https://git.openj

Re: RFR: 8300869: Make use of the Double.toString(double) algorithm in java.util.Formatter [v6]

2023-01-31 Thread Raffaello Giulietti
> Align `double` and `float` decimal conversions in `java.util.Formatter` with > the algorithm used in `Double.toString(double)`. Raffaello Giulietti has updated the pull request incrementally with one additional commit since the last revision: 8300869: Make use of the Double.toString(double)

Re: RFR: 8301492: Modernize equals() method of ResourceBundle.CacheKey and Bundles.CacheKey

2023-01-31 Thread Sergey Tsypanov
On Tue, 31 Jan 2023 11:40:43 GMT, Sergey Tsypanov wrote: > `ResourceBundle.CacheKey.equals()` and `Bundles.CacheKey.equals()` are quire > outdated. This simple clean-up modernizes them. Btw, in `ResourceBundle.CacheKey.equals()` can we replace Module module = getModule(); Module caller = getCa

RFR: 8301492: Modernize equals() method of ResourceBundle.CacheKey and Bundles.CacheKey

2023-01-31 Thread Sergey Tsypanov
`ResourceBundle.CacheKey.equals()` and `Bundles.CacheKey.equals()` are quire outdated. This simple clean-up modernizes them. - Commit messages: - Copyright year update - Modernize Bubldes.equals() Changes: https://git.openjdk.org/jdk/pull/12328/files Webrev: https://webrevs.openj

RFR: JDK-8300098 : java/util/concurrent/ConcurrentHashMap/ConcurrentAssociateTest.java fails with internal timeout when executed with TieredCompilation1/3

2023-01-31 Thread Viktor Klang
The proposed fix by @DougLea ensures that the state transition into waiting is retried in the cases where a previous waiter isn't making progress and a new waiter goes into waiting. - Commit messages: - JDK-8300098 : java/util/concurrent/ConcurrentHashMap/ConcurrentAssociateTest.j

Re: RFR: JDK-8301392: Port fdlibm log1p to Java

2023-01-31 Thread Raffaello Giulietti
On Tue, 31 Jan 2023 02:52:45 GMT, Joe Darcy wrote: > Another day, another PR to port FDLBIM to Java, this time for the log1p > method. > > Other than using the two-argument form of the __HI method in Java > transliteration version rather than C macro, there are no appreciable > differences be

Re: RFR: 8240567: MethodTooLargeException thrown while creating a jlink image [v14]

2023-01-31 Thread Alan Bateman
On Thu, 26 Jan 2023 19:30:50 GMT, Christoph wrote: > We readded the splitting code and the test is passing. In the test we could > make it work with up to 130 modules where each module _n_ requires all > modules from _0...n_ The patch looks similar to the original. As a quick test, I changed t

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

2023-01-31 Thread Alan Bateman
On Mon, 30 Jan 2023 08:38:15 GMT, Amit Kumar wrote: > m=525312, n=498060, len=524288, eq=false The test doesn't print this so I assume this is tracing that you added in your runs. If I read it correctly, the initial input is len=524288, it deflates to m=525312, then re-inflates to n=498060. So