Re: RFR: 8326227: Rounding error that may distort computeNextGaussian results [v10]

2024-08-09 Thread Chris Hennick
On Sat, 10 Aug 2024 03:00:10 GMT, Chris Hennick wrote: >> This provides a slightly more accurate bounding limit for >> `computeNextExponentialSoftCapped`. Currently, if the maximum is specified >> as 12.0, it won't actually return a value larger than `1.5 * exponentialX0` >> (11.35391204122209

Re: RFR: 8326227: Rounding error that may distort computeNextGaussian results [v10]

2024-08-09 Thread Chris Hennick
> This provides a slightly more accurate bounding limit for > `computeNextExponentialSoftCapped` when calling it from > `computeNextGaussian`. This could cause the `while > (computeNextExponentialSoftCapped(rng, limit) < limit)` check in > `computeNextGaussian` on line 1402 to always be true, m

Re: RFR: 8326227: Rounding error that may distort computeNextGaussian results [v9]

2024-08-09 Thread Chris Hennick
> This provides a slightly more accurate bounding limit for > `computeNextExponentialSoftCapped` when calling it from > `computeNextGaussian`. This could cause the `while > (computeNextExponentialSoftCapped(rng, limit) < limit)` check in > `computeNextGaussian` on line 1402 to always be true, m

Re: RFR: 8326227: Rounding error that may distort computeNextGaussian results [v8]

2024-08-09 Thread Chris Hennick
> This provides a slightly more accurate bounding limit for > `computeNextExponentialSoftCapped` when calling it from > `computeNextGaussian`. This could cause the `while > (computeNextExponentialSoftCapped(rng, limit) < limit)` check in > `computeNextGaussian` on line 1402 to always be true, m

Re: RFR: 8337839: Make a few fields in MergeCollation static

2024-08-09 Thread Naoto Sato
On Thu, 25 Jul 2024 08:59:17 GMT, Andrey Turbanov wrote: > 3 fields in java.text.MergeCollation could be made 'static': > 1. BITARRAYMASK > 2. BYTEPOWER > 3. BYTEMASK Marked as reviewed by naoto (Reviewer). - PR Review: https://git.openjdk.org/jdk/pull/20323#pullrequestreview-22312

Re: RFR: 8326227: Rounding error that may distort computeNextGaussian results [v7]

2024-08-09 Thread Chris Hennick
> This provides a slightly more accurate bounding limit for > `computeNextExponentialSoftCapped` when calling it from > `computeNextGaussian`. This could cause the `while > (computeNextExponentialSoftCapped(rng, limit) < limit)` check in > `computeNextGaussian` on line 1402 to always be true, m

Re: RFR: 8326227: Rounding error that may distort computeNextGaussian results [v3]

2024-08-09 Thread Chris Hennick
On Wed, 12 Jun 2024 09:35:12 GMT, Jaikiran Pai wrote: >> Chris Hennick has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Bug fix: add-exports was for wrong package > > test/jdk/jdk/internal/util/random/RandomSupportTest.java line 32: > >>

Re: RFR: 8326227: Rounding error that may distort computeNextGaussian results [v3]

2024-08-09 Thread Chris Hennick
On Wed, 12 Jun 2024 08:16:25 GMT, Jaikiran Pai wrote: >> Chris Hennick has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Bug fix: add-exports was for wrong package > > src/java.base/share/classes/jdk/internal/util/random/RandomSupport.java

Re: RFR: 8326227: Rounding error that may distort computeNextGaussian results [v6]

2024-08-09 Thread Chris Hennick
> This provides a slightly more accurate bounding limit for > `computeNextExponentialSoftCapped` when calling it from > `computeNextGaussian`. This could cause the `while > (computeNextExponentialSoftCapped(rng, limit) < limit)` check in > `computeNextGaussian` on line 1402 to always be true, m

Re: RFR: 8337143: (fc, fs) Move filesystem-related native objects from libnio to libjava

2024-08-09 Thread Brian Burkhalter
On Fri, 26 Jul 2024 21:34:07 GMT, Brian Burkhalter wrote: > > Also think to work through some naming on IOUtil vs. NIOUtil as it won't be > > obvious to maintainers which class to use. > > Maybe `NIOUtil` should be `NetUtil` as its methods appear to be invoked only > by classes involved in net

Re: RFR: 8326227: Rounding error that may distort computeNextGaussian results [v3]

