Re: RFR: 8334755: Asymptotically faster implementation of square root algorithm [v50]

2024-08-01 Thread fabioromano1
On Fri, 2 Aug 2024 06:31:05 GMT, fabioromano1 wrote: > Mmh, benchmarks show a slight slowdown with the iterative variant (except for > the XS case). I tried several times, this one is the most favorable run: > > ``` > BenchmarkMode Cnt Score Error Units > BigI

Re: RFR: 8334755: Asymptotically faster implementation of square root algorithm [v50]

2024-08-01 Thread fabioromano1
On Thu, 1 Aug 2024 21:38:47 GMT, Raffaello Giulietti wrote: > Mmh, benchmarks show a slight slowdown with the iterative variant (except for > the XS case). I tried several times, this one is the most favorable run: > > ``` > BenchmarkMode Cnt Score Error Unit

Re: RFR: 8336856: Optimize String Concat [v25]

2024-08-01 Thread Shaojin Wen
> The current implementation of StringConcat is to mix the coder and length > into a long. This operation will have some overhead for int/long/boolean > types. We can separate the calculation of the coder from the calculation of > the length, which can improve the performance in the scenario of

Re: RFR: 8336856: Optimize String Concat [v24]

2024-08-01 Thread Shaojin Wen
> The current implementation of StringConcat is to mix the coder and length > into a long. This operation will have some overhead for int/long/boolean > types. We can separate the calculation of the coder from the calculation of > the length, which can improve the performance in the scenario of

Re: RFR: 8336856: Optimize String Concat [v23]

2024-08-01 Thread Chen Liang
On Fri, 2 Aug 2024 00:59:06 GMT, Shaojin Wen wrote: >> The current implementation of StringConcat is to mix the coder and length >> into a long. This operation will have some overhead for int/long/boolean >> types. We can separate the calculation of the coder from the calculation of >> the len

Re: RFR: 8336856: Optimize String Concat [v23]

2024-08-01 Thread Shaojin Wen
On Fri, 2 Aug 2024 01:04:08 GMT, Claes Redestad wrote: >> Shaojin Wen has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Fix performance regression caused by args.erase() > > I think erasing arguments is needed for correctness - are you sur

Re: RFR: 8336856: Optimize String Concat [v23]

2024-08-01 Thread Shaojin Wen
On Fri, 2 Aug 2024 00:59:06 GMT, Shaojin Wen wrote: >> The current implementation of StringConcat is to mix the coder and length >> into a long. This operation will have some overhead for int/long/boolean >> types. We can separate the calculation of the coder from the calculation of >> the len

Re: RFR: 8336856: Optimize String Concat [v23]

2024-08-01 Thread Shaojin Wen
On Fri, 2 Aug 2024 00:59:06 GMT, Shaojin Wen wrote: >> The current implementation of StringConcat is to mix the coder and length >> into a long. This operation will have some overhead for int/long/boolean >> types. We can separate the calculation of the coder from the calculation of >> the len

Re: RFR: 8336856: Optimize String Concat [v23]

2024-08-01 Thread Claes Redestad
On Fri, 2 Aug 2024 00:59:06 GMT, Shaojin Wen wrote: >> The current implementation of StringConcat is to mix the coder and length >> into a long. This operation will have some overhead for int/long/boolean >> types. We can separate the calculation of the coder from the calculation of >> the len

Re: RFR: 8336856: Optimize String Concat [v23]

2024-08-01 Thread Shaojin Wen
> The current implementation of StringConcat is to mix the coder and length > into a long. This operation will have some overhead for int/long/boolean > types. We can separate the calculation of the coder from the calculation of > the length, which can improve the performance in the scenario of

RFR: 8335927: Revisit AnnotationConstantValueEntry and AnnotationValue.OfConstant

2024-08-01 Thread Chen Liang
1. Add notes and docs about the difference between resolved constants and constant pool descriptors for annotation constants (e.g. `char` vs `IntegerEntry`) 2. Improved value specification to specify their tags. 3. Improved value factories to return their specific types instead of `OfConstant` 4

Re: RFR: 6426678: (spec) File.createTempFile(prefix, suffix, dir) needs clarification for illegal symbols in suffix

