Re: RFR: 8339574: Behavior of File.is{Directory,File,Hidden} is not documented with respect to symlinks [v6]

2024-09-13 Thread Alan Bateman
On Fri, 13 Sep 2024 22:05:40 GMT, Brian Burkhalter wrote: >> Make explicit how the `java.io.File` methods `isDirectory`, `isFile`, and >> `isHidden` behave when the `File` represents a symbolic link. > > Brian Burkhalter has updated the pull request incrementally with one > additional commit si

Re: RFR: 8339217: Optimize ClassFile API loadConstant [v6]

2024-09-13 Thread Chen Liang
On Sat, 14 Sep 2024 02:45:47 GMT, Shaojin Wen wrote: >> This is a large method. By splitting it into multiple methods with the same >> name, the caller can automatically select based on the different types of >> parameters, avoiding this large call that cannot be inlined, which can also >> imp

Re: RFR: 8339217: Optimize ClassFile API loadConstant [v6]

2024-09-13 Thread Shaojin Wen
> This is a large method. By splitting it into multiple methods with the same > name, the caller can automatically select based on the different types of > parameters, avoiding this large call that cannot be inlined, which can also > improve startup performance. > > * current > > CodeBuilder {

Re: RFR: 8340131: Refactor internal makeHiddenClassDefiner to take ClassOption ... instead of Set [v4]

2024-09-13 Thread Claes Redestad
> Simple internal refactor to load a few classes less on startup. Arguably > cleaner. Claes Redestad has updated the pull request incrementally with one additional commit since the last revision: Unused import - Changes: - all: https://git.openjdk.org/jdk/pull/21002/files -

Re: RFR: 8340131: Refactor internal makeHiddenClassDefiner to take ClassOption ... instead of Set [v3]

2024-09-13 Thread Claes Redestad
> Simple internal refactor to load a few classes less on startup. Arguably > cleaner. Claes Redestad has updated the pull request incrementally with one additional commit since the last revision: Add override to fix build error and eliminate all allocations - Changes: - all: h

Re: RFR: 8340131: Refactor internal makeHiddenClassDefiner to take ClassOption ... instead of Set [v2]

2024-09-13 Thread Claes Redestad
On Fri, 13 Sep 2024 15:57:41 GMT, Jorn Vernee wrote: >> Claes Redestad has updated the pull request incrementally with six >> additional commits since the last revision: >> >> - no clone >> - Update src/java.base/share/classes/java/lang/invoke/MethodHandles.java >> >>Co-authored-by: E

Re: RFR: 8338694: x86_64 intrinsic for tanh using libm [v2]

2024-09-13 Thread Sandhya Viswanathan
On Fri, 13 Sep 2024 22:30:25 GMT, Srinivas Vamsi Parasa wrote: >> So far, this will be the only intrinsic implementation of tanh. Therefore, >> at the moment it is just checking the consistency of the intrinsic >> implementation with StrictMath/FDLIBM tanh. If the intrinsic has a ~1 ulp >> ac

Re: RFR: 8338694: x86_64 intrinsic for tanh using libm [v6]

2024-09-13 Thread Srinivas Vamsi Parasa
> The goal of this PR is to implement an x86_64 intrinsic for > java.lang.Math.tanh() using libm > > Benchmark (ops/ms) | Stock JDK | Tanh intrinsic | Speedup > -- | -- | -- | -- > MathBench.tanhDouble | 70900 | 95618 | 1.35x Srinivas Vamsi Parasa has updated the pull request incrementally with

Re: RFR: 8340079: Modify rearrange/selectFrom Vector API methods to perform wrapIndexes instead of checkIndexes

2024-09-13 Thread Sandhya Viswanathan
On Fri, 13 Sep 2024 19:45:11 GMT, Paul Sandoz wrote: >>> Given `rearrange` with 1 vector gets wrapping indices semantics. I think we >>> should stop normalizing indices when converting a `Vector` into a >>> `VectorShuffle` (currently we wrap all out-of-bound elements to `[-VLEN, >>> 0)`). Then

Re: RFR: 8338694: x86_64 intrinsic for tanh using libm [v2]

2024-09-13 Thread Srinivas Vamsi Parasa
On Wed, 11 Sep 2024 01:59:54 GMT, Joe Darcy wrote: >>> If the test is going to use randomness, then its jtreg tags should include >>> >>> `@key randomness` >>> >>> and it is preferable to use jdk.test.lib.RandomFactory to get and Random >>> object since that handles printing out a key so the r

Re: RFR: 8338694: x86_64 intrinsic for tanh using libm [v5]

2024-09-13 Thread Srinivas Vamsi Parasa
> The goal of this PR is to implement an x86_64 intrinsic for > java.lang.Math.tanh() using libm > > Benchmark (ops/ms) | Stock JDK | Tanh intrinsic | Speedup > -- | -- | -- | -- > MathBench.tanhDouble | 70900 | 95618 | 1.35x Srinivas Vamsi Parasa has updated the pull request incrementally with

Re: RFR: 8340079: Modify rearrange/selectFrom Vector API methods to perform wrapIndexes instead of checkIndexes [v2]

2024-09-13 Thread Sandhya Viswanathan
> Currently the rearrange and selectFrom APIs check shuffle indices and throw > IndexOutOfBoundsException if there is any exceptional source index in the > shuffle. This causes the generated code to be less optimal. This PR modifies > the rearrange/selectFrom Vector API methods to perform wrapIn

Re: RFR: 8340131: Refactor internal makeHiddenClassDefiner to take ClassOption ... instead of Set [v2]

2024-09-13 Thread Claes Redestad
> Simple internal refactor to load a few classes less on startup. Arguably > cleaner. Claes Redestad has updated the pull request incrementally with six additional commits since the last revision: - no clone - Update src/java.base/share/classes/java/lang/invoke/MethodHandles.java Co-au

Re: RFR: 8339574: Behavior of File.is{Directory,File,Hidden} is not documented with respect to symlinks [v5]

2024-09-13 Thread Brian Burkhalter
On Tue, 10 Sep 2024 18:05:13 GMT, Brian Burkhalter wrote: >> src/java.base/share/classes/java/io/File.java line 1440: >> >>> 1438: * Renames the file denoted by this abstract pathname. If this >>> pathname >>> 1439: * denotes a symbolic link, then the link itself, not its target, >>

Re: RFR: 8339574: Behavior of File.is{Directory,File,Hidden} is not documented with respect to symlinks [v6]

2024-09-13 Thread Brian Burkhalter
> Make explicit how the `java.io.File` methods `isDirectory`, `isFile`, and > `isHidden` behave when the `File` represents a symbolic link. Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision: 8339574: Move symbolic link verbiage from

Re: RFR: 8338021: Support new unsigned and saturating vector operators in VectorAPI [v10]

2024-09-13 Thread Paul Sandoz
On Fri, 13 Sep 2024 16:20:28 GMT, Jatin Bhateja wrote: >> Hi All, >> >> As per the discussion on panama-dev mailing list[1], patch adds the support >> following new vector operators. >> >> >> . SUADD : Saturating unsigned addition. >> . SADD: Saturating signed addition. >>

Re: RFR: 8338021: Support new unsigned and saturating vector operators in VectorAPI [v10]

2024-09-13 Thread Paul Sandoz
On Fri, 13 Sep 2024 16:20:28 GMT, Jatin Bhateja wrote: >> Hi All, >> >> As per the discussion on panama-dev mailing list[1], patch adds the support >> following new vector operators. >> >> >> . SUADD : Saturating unsigned addition. >> . SADD: Saturating signed addition. >>

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

2024-09-13 Thread Brian Burkhalter
On Fri, 13 Sep 2024 19:30:42 GMT, Magnus Ihse Bursie wrote: >> Brian Burkhalter has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 8337143: Clean up to address reviewer comments > > make/modules/java.base/lib/CoreLibraries.gmk line 68: > >

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

2024-09-13 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: 8336025: Improve ZipOutputSream validation of MAX CEN Header field limits

2024-09-13 Thread Chen Liang
On Fri, 13 Sep 2024 17:40:21 GMT, Lance Andersen wrote: > Please review the following PR which addresses that ZipOutputStream should > validate the CEN header fields similar to what was done via > [JDK-8316141](https://bugs.openjdk.org/browse/JDK-8316141) > > As part of this change, the javado

RFR: 8336025: Improve ZipOutputSream validation of MAX CEN Header field limits

2024-09-13 Thread Lance Andersen
Please review the following PR which addresses that ZipOutputStream should validate the CEN header fields similar to what was done via [JDK-8316141](https://bugs.openjdk.org/browse/JDK-8316141) As part of this change, the javadoc for ZipEntry has been updated to indicate that the CEN Header(46

Re: RFR: 8340079: Modify rearrange/selectFrom Vector API methods to perform wrapIndexes instead of checkIndexes

2024-09-13 Thread Paul Sandoz
On Mon, 19 Aug 2024 21:47:23 GMT, Sandhya Viswanathan wrote: > Currently the rearrange and selectFrom APIs check shuffle indices and throw > IndexOutOfBoundsException if there is any exceptional source index in the > shuffle. This causes the generated code to be less optimal. This PR modifies

Re: RFR: 8339217: Optimize ClassFile API loadConstant [v5]

2024-09-13 Thread Chen Liang
On Fri, 13 Sep 2024 17:14:17 GMT, Shaojin Wen wrote: >> This is a large method. By splitting it into multiple methods with the same >> name, the caller can automatically select based on the different types of >> parameters, avoiding this large call that cannot be inlined, which can also >> imp

Re: RFR: 8340079: Modify rearrange/selectFrom Vector API methods to perform wrapIndexes instead of checkIndexes

2024-09-13 Thread Paul Sandoz
On Fri, 13 Sep 2024 18:17:21 GMT, Sandhya Viswanathan wrote: > > The guidance from Paul Sandoz and John Rose is to keep the the partial > wrapping at shuffle construction as is for now and only change the rearrange > and selectFrom apis. Yes, we are trying to take smaller incremental steps.

Re: RFR: 8339934: Simplify Math.scalb(double) method [v3]

2024-09-13 Thread Raffaello Giulietti
> `Math.scalb(double)` can be simplified, removing a loop and using > larger/smaller factors. Raffaello Giulietti has updated the pull request incrementally with one additional commit since the last revision: Introduce primPowerOfTwoD and make use of it. - Changes: - all: http

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

2024-09-13 Thread Magnus Ihse Bursie
On Thu, 12 Sep 2024 02:10:00 GMT, Brian Burkhalter wrote: >> 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 in

Re: RFR: 8340079: Modify rearrange/selectFrom Vector API methods to perform wrapIndexes instead of checkIndexes

2024-09-13 Thread Sandhya Viswanathan
On Fri, 13 Sep 2024 19:04:12 GMT, Jatin Bhateja wrote: >> @jatin-bhateja If you could expand on this comment with specific cases it >> will be helpful. The loadShuffle generation is needed for platform specific >> handling of shuffles and cannot be optimized out here. > > Hi @sviswa7, I was sug

Re: RFR: 8340079: Modify rearrange/selectFrom Vector API methods to perform wrapIndexes instead of checkIndexes

2024-09-13 Thread Jatin Bhateja
On Fri, 13 Sep 2024 18:24:04 GMT, Sandhya Viswanathan wrote: >> src/hotspot/share/opto/vectorIntrinsics.cpp line 2206: >> >>> 2204: const Type * byte_bt = Type::get_const_basic_type(T_BYTE); >>> 2205: const TypeVect * byte_vt = TypeVect::make(byte_bt, num_elem); >>> 2206: Node* byte_shuf

Re: RFR: 8339934: Simplify Math.scalb(double) method [v2]

2024-09-13 Thread Joe Darcy
On Fri, 13 Sep 2024 18:56:35 GMT, Raffaello Giulietti wrote: > I considered using `powerOfTwoD` but it uses a `long` `+`, and performs an > additional masking which seems useless or over-cautious and does not help if > `n` is out of range (assuming the assert is not enabled). > > What about a

Re: RFR: 8339934: Simplify Math.scalb(double) method [v2]

2024-09-13 Thread Raffaello Giulietti
On Fri, 13 Sep 2024 18:44:36 GMT, Joe Darcy wrote: >> Raffaello Giulietti has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Slight improvement. > > src/java.base/share/classes/java/lang/Math.java line 3325: > >> 3323: if (scaleFac

Re: RFR: 8339934: Simplify Math.scalb(double) method [v2]

2024-09-13 Thread Joe Darcy
On Fri, 13 Sep 2024 08:56:39 GMT, Raffaello Giulietti wrote: >> `Math.scalb(double)` can be simplified, removing a loop and using >> larger/smaller factors. > > Raffaello Giulietti has updated the pull request incrementally with one > additional commit since the last revision: > > Slight im

Re: RFR: 8338023: Support two vector selectFrom API [v9]

2024-09-13 Thread Jatin Bhateja
> Hi All, > > As per the discussion on panama-dev mailing list[1], patch adds the support > for following new two vector permutation APIs. > > > Declaration:- > Vector.selectFrom(Vector v1, Vector v2) > > > Semantics:- > Using index values stored in the lanes of "this" vector, assembl

Re: RFR: 8340073: Support "%z" time zone abbreviation format in TZ files [v2]

2024-09-13 Thread Naoto Sato
> Yet another preparation for upgrading the time zone data to 2024b, which > introduced a new abbreviation format "%z". The update includes: > ... > The main source files' time zone abbreviations now use %z, > supported by zic since release 2015f and used in vanguard form > since

Re: RFR: 8340131: Refactor internal makeHiddenClassDefiner to take ClassOption ... instead of Set

2024-09-13 Thread ExE Boss
On Fri, 13 Sep 2024 15:40:46 GMT, Claes Redestad wrote: > Simple internal refactor to load a few classes less on startup. Arguably > cleaner. The private methods don’t need to be `ACC_VARARGS`, also remove excess  whitespace between `ClassOption` and `...` to match the code style of the rest o

Re: RFR: 8338023: Support two vector selectFrom API [v8]

2024-09-13 Thread Jatin Bhateja
On Fri, 13 Sep 2024 14:53:18 GMT, Emanuel Peter wrote: > Can you please **define** somewhere what it means to `prune indexes`? It does > not help me much more than the previous "massaging indexes" you had before I > asked you to change it. > > > Also: I'm a little worried about the semantics c

Re: RFR: 8340079: Modify rearrange/selectFrom Vector API methods to perform wrapIndexes instead of checkIndexes

2024-09-13 Thread Sandhya Viswanathan
On Fri, 13 Sep 2024 05:30:36 GMT, Jatin Bhateja wrote: >> Currently the rearrange and selectFrom APIs check shuffle indices and throw >> IndexOutOfBoundsException if there is any exceptional source index in the >> shuffle. This causes the generated code to be less optimal. This PR modifies >>

Re: RFR: 8340079: Modify rearrange/selectFrom Vector API methods to perform wrapIndexes instead of checkIndexes

2024-09-13 Thread Sandhya Viswanathan
On Fri, 13 Sep 2024 17:20:40 GMT, Quan Anh Mai wrote: > Given `rearrange` with 1 vector gets wrapping indices semantics. I think we > should stop normalizing indices when converting a `Vector` into a > `VectorShuffle` (currently we wrap all out-of-bound elements to `[-VLEN, > 0)`). Then the re

Re: RFR: 8338023: Support two vector selectFrom API [v7]

2024-09-13 Thread Jatin Bhateja
On Fri, 13 Sep 2024 14:45:29 GMT, Emanuel Peter wrote: >> Existing vectorAPI inline expansion entry points explicitly pass lane type >> and count as intrinsic arguments, this is used to create concrete ideal >> vector types. > > That does not answer my question. If the backend operations you im

Re: RFR: 8339699: Optimize DataOutputStream writeUTF [v3]

2024-09-13 Thread Shaojin Wen
On Fri, 13 Sep 2024 17:05:11 GMT, Chen Liang wrote: >> Shaojin Wen has updated the pull request incrementally with one additional >> commit since the last revision: >> >> reduce JDKUTF#utflen codeSize > > src/java.base/share/classes/jdk/internal/util/JDKUTF.java line 37: > >> 35: public abst

Re: RFR: 8339699: Optimize DataOutputStream writeUTF [v4]

2024-09-13 Thread Shaojin Wen
> PR #20772 introduced an optimization for writeUTF, which can also be used in > DataOutputStream::writeUTF. Shaojin Wen has updated the pull request incrementally with two additional commits since the last revision: - rename JDKUTF to ModifiedUtf - suggestion from @liach - Chan

Re: RFR: 8340079: Modify rearrange/selectFrom Vector API methods to perform wrapIndexes instead of checkIndexes

2024-09-13 Thread Jatin Bhateja
On Mon, 19 Aug 2024 21:47:23 GMT, Sandhya Viswanathan wrote: > Currently the rearrange and selectFrom APIs check shuffle indices and throw > IndexOutOfBoundsException if there is any exceptional source index in the > shuffle. This causes the generated code to be less optimal. This PR modifies

Re: RFR: 8340079: Modify rearrange/selectFrom Vector API methods to perform wrapIndexes instead of checkIndexes

2024-09-13 Thread Quan Anh Mai
On Mon, 19 Aug 2024 21:47:23 GMT, Sandhya Viswanathan wrote: > Currently the rearrange and selectFrom APIs check shuffle indices and throw > IndexOutOfBoundsException if there is any exceptional source index in the > shuffle. This causes the generated code to be less optimal. This PR modifies

Re: RFR: 8339217: Optimize ClassFile API loadConstant [v5]

2024-09-13 Thread Shaojin Wen
> This is a large method. By splitting it into multiple methods with the same > name, the caller can automatically select based on the different types of > parameters, avoiding this large call that cannot be inlined, which can also > improve startup performance. > > * current > > CodeBuilder {

Re: RFR: 8339699: Optimize DataOutputStream writeUTF [v3]

2024-09-13 Thread Chen Liang
On Sat, 7 Sep 2024 08:51:25 GMT, Shaojin Wen wrote: >> PR #20772 introduced an optimization for writeUTF, which can also be used in >> DataOutputStream::writeUTF. > > Shaojin Wen has updated the pull request incrementally with one additional > commit since the last revision: > > reduce JDKUT

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

2024-09-13 Thread Brian Burkhalter
On Fri, 13 Sep 2024 16:45:22 GMT, Daniel Fuchs wrote: >> I would have to check. The failure I observed occurred in both of these tests >> >> test/jdk/sun/net/www/protocol/http/NoNTLM.java >> test/jdk/sun/net/www/protocol/http/TestTransparentNTLM.java >> >> and nowhere else. > > I see. The test

Integrated: 8339847: Broken link to the dieharder distribution website in SplittableRandom

2024-09-13 Thread Nizar Benalla
On Fri, 13 Sep 2024 14:48:44 GMT, Nizar Benalla wrote: > Could I get a review for this small change? > The page linked in `SplittableRandom` was moved at some point, this change > points to the correct page to avoid redirects. > > TIA This pull request has now been integrated. Changeset: 37bf

Re: RFR: 8339847: Broken link to the dieharder distribution website in SplittableRandom

2024-09-13 Thread Chen Liang
On Fri, 13 Sep 2024 14:48:44 GMT, Nizar Benalla wrote: > Could I get a review for this small change? > The page linked in `SplittableRandom` was moved at some point, this change > points to the correct page to avoid redirects. > > TIA Thanks Raffaello for the confirmation. - PR C

Integrated: 8340082: Use inline return tag in java.base

2024-09-13 Thread Joe Darcy
On Fri, 13 Sep 2024 02:47:18 GMT, Joe Darcy wrote: > Candidates for this refactoring were found programmatically; the program to > find candidates is in a comment on the bug. This pull request has now been integrated. Changeset: 89c172ac Author:Joe Darcy URL: https://git.openjdk.or

Re: RFR: 8340082: Use inline return tag in java.base

2024-09-13 Thread Chen Liang
On Fri, 13 Sep 2024 02:47:18 GMT, Joe Darcy wrote: > Candidates for this refactoring were found programmatically; the program to > find candidates is in a comment on the bug. Looks good. It might be feasible to run a more complex tool that analyzes the tokenized javadoc AST from javac as later

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

2024-09-13 Thread Daniel Fuchs
On Fri, 13 Sep 2024 16:35:04 GMT, Brian Burkhalter wrote: >> Do we know what code loaded NTLMAuthentication? I'd expect it to be loaded >> by HttpURLConnection, which should have triggered the loading of libnet long >> before it cares about NTLM. > > I would have to check. The failure I observe

Re: RFR: 8338023: Support two vector selectFrom API [v7]

2024-09-13 Thread Paul Sandoz
On Fri, 6 Sep 2024 18:08:09 GMT, Jatin Bhateja wrote: >> src/jdk.incubator.vector/share/classes/jdk/incubator/vector/Vector.java line >> 2770: >> >>> 2768: >>> 2769: /** >>> 2770: * Rearranges the lane elements of two vectors, selecting lanes >> >> I have a bit of a name concern here

Re: RFR: 8339769: Incorrect error message during startup if working directory does not exist [v2]

2024-09-13 Thread Jaikiran Pai
On Fri, 13 Sep 2024 16:33:54 GMT, Justin Lu wrote: > AFAICT this would be correcting a faulty error message with a proper one, and > so there is no behavioral change. What do you think? Hello Justin, for this current PR, I think it's OK to just go ahead with the current changes that you have f

Re: RFR: 8339769: Incorrect error message during startup if working directory does not exist [v3]

2024-09-13 Thread Justin Lu
> Please review this PR which restores the correct exception message when the > current working directory can not be found during java startup in > `initPhase1`. > > Both MacOS and Linux are expected to fail with `java.lang.Error: Properties > init: Could not determine current working directory

Re: RFR: 8340082: Use inline return tag in java.base

2024-09-13 Thread Joe Darcy
On Fri, 13 Sep 2024 13:13:58 GMT, Pavel Rappo wrote: > > This patch only captures one-line returns without extra sentences. Is it > > possible for us to handle slightly more complex documentations like > > `ParameterizedType::getActualTypeArguments`? > > Sure, it is possible. However, there's

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

2024-09-13 Thread Brian Burkhalter
On Fri, 13 Sep 2024 16:31:36 GMT, Daniel Fuchs wrote: >>> [...] I'd expect that libnet would have been loaded before we reach >>> NTLMAuthentication. >> >> In the (as of now) penultimate webrev 4f47d5a (Merge), >> `WindowsNativeDispatcher` loaded it during boot phase 2. I think that >> withou

Re: RFR: 8340082: Use inline return tag in java.base

2024-09-13 Thread Naoto Sato
On Fri, 13 Sep 2024 02:47:18 GMT, Joe Darcy wrote: > Candidates for this refactoring were found programmatically; the program to > find candidates is in a comment on the bug. `java.nio.charset` and `java.time.format` changes look good - Marked as reviewed by naoto (Reviewer). PR

Re: RFR: 8339847: Broken link to the dieharder distribution website in SplittableRandom

2024-09-13 Thread Raffaello Giulietti
On Fri, 13 Sep 2024 14:48:44 GMT, Nizar Benalla wrote: > Could I get a review for this small change? > The page linked in `SplittableRandom` was moved at some point, this change > points to the correct page to avoid redirects. > > TIA Looks good - PR Comment: https://git.openjdk.

Re: RFR: 8339769: Incorrect error message during startup if working directory does not exist [v2]

2024-09-13 Thread Justin Lu
On Thu, 12 Sep 2024 23:11:31 GMT, Justin Lu wrote: >> Please review this PR which restores the correct exception message when the >> current working directory can not be found during java startup in >> `initPhase1`. >> >> Both MacOS and Linux are expected to fail with `java.lang.Error: Propert

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

2024-09-13 Thread Daniel Fuchs
On Fri, 13 Sep 2024 16:12:28 GMT, Brian Burkhalter wrote: >> Yes, there was an `UnsatisfiedLinkError` in the native method >> `isTrustedSiteAvailable()` in `NTLMAuthentication`. > >> [...] I'd expect that libnet would have been loaded before we reach >> NTLMAuthentication. > > In the (as of no

Re: RFR: 8339769: Incorrect error message during startup if working directory does not exist [v2]

2024-09-13 Thread Naoto Sato
On Thu, 12 Sep 2024 23:11:31 GMT, Justin Lu wrote: >> Please review this PR which restores the correct exception message when the >> current working directory can not be found during java startup in >> `initPhase1`. >> >> Both MacOS and Linux are expected to fail with `java.lang.Error: Propert

Re: RFR: 8338021: Support new unsigned and saturating vector operators in VectorAPI [v10]

2024-09-13 Thread Jatin Bhateja
> Hi All, > > As per the discussion on panama-dev mailing list[1], patch adds the support > following new vector operators. > > > . SUADD : Saturating unsigned addition. > . SADD: Saturating signed addition. > . SUSUB : Saturating unsigned subtraction. > . SSUB:

Re: RFR: 8339847: Broken link to the dieharder distribution website in SplittableRandom

2024-09-13 Thread Chen Liang
On Fri, 13 Sep 2024 14:48:44 GMT, Nizar Benalla wrote: > Could I get a review for this small change? > The page linked in `SplittableRandom` was moved at some point, this change > points to the correct page to avoid redirects. > > TIA Marked as reviewed by liach (Reviewer). Requesting @rgiuli

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

2024-09-13 Thread Brian Burkhalter
On Fri, 13 Sep 2024 16:08:50 GMT, Brian Burkhalter wrote: >> I wonder - do you see any failure if you don't load libnet from there? > > Yes, there was an `UnsatisfiedLinkError` in the native method > `isTrustedSiteAvailable()` in `NTLMAuthentication`. > [...] I'd expect that libnet would have b

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

2024-09-13 Thread Brian Burkhalter
On Fri, 13 Sep 2024 16:06:26 GMT, Daniel Fuchs wrote: >> hmm... I don't see any issue in adding the load call to >> `NTLMAuthentication` but I'm surprised that it's even needed: I'd expect >> that libnet would have been loaded before we reach NTLMAuthentication. > > I wonder - do you see any f

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

2024-09-13 Thread Daniel Fuchs
On Fri, 13 Sep 2024 16:05:37 GMT, Daniel Fuchs wrote: >> @dfuch Would you please check whether the change at line 71 in the updated >> version of `NTLMAuthentication` is the correct place for this load? > > hmm... I don't see any issue in adding the load call to `NTLMAuthentication` > but I'm

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

2024-09-13 Thread Daniel Fuchs
On Thu, 12 Sep 2024 15:40:27 GMT, Brian Burkhalter wrote: >> Moved to `NTLMAuthentication` static initializer. 853d349 > > @dfuch Would you please check whether the change at line 71 in the updated > version of `NTLMAuthentication` is the correct place for this load? hmm... I don't see any iss

Re: RFR: 8340131: Refactor internal makeHiddenClassDefiner to take ClassOption ... instead of Set

2024-09-13 Thread Jorn Vernee
On Fri, 13 Sep 2024 15:40:46 GMT, Claes Redestad wrote: > Simple internal refactor to load a few classes less on startup. Arguably > cleaner. src/java.base/share/classes/java/lang/invoke/MethodHandles.java line 2223: > 2221: } > : > 2223: return makeHiddenClassDefi

RFR: 8340131: Refactor internal makeHiddenClassDefiner to take ClassOption ... instead of Set

2024-09-13 Thread Claes Redestad
Simple internal refactor to load a few classes less on startup. Arguably cleaner. - Commit messages: - Refactor makeHiddenClassDefiner to take ClassOption ... Changes: https://git.openjdk.org/jdk/pull/21002/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=21002&range=00 I

Re: RFR: 8339847: Broken link to the dieharder distribution website in SplittableRandom

2024-09-13 Thread duke
On Fri, 13 Sep 2024 14:48:44 GMT, Nizar Benalla wrote: > Could I get a review for this small change? > The page linked in `SplittableRandom` was moved at some point, this change > points to the correct page to avoid redirects. > > TIA @nizarbenalla Your change (at version f7cead81b09d392d673b

Re: RFR: 8339847: Broken link to the dieharder distribution website in SplittableRandom

2024-09-13 Thread Nizar Benalla
On Fri, 13 Sep 2024 14:48:44 GMT, Nizar Benalla wrote: > Could I get a review for this small change? > The page linked in `SplittableRandom` was moved at some point, this change > points to the correct page to avoid redirects. > > TIA I think this counts as "trivial" change and can be integrat

Integrated: 8340120: Remove redundant code in SegmentBulkOperations::mismatch

2024-09-13 Thread Per Minborg
On Fri, 13 Sep 2024 13:02:05 GMT, Per Minborg wrote: > This PR removes redundant code. This pull request has now been integrated. Changeset: 1a0a5388 Author:Per Minborg URL: https://git.openjdk.org/jdk/commit/1a0a53883f7c6f523b5fefb722e137258d527362 Stats: 9 lines in 1 file chan

Re: RFR: 8340120: Remove redundant code in SegmentBulkOperations::mismatch

2024-09-13 Thread Maurizio Cimadamore
On Fri, 13 Sep 2024 13:59:54 GMT, Per Minborg wrote: > This title has been changed as this code segment was never invoked. So, we > could not add a test that touches the code. Also, this will not fix any > out-of-bounds addressing but will only reduce the code surface. To be clear for future r

Re: RFR: 8340120: Remove redundant code in SegmentBulkOperations::mismatch

2024-09-13 Thread Maurizio Cimadamore
On Fri, 13 Sep 2024 13:02:05 GMT, Per Minborg wrote: > This PR fixes a build error where we addressed out of bounds. I am now convinced that this was just about dead code - please mark the JBS issue as `noreg-hard`. - Marked as reviewed by mcimadamore (Reviewer). PR Review: https

Re: RFR: 8339847: Broken link to the dieharder distribution website in SplittableRandom

2024-09-13 Thread Iris Clark
On Fri, 13 Sep 2024 14:48:44 GMT, Nizar Benalla wrote: > Could I get a review for this small change? > The page linked in `SplittableRandom` was moved at some point, this change > points to the correct page to avoid redirects. > > TIA Confirmed. New link appears to be correct. -

RFR: 8339847: Broken link to the dieharder distribution website in SplittableRandom

2024-09-13 Thread Nizar Benalla
Could I get a review for this small change? The page linked in `SplittableRandom` was moved at some point, this change points to the correct page to avoid redirects. TIA - Commit messages: - Broken link to the dieharder distribution website in SplittableRandom Changes: https://git

Re: RFR: 8338023: Support two vector selectFrom API [v8]

2024-09-13 Thread Emanuel Peter
On Fri, 6 Sep 2024 18:13:34 GMT, Jatin Bhateja wrote: >> Hi All, >> >> As per the discussion on panama-dev mailing list[1], patch adds the support >> for following new two vector permutation APIs. >> >> >> Declaration:- >> Vector.selectFrom(Vector v1, Vector v2) >> >> >> Semantics:- >>

Re: RFR: 8338023: Support two vector selectFrom API [v7]

2024-09-13 Thread Emanuel Peter
On Tue, 3 Sep 2024 11:45:53 GMT, Emanuel Peter wrote: >> Jatin Bhateja has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Adding descriptive comments > > src/jdk.incubator.vector/share/classes/jdk/incubator/vector/ByteVector.java > line 54

Re: RFR: 8338023: Support two vector selectFrom API [v7]

2024-09-13 Thread Emanuel Peter
On Fri, 6 Sep 2024 18:08:04 GMT, Jatin Bhateja wrote: >> test/jdk/jdk/incubator/vector/ShortMaxVectorTests.java line 1048: >> >>> 1046: return >>> SHORT_GENERATOR_SELECT_FROM_TRIPLES.stream().map(List::toArray). >>> 1047: toArray(Object[][]::new); >>> 1048: } >> >>

Re: RFR: 8325949: Create an internal utility method for creating VarHandle instances [v2]

2024-09-13 Thread Per Minborg
On Fri, 13 Sep 2024 12:40:33 GMT, Chen Liang wrote: >> Per Minborg has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Rename and reformat > > src/java.base/share/classes/jdk/internal/reflect/MethodHandlesInternal.java > line 50: > >> 48:

Re: How many methods have been deprecated in sun.misc.Unsafe? (JEP 471)

2024-09-13 Thread Alan Bateman
On 13/09/2024 10:49, Zheka Kozlov wrote: Hello! JEP 471 says that 79 methods out of 87 have been deprecated in sun.misc.Unsafe. However, I have a different number. Deprecated for removal in Java 18: 1. public long objectFieldOffset(Field f) 2. public Object staticFieldBase(Field f) 3. public

Integrated: 8333843: Provide guidelines on MemorySegment to read strings with known lengths

2024-09-13 Thread Per Minborg
On Tue, 27 Aug 2024 09:36:56 GMT, Per Minborg wrote: > This PR proposes to add a new overload to `MemorySegment::getString` whereby > it is possible to pass in a known byte length of the content in a segment > that should be converted to a String. This is useful in case one already > knows the

Withdrawn: 8317356: Test ClassFile API if it deals with nulls correctly across the whole API

2024-09-13 Thread Nizar Benalla
On Mon, 12 Aug 2024 17:23:15 GMT, Nizar Benalla wrote: > The test is inspired from [FFM API's > TestNulls](https://github.com/openjdk/jdk/blob/master/test/jdk/java/foreign/TestNulls.java), > I customized their Null checking framework it to work with ClassFile API. > > The framework for for tes

Integrated: 8334301: Errors in jpackage man page

2024-09-13 Thread Alexey Semenyuk
On Thu, 12 Sep 2024 16:14:34 GMT, Alexey Semenyuk wrote: > Correct jpackage man errors This pull request has now been integrated. Changeset: 3c4d15bd Author:Alexey Semenyuk URL: https://git.openjdk.org/jdk/commit/3c4d15bdceaf94698af99d6b6fb12b3a28e13fdf Stats: 24 lines in 1 file

Re: RFR: 8340120: Remove redundant code in SegmentBulkOperations::mismatch

2024-09-13 Thread Per Minborg
On Fri, 13 Sep 2024 13:02:05 GMT, Per Minborg wrote: > This PR fixes a build error where we addressed out of bounds. This title has been changed as this code segment was never invoked. So, we could not add a test that touches the code. Also, this will not fix any out-of-bounds addressing but w

Re: RFR: 8340082: Use inline return tag in java.base

2024-09-13 Thread Daniel Jeliński
On Fri, 13 Sep 2024 02:47:18 GMT, Joe Darcy wrote: > Candidates for this refactoring were found programmatically; the program to > find candidates is in a comment on the bug. Marked as reviewed by djelinski (Reviewer). - PR Review: https://git.openjdk.org/jdk/pull/20981#pullreques

Re: RFR: 8340082: Use inline return tag in java.base

2024-09-13 Thread Pavel Rappo
On Fri, 13 Sep 2024 13:07:03 GMT, Chen Liang wrote: > This patch only captures one-line returns without extra sentences. Is it > possible for us to handle slightly more complex documentations like > `ParameterizedType::getActualTypeArguments`? Sure, it is possible. However, there's a tradeoff

Re: RFR: 8340120: Out of bounds addressing in mismatch

2024-09-13 Thread Maurizio Cimadamore
On Fri, 13 Sep 2024 13:02:05 GMT, Per Minborg wrote: > This PR fixes a build error where we addressed out of bounds. Can we please add a regression test to cover it? - PR Review: https://git.openjdk.org/jdk/pull/20998#pullrequestreview-2303088571

Re: RFR: 8340082: Use inline return tag in java.base

2024-09-13 Thread Chen Liang
On Fri, 13 Sep 2024 02:47:18 GMT, Joe Darcy wrote: > Candidates for this refactoring were found programmatically; the program to > find candidates is in a comment on the bug. This patch only captures one-line returns without extra sentences. Is it possible for us to handle slightly more comple

RFR: 8340120: Out of bounds addressing in mismatch

2024-09-13 Thread Per Minborg
This PR fixes a build error where we addressed out of bounds. - Commit messages: - Remove redundant code Changes: https://git.openjdk.org/jdk/pull/20998/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=20998&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8340120 Sta

Re: RFR: 8339531: Improve performance of MemorySegment::mismatch [v9]

2024-09-13 Thread Brett Okken
On Wed, 11 Sep 2024 13:15:57 GMT, Per Minborg wrote: >> src/java.base/share/classes/jdk/internal/foreign/SegmentBulkOperations.java >> line 244: >> >>> 242: return (Architecture.isLittleEndian() >>> 243: ? Long.numberOfTrailingZeros(x) >>> 244: : Long.num

Re: RFR: 8325949: Create an internal utility method for creating VarHandle instances [v2]

2024-09-13 Thread Chen Liang
On Fri, 13 Sep 2024 07:50:49 GMT, Per Minborg wrote: >> This PR suggests introducing an internal class in `java.base` to simplify >> the use of some `MethodHandles.Lookup` operations. >> >> While the utility of the methods might appear to be limited in classes with >> many static `VarHandle`/`

RFR: 8340114: Remove outdated SelectVersion() function from the launcher and update the code comments explaining the code flow

2024-09-13 Thread Jaikiran Pai
Can I please get a review of this change which proposes to remove the (internal) `SelectVersion()` function from the java launcher and also update the code comments in the launcher to match the current implementation? As noted in https://bugs.openjdk.org/browse/JDK-8340114, the `SelectVersion()`

Re: RFR: 8340082: Use inline return tag in java.base

2024-09-13 Thread Lance Andersen
On Fri, 13 Sep 2024 02:47:18 GMT, Joe Darcy wrote: > Candidates for this refactoring were found programmatically; the program to > find candidates is in a comment on the bug. I went through the changes and they look fine. - Marked as reviewed by lancea (Reviewer). PR Review: http

Withdrawn: 8339332: Clean up the java launcher code

2024-09-13 Thread Jaikiran Pai
On Tue, 10 Sep 2024 06:15:57 GMT, Jaikiran Pai wrote: > Can I please get a review of this change which cleans up the code in the > `java` launcher? The original motivation for the change was to prevent the > `java` launcher's C code from parsing a jar's manifest when launching an > application

Re: RFR: 8333843: Provide guidelines on MemorySegment to read strings with known lengths [v3]

2024-09-13 Thread Maurizio Cimadamore
On Fri, 13 Sep 2024 10:27:27 GMT, Per Minborg wrote: >> This PR proposes to add a new overload to `MemorySegment::getString` whereby >> it is possible to pass in a known byte length of the content in a segment >> that should be converted to a String. This is useful in case one already >> knows

Re: RFR: 8333843: Provide guidelines on MemorySegment to read strings with known lengths [v3]

2024-09-13 Thread Per Minborg
> This PR proposes to add a new overload to `MemorySegment::getString` whereby > it is possible to pass in a known byte length of the content in a segment > that should be converted to a String. This is useful in case one already > knows the byte length and thereby does not need to scan for a nu

Re: RFR: 8340082: Use inline return tag in java.base

2024-09-13 Thread Pavel Rappo
On Fri, 13 Sep 2024 02:47:18 GMT, Joe Darcy wrote: > Candidates for this refactoring were found programmatically; the program to > find candidates is in a comment on the bug. Thanks, Joe. This looks good, especially considering that the change was produced with the help of a quick-and-dirty, r

How many methods have been deprecated in sun.misc.Unsafe? (JEP 471)

2024-09-13 Thread Zheka Kozlov
Hello! JEP 471 says that 79 methods out of 87 have been deprecated in sun.misc.Unsafe. However, I have a different number. Deprecated for removal in Java 18: 1. public long objectFieldOffset(Field f) 2. public Object staticFieldBase(Field f) 3. public long staticFieldOffset(Field f) Deprecated f

Re: RFR: 8325949: Create an internal utility method for creating VarHandle instances [v2]

2024-09-13 Thread ExE Boss
On Thu, 12 Sep 2024 19:30:45 GMT, Chen Liang wrote: >> Per Minborg has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Rename and reformat > > src/java.base/share/classes/jdk/internal/reflect/MethodHandlesInternal.java > line 1: > >> 1: /*

Re: RFR: 8333843: Provide methods on MemorySegment to read strings with known lengths [v2]

2024-09-13 Thread Maurizio Cimadamore
On Thu, 12 Sep 2024 12:44:41 GMT, Per Minborg wrote: >> This PR proposes to add a new overload to `MemorySegment::getString` whereby >> it is possible to pass in a known byte length of the content in a segment >> that should be converted to a String. This is useful in case one already >> knows

  1   2   >