2024-08-09 Thread Chris Hennick
On Wed, 12 Jun 2024 09:23:23 GMT, Jaikiran Pai wrote: >> Chris Hennick has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Bug fix: add-exports was for wrong package > > test/jdk/jdk/internal/util/random/RandomSupportTest.java line 5: > >>

Re: RFR: 8326227: Rounding error that may distort computeNextGaussian results [v5]

2024-08-09 Thread Chris Hennick
> This provides a slightly more accurate bounding limit for > `computeNextExponentialSoftCapped` when calling it from > `computeNextGaussian`. This could cause the `while > (computeNextExponentialSoftCapped(rng, limit) < limit)` check in > `computeNextGaussian` on line 1402 to always be true, m

Re: RFR: 8326227: Rounding error that may distort computeNextGaussian results [v3]

2024-08-09 Thread Chris Hennick
On Wed, 12 Jun 2024 10:08:02 GMT, Jaikiran Pai wrote: >>> Update: confirmed that the new test fails without the fix. >> >> Thanks for verifying the test checks the fix; I'll let others who have >> worked more directly on the random code review the actual fix. > >> @jddarcy Added a regression te

Re: RFR: 8289552: Make intrinsic conversions between bit representations of half precision values and floats [v13]

2024-08-09 Thread Smita Kamath
On Fri, 9 Aug 2024 15:21:22 GMT, Emanuel Peter wrote: >> @vnkozlov Thank you for reviewing the patch. > > @smita-kamath I think I just found another regression of this feature: > https://bugs.openjdk.org/browse/JDK-8338126 > Can you please have a look? @eme64, Sure will look into it. Thank you.

Re: RFR: 8337143: (fc, fs) Move filesystem-related native objects from libnio to libjava [v4]

2024-08-09 Thread Brian Burkhalter
On Thu, 8 Aug 2024 14:33:15 GMT, Brian Burkhalter wrote: >> src/java.base/windows/native/libjava/IOUtil.c line 37: >> >>> 35: #include "nio.h" >>> 36: #include "nio_util.h" >>> 37: /* #include "net_util.h" */ >> >> Is this change intended or is this a left over from some experimentation? > > It

Re: RFR: 8337143: (fc, fs) Move filesystem-related native objects from libnio to libjava [v5]

2024-08-09 Thread Brian Burkhalter
> This proposed change would move the native objects required for NIO file > interaction from the libnio native library to the libjava native library on > Linux, macOS, and Windows. Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision:

Re: RFR: 8337143: (fc, fs) Move filesystem-related native objects from libnio to libjava [v4]

2024-08-09 Thread Brian Burkhalter
On Fri, 9 Aug 2024 15:58:50 GMT, Brian Burkhalter wrote: >> I see. Inet6AddressImpl and Inet4AddressImpl are symetric classes >> implementing InetAddressImpl. Both will make native calls to the "net" >> library - so both require the library to be loaded. >> >> In the JDK, these two classes are

Re: RFR: 8337143: (fc, fs) Move filesystem-related native objects from libnio to libjava [v4]

2024-08-09 Thread Brian Burkhalter
On Fri, 9 Aug 2024 15:47:07 GMT, Daniel Fuchs wrote: >> Loading "net" was removed from IOUtil so I am thinking that IOUtil must have >> been initialized somewhere before constructing Inet6AddressImpl, but I've >> not identified where just yet. > > I see. Inet6AddressImpl and Inet4AddressImpl ar

RFR: 8338060: jdk/internal/util/ReferencedKeyTest should be more robust

2024-08-09 Thread Roger Riggs
Addressing latent issues with ReferencedKeyTest - During the `methods()` tests the keys should be strongly held to avoid inadvertent GC collection and subsequent test failures (JDK-8336926) - Merge changes from Valhalla to use String (identity objects) for keys instead of Integer and Long that ar

Re: RFR: 8337143: (fc, fs) Move filesystem-related native objects from libnio to libjava [v4]

2024-08-09 Thread Daniel Fuchs
On Fri, 9 Aug 2024 15:09:08 GMT, Brian Burkhalter wrote: >> OK, this test uses a private API to create an instance of Inet6AddressImpl; >> This explain why in this test Inet6AddressImpl gets loaded before >> InetAddress. >> >> var impl = new Inet6AddressImpl(); >> >> It should nev