2024-08-01 Thread Brian Burkhalter
On Fri, 2 Aug 2024 00:21:28 GMT, Brian Burkhalter wrote: > Add some verbiage indicating that an `IOException` will be thrown if a file > with a name generated from the supplied prefix and suffix according to the > described algorithm cannot be generated by the underlying system, whether > that

RFR: 6426678: (spec) File.createTempFile(prefix, suffix, dir) needs clarification for illegal symbols in suffix

2024-08-01 Thread Brian Burkhalter
Add some verbiage indicating that an `IOException` will be thrown if a file with a name generated from the supplied prefix and suffix according to the described algorithm cannot be generated by the underlying system, whether that be due to the presence of one of more characters not supported by

Re: RFR: 8336754: Remodel TypeAnnotation to "has" instead of "be" an Annotation [v7]

2024-08-01 Thread Chen Liang
On Thu, 1 Aug 2024 20:02:54 GMT, Chen Liang wrote: >> `TypeAnnotation` is not an annotation, as it should not be used in places >> like `AnnotationValue.ofAnnotation`. Thus it's remodeled to contain an >> annotation at a given location instead of to be an annotation. >> >> Depends on #20205. >

Re: RFR: 8336754: Remodel TypeAnnotation to "has" instead of "be" an Annotation [v8]

2024-08-01 Thread Chen Liang
> `TypeAnnotation` is not an annotation, as it should not be used in places > like `AnnotationValue.ofAnnotation`. Thus it's remodeled to contain an > annotation at a given location instead of to be an annotation. > > Depends on #20205. Chen Liang has updated the pull request with a new target

Re: RFR: 8336856: Optimize String Concat [v22]

2024-08-01 Thread Shaojin Wen
On Wed, 31 Jul 2024 22:27:53 GMT, Shaojin Wen wrote: >> The current implementation of StringConcat is to mix the coder and length >> into a long. This operation will have some overhead for int/long/boolean >> types. We can separate the calculation of the coder from the calculation of >> the le

Withdrawn: 8335927: Revisit AnnotationConstantValueEntry and AnnotationValue.OfConstant

2024-08-01 Thread Chen Liang
On Sun, 14 Jul 2024 22:30:43 GMT, Chen Liang wrote: > Remove `AnnotationConstantValueEntry` and `AnnotationValue.OfConstant`. > > This is a relic of the old model from > https://github.com/openjdk/jdk-sandbox/commit/bb7e29474ecfcfbd1eb01d237593eb80d062944f. > In addition, this is bug-prone: th

Re: RFR: 8336289: Obliterate most references to _snprintf in the Windows JDK [v3]

2024-08-01 Thread Phil Race
On Tue, 16 Jul 2024 08:59:20 GMT, Julian Waters wrote: >> snprintf has been available for all officially and unofficially supported >> compilers for Windows, Visual Studio since version 2015 and gcc since, well, >> forever. snprintf is conforming to C99 since the start when compiling using >>

Re: RFR: 8334755: Asymptotically faster implementation of square root algorithm [v50]

2024-08-01 Thread Raffaello Giulietti
On Thu, 1 Aug 2024 10:16:59 GMT, fabioromano1 wrote: >> I have implemented the Zimmermann's square root algorithm, available in >> works [here](https://inria.hal.science/inria-00072854/en/) and >> [here](https://www.researchgate.net/publication/220532560_A_proof_of_GMP_square_root). >> >> The

Re: RFR: 8336754: Remodel TypeAnnotation to "has" instead of "be" an Annotation [v6]

2024-08-01 Thread Chen Liang
On Wed, 24 Jul 2024 13:00:47 GMT, Chen Liang wrote: >> `TypeAnnotation` is not an annotation, as it should not be used in places >> like `AnnotationValue.ofAnnotation`. Thus it's remodeled to contain an >> annotation at a given location instead of to be an annotation. >> >> Depends on #20205.

Re: RFR: 8336754: Remodel TypeAnnotation to "has" instead of "be" an Annotation [v7]

2024-08-01 Thread Chen Liang
> `TypeAnnotation` is not an annotation, as it should not be used in places > like `AnnotationValue.ofAnnotation`. Thus it's remodeled to contain an > annotation at a given location instead of to be an annotation. > > Depends on #20205. Chen Liang has updated the pull request with a new target