Re: RFR: 8289552: Make intrinsic conversions between bit representations of half precision values and floats [v13]

2024-08-09 Thread duke
On Thu, 6 Oct 2022 06:28:04 GMT, Smita Kamath wrote: >> 8289552: Make intrinsic conversions between bit representations of half >> precision values and floats > > Smita Kamath has updated the pull request incrementally with one additional > commit since the last revision: > > Updated instruc

Re: RFR: 8289552: Make intrinsic conversions between bit representations of half precision values and floats [v13]

2024-08-09 Thread Emanuel Peter
On Tue, 11 Oct 2022 17:00:53 GMT, Smita Kamath wrote: >> I started new testing. > > @vnkozlov Thank you for reviewing the patch. @smita-kamath I think I just found another regression of this feature: https://bugs.openjdk.org/browse/JDK-8338126 Can you please have a look? - PR Comm

Re: Costs of caught exceptions during method handle resolve

2024-08-09 Thread Chen Liang
Hi Jan, thank you so much for this report! java.lang.invoke is part of core libraries, so I replied to the core-libs list instead. I see the bottom-up view of MethodHandleNatives.resolve missing, but I need a top-down view to understand better what's happening. Is InvokerBytecodeGenerator.lookup

Re: RFR: 8337143: (fc, fs) Move filesystem-related native objects from libnio to libjava [v4]

2024-08-09 Thread Brian Burkhalter
On Fri, 9 Aug 2024 09:05:49 GMT, Daniel Fuchs wrote: >> Without loading libnet in Inet6AddressImpl, the test >> java/net/InetAddress/NullCharInHostnameDriver.java fails with >> UnsatisfiedLinkError: >> >> java.lang.UnsatisfiedLinkError: 'java.net.InetAddress[] >> java.net.Inet6AddressImpl.loo

Re: RFR: 8337143: (fc, fs) Move filesystem-related native objects from libnio to libjava [v4]

2024-08-09 Thread Brian Burkhalter
On Fri, 9 Aug 2024 09:40:59 GMT, Magnus Ihse Bursie wrote: >> `pthread` is still needed: >> >> open/src/java.base/unix/native/libjava/nio/ch/NativeThread.c:83: error: >> undefined reference to 'pthread_kill' > > Ok then. Thank you for your thorough checking! Thank you for suggesting it! -

Re: RFR: 8337143: (fc, fs) Move filesystem-related native objects from libnio to libjava [v4]

2024-08-09 Thread Magnus Ihse Bursie
On Thu, 8 Aug 2024 16:29:18 GMT, Brian Burkhalter wrote: >> I will check. > > `pthread` is still needed: > > open/src/java.base/unix/native/libjava/nio/ch/NativeThread.c:83: error: > undefined reference to 'pthread_kill' Ok then. Thank you for your thorough checking! - PR Review

Re: RFR: 8337143: (fc, fs) Move filesystem-related native objects from libnio to libjava [v4]

2024-08-09 Thread Daniel Fuchs
On Thu, 8 Aug 2024 21:23:58 GMT, Brian Burkhalter wrote: >> Thanks for the suggestions. I will look into it. > > Without loading libnet in Inet6AddressImpl, the test > java/net/InetAddress/NullCharInHostnameDriver.java fails with > UnsatisfiedLinkError: > > java.lang.UnsatisfiedLinkError: 'jav

Integrated: 8337840: Remove redundant null check in ObjectOutputStream.writeProxyDesc

2024-08-09 Thread Andrey Turbanov
On Fri, 26 Jul 2024 13:09:19 GMT, Andrey Turbanov wrote: > There is implicit null check in line before. > > https://github.com/openjdk/jdk/blob/431d4f7e18369466eedd00926a5162a1461d0b25/src/java.base/share/classes/java/io/ObjectOutputStream.java#L1267-L1277 > > 'cl' can't be null after that. Th

Re: RFR: 8337840: Remove redundant null check in ObjectOutputStream.writeProxyDesc

2024-08-09 Thread Andrey Turbanov
On Fri, 26 Jul 2024 13:09:19 GMT, Andrey Turbanov wrote: > There is implicit null check in line before. > > https://github.com/openjdk/jdk/blob/431d4f7e18369466eedd00926a5162a1461d0b25/src/java.base/share/classes/java/io/ObjectOutputStream.java#L1267-L1277 > > 'cl' can't be null after that. Th