Re: RFR: 8334755: Asymptotically faster implementation of square root algorithm [v50]

2024-08-01 Thread fabioromano1
On Thu, 1 Aug 2024 19:10:51 GMT, Raffaello Giulietti wrote: >> fabioromano1 has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Last small changes > > I guess the overhead is negligible when compared to the arithmetic operation > (shifts,

Re: RFR: 8329251: Print custom truststore/ keystore name

2024-08-01 Thread Sean Coffey
On Thu, 1 Aug 2024 04:11:24 GMT, Prasadrao Koppula wrote: > Using SharedSecrets, I attempted to expose FileInputStream::path information. > After implementing the fix, I validated the startup performance tests. > Observed no consistent pattern of performance drops or gains, can disregard > the

Re: RFR: 8334755: Asymptotically faster implementation of square root algorithm [v50]

2024-08-01 Thread Raffaello Giulietti
On Thu, 1 Aug 2024 10:16:59 GMT, fabioromano1 wrote: >> I have implemented the Zimmermann's square root algorithm, available in >> works [here](https://inria.hal.science/inria-00072854/en/) and >> [here](https://www.researchgate.net/publication/220532560_A_proof_of_GMP_square_root). >> >> The

Re: RFR: 8334755: Asymptotically faster implementation of square root algorithm [v50]

2024-08-01 Thread fabioromano1
On Thu, 1 Aug 2024 10:22:10 GMT, Raffaello Giulietti wrote: >> fabioromano1 has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Last small changes > > I have no further comments, but I'll wait for a couple of days more before > approving,

RFR: 8337506: Disable "best-fit" mapping on Windows command line

2024-08-01 Thread Naoto Sato
Fixing the Java launcher's command line argument parsing issue on Windows. The Java launcher on Windows has been using `GetCommandLineA()` to obtain arguments, which by default does "best-fit" mapping when the arguments are converted to ANSI code page encoding. By disabling this "best-fit" mappi

RFR: 8337667: sun/tools/jcmd/TestJcmdPIDSubstitution.java is failing on mac and windows

2024-08-01 Thread Sonia Zaldana Calles
Hi all, This PR addresses [8337667](https://bugs.openjdk.org/browse/JDK-8337667) . The `Compiler.perfmap` test case is failing on mac and windows as it is only enabled in linux. I am removing this test case and noting that this use case is already tested in [test/hotspot/jtreg/serviceability

Re: RFR: 8334048: -Xbootclasspath can not read some ZIP64 zip files [v3]

2024-08-01 Thread fitzsim
On Wed, 31 Jul 2024 21:54:15 GMT, fitzsim wrote: >> 8334048: -Xbootclasspath can not read some ZIP64 zip files > > fitzsim has updated the pull request incrementally with one additional commit > since the last revision: > > BootClassPathZipFileTest: Switch to createClassBytes, createZip stati

Re: RFR: 8336289: Obliterate most references to _snprintf in the Windows JDK [v3]

2024-08-01 Thread Julian Waters
On Tue, 16 Jul 2024 08:59:20 GMT, Julian Waters wrote: >> snprintf has been available for all officially and unofficially supported >> compilers for Windows, Visual Studio since version 2015 and gcc since, well, >> forever. snprintf is conforming to C99 since the start when compiling using >>

Re: RFR: 8336289: Obliterate most references to _snprintf in the Windows JDK

2024-08-01 Thread Kim Barrett
On Sat, 13 Jul 2024 05:34:00 GMT, Julian Waters wrote: >> snprintf has been available for all officially and unofficially supported >> compilers for Windows, Visual Studio since version 2015 and gcc since, well, >> forever. snprintf is conforming to C99 since the start when compiling using >>

Integrated: 8335638: Calling VarHandle.{access-mode} methods reflectively throws wrong exception

2024-08-01 Thread Hannes Greule
On Wed, 3 Jul 2024 19:43:05 GMT, Hannes Greule wrote: > Similar to how `MethodHandle#invoke(Exact)` methods are already handled, this > change adds special casing for `VarHandle.{access-mode}` methods. > > The exception message is less exact, but I think that's acceptable. This pull request ha

Re: RFR: 8335638: Calling VarHandle.{access-mode} methods reflectively throws wrong exception [v2]

2024-08-01 Thread Chen Liang
On Thu, 4 Jul 2024 06:22:31 GMT, Hannes Greule wrote: >> Similar to how `MethodHandle#invoke(Exact)` methods are already handled, >> this change adds special casing for `VarHandle.{access-mode}` methods. >> >> The exception message is less exact, but I think that's acceptable. > > Hannes Greule

Integrated: 8324260: java/foreign/TestStubAllocFailure.java run timeout with -Xcomp

2024-08-01 Thread Jorn Vernee
On Wed, 31 Jul 2024 13:40:31 GMT, Jorn Vernee wrote: > This test spawns 2 forked processes, which then try to trigger a code cache > OOM in FFM hotspot code. Even without `-Xcomp`, the test is already pretty > slow, which increases dramatically with `-Xcomp`, since startup Java code has > to b

Re: RFR: 8335638: Calling VarHandle.{access-mode} methods reflectively throws wrong exception [v2]

2024-08-01 Thread Jorn Vernee
On Fri, 5 Jul 2024 14:23:50 GMT, Jorn Vernee wrote: >> Hannes Greule has updated the pull request incrementally with one additional >> commit since the last revision: >> >> address comments > > I think this needs a CSR, to document the change in behavior. (See e.g. > https://bugs.openjdk.org

Re: RFR: 8336462: ConcurrentSkipListSet Javadoc incorrectly warns about size method complexity

2024-08-01 Thread Viktor Klang
On Tue, 30 Jul 2024 09:24:12 GMT, Viktor Klang wrote: > Removes some of the old wording around the algorithmic complexity of > ConcurrentSkipListSet::size() while still retaining the warning around the > accuracy of the returned result. @AlanBateman Would you want to be Reviewer? :) -

Re: RFR: 8335638: Calling VarHandle.{access-mode} methods reflectively throws wrong exception [v2]

2024-08-01 Thread duke
On Thu, 4 Jul 2024 06:22:31 GMT, Hannes Greule wrote: >> Similar to how `MethodHandle#invoke(Exact)` methods are already handled, >> this change adds special casing for `VarHandle.{access-mode}` methods. >> >> The exception message is less exact, but I think that's acceptable. > > Hannes Greule

Re: RFR: 8335638: Calling VarHandle.{access-mode} methods reflectively throws wrong exception [v2]

2024-08-01 Thread Hannes Greule
On Thu, 4 Jul 2024 06:22:31 GMT, Hannes Greule wrote: >> Similar to how `MethodHandle#invoke(Exact)` methods are already handled, >> this change adds special casing for `VarHandle.{access-mode}` methods. >> >> The exception message is less exact, but I think that's acceptable. > > Hannes Greule

Re: RFR: 8334755: Asymptotically faster implementation of square root algorithm [v50]

2024-08-01 Thread Raffaello Giulietti
On Thu, 1 Aug 2024 10:16:59 GMT, fabioromano1 wrote: >> I have implemented the Zimmermann's square root algorithm, available in >> works [here](https://inria.hal.science/inria-00072854/en/) and >> [here](https://www.researchgate.net/publication/220532560_A_proof_of_GMP_square_root). >> >> The

Re: RFR: 8334755: Asymptotically faster implementation of square root algorithm [v50]

2024-08-01 Thread fabioromano1
> I have implemented the Zimmermann's square root algorithm, available in works > [here](https://inria.hal.science/inria-00072854/en/) and > [here](https://www.researchgate.net/publication/220532560_A_proof_of_GMP_square_root). > > The algorithm is proved to be asymptotically faster than the New

Re: RFR: 8334755: Asymptotically faster implementation of square root algorithm [v49]

2024-08-01 Thread Raffaello Giulietti
On Wed, 31 Jul 2024 18:52:12 GMT, fabioromano1 wrote: >> I have implemented the Zimmermann's square root algorithm, available in >> works [here](https://inria.hal.science/inria-00072854/en/) and >> [here](https://www.researchgate.net/publication/220532560_A_proof_of_GMP_square_root). >> >> The