Re: RFR: 8355080: java.base/jdk.internal.foreign.SystemLookup.find() doesn't work on static JDK [v3]

2025-04-28 Thread Magnus Ihse Bursie
On Wed, 23 Apr 2025 00:56:18 GMT, Jiangli Zhou wrote: >> Please review this PR that changes to use `NativeLibraries.loadLibrary()` >> for loading the `libsyslookup` in `jdk.internal.foreign.SystemLookup` class. >> >> `NativeLibraries.loadLibrary()` handles both the shared library and (static)

Re: RFR: 8351996: Behavioral updates for ClassValue::remove [v9]

2025-04-28 Thread Chen Liang
> The recent patch #23866 makes calling `ClassValue::remove()` from > `ClassValue::computeValue()` end up in infinite loops while fixing the stale > value risk from the method. > > The proposed fix is to preserve the stale value risk fix, and update the > remove-from-compute behavior from the o

Re: RFR: 8355444: [java.io] Use @requires tag instead of exiting based on "os.name" property value [v4]

2025-04-28 Thread Alan Bateman
On Mon, 28 Apr 2025 16:45:01 GMT, Brian Burkhalter wrote: >> Use the `@requires` tag instead of obtaining the operating system name from >> the `os.name` property and then exiting if the test is not run on that >> operating system. > > Brian Burkhalter has updated the pull request incrementally

Re: RFR: 8350542: Optional.orElseThrow(Supplier) does not specify behavior when supplier returns null

2025-04-28 Thread Christoph Langer
On Mon, 28 Apr 2025 20:04:22 GMT, Chen Liang wrote: >> Javadoc for java.util.Optional.orElseThrow(Supplier) misses mentioning of >> another possible cause of a NullPointerException - when the exception >> supplying function returns a null result. >> - >> ### Progress >> - [x] Change mus

Integrated: 8350542: Optional.orElseThrow(Supplier) does not specify behavior when supplier returns null

2025-04-28 Thread simon
On Tue, 4 Mar 2025 16:34:19 GMT, simon wrote: > Javadoc for java.util.Optional.orElseThrow(Supplier) misses mentioning of > another possible cause of a NullPointerException - when the exception > supplying function returns a null result. > - > ### Progress > - [x] Change must be properl

Re: RFR: 8350542: Optional.orElseThrow(Supplier) does not specify behavior when supplier returns null [v2]

2025-04-28 Thread Christoph Langer
On Mon, 28 Apr 2025 22:14:29 GMT, simon wrote: >> Javadoc for java.util.Optional.orElseThrow(Supplier) misses mentioning of >> another possible cause of a NullPointerException - when the exception >> supplying function returns a null result. >> - >> ### Progress >> - [x] Change must be

Re: RFR: 8342206: Convenience method to check if a constant pool entry matches nominal descriptors [v3]

2025-04-28 Thread Chen Liang
On Fri, 25 Apr 2025 16:36:53 GMT, Chen Liang wrote: >> The ClassFile API promotes usage of constant nominal descriptors over >> literal strings. However, for `class` file parsing, currently the efficient >> way to check if a constant pool entry matches a desired descriptor is via >> unrolling

Integrated: 8342206: Convenience method to check if a constant pool entry matches nominal descriptors

2025-04-28 Thread Chen Liang
On Tue, 11 Feb 2025 02:26:57 GMT, Chen Liang wrote: > The ClassFile API promotes usage of constant nominal descriptors over literal > strings. However, for `class` file parsing, currently the efficient way to > check if a constant pool entry matches a desired descriptor is via unrolling > them

Re: RFR: 8354242: VectorAPI: combine vector not operation with compare [v3]

2025-04-28 Thread erifan
On Mon, 28 Apr 2025 14:13:43 GMT, Emanuel Peter wrote: > > > > > Just a drive-by comment for now, I may review this later more fully. > > > > > > I would also prefer if you added the IR restrictions rather than > > > > > > the JTREG requires. > > > > > > The benefit is that we can still run the

Re: RFR: 8355689: Wrong native entry name for FloatMaxVector vector math stubs with -XX:MaxVectorSize=8

2025-04-28 Thread Vladimir Kozlov
On Mon, 28 Apr 2025 19:41:28 GMT, Vladimir Ivanov wrote: > Both SVML and SLEEF libraries reuse 128-bit versions for vector of 2 floats. > Usually, only `Float64Vector` shape satisfies that condiditon, but > with`-XX:MaxVectorSize=8` `FloatMaxVector` becomes 2 element vector as well. > > Adjus

Re: RFR: 8355689: Wrong native entry name for FloatMaxVector vector math stubs with -XX:MaxVectorSize=8

2025-04-28 Thread Hao Sun
On Mon, 28 Apr 2025 19:41:28 GMT, Vladimir Ivanov wrote: > Both SVML and SLEEF libraries reuse 128-bit versions for vector of 2 floats. > Usually, only `Float64Vector` shape satisfies that condiditon, but > with`-XX:MaxVectorSize=8` `FloatMaxVector` becomes 2 element vector as well. > > Adjus

Re: RFR: 8354242: VectorAPI: combine vector not operation with compare [v2]

2025-04-28 Thread erifan
On Mon, 28 Apr 2025 14:12:02 GMT, Emanuel Peter wrote: > I suppose in that case you can assert that you NEVER get those nodes, because > if you have vectors not supported, they will not show up because of that, and > if you do support vectors, they should be optimized away. This is expected.

Re: RFR: 8354242: VectorAPI: combine vector not operation with compare [v3]

2025-04-28 Thread erifan
On Mon, 28 Apr 2025 14:10:40 GMT, Emanuel Peter wrote: >> test/hotspot/jtreg/compiler/vectorapi/VectorMaskCompareNotTest.java line 237: >> >>> 235: public static void testCompareEQMaskNotByte() { >>> 236: testCompareMaskNotByte(VectorOperators.EQ); >>> 237: } >> >> Another comme

Re: RFR: 8350542: Optional.orElseThrow(Supplier) does not specify behavior when supplier returns null

2025-04-28 Thread simon
On Mon, 28 Apr 2025 20:04:22 GMT, Chen Liang wrote: >> Javadoc for java.util.Optional.orElseThrow(Supplier) misses mentioning of >> another possible cause of a NullPointerException - when the exception >> supplying function returns a null result. >> - >> ### Progress >> - [ ] Change mus

Re: RFR: 8350542: Optional.orElseThrow(Supplier) does not specify behavior when supplier returns null [v2]

2025-04-28 Thread duke
On Mon, 28 Apr 2025 22:14:29 GMT, simon wrote: >> Javadoc for java.util.Optional.orElseThrow(Supplier) misses mentioning of >> another possible cause of a NullPointerException - when the exception >> supplying function returns a null result. >> - >> ### Progress >> - [ ] Change must be

Re: RFR: 8345431: Detect duplicate entries in jar files with jar --validate [v2]

2025-04-28 Thread Chen Liang
On Mon, 28 Apr 2025 23:40:11 GMT, Henry Jen wrote: >> This PR check the jar file to ensure entries are consistent from the central >> directory and local file header. Also check there is no duplicate entry >> names that could override the desired content by accident. > > Henry Jen has updated t

Re: RFR: 8345431: Detect duplicate entries in jar files with jar --validate [v2]

2025-04-28 Thread Henry Jen
On Fri, 4 Apr 2025 16:41:52 GMT, Lance Andersen wrote: >> Yes, in a perfect world there will be a 1 to 1 match but either way we >> should sanity check it in case something happened > >> Is the ordering required by ZIP or Jar format? We can certainly do that if >> that's under spec and not an i

Re: RFR: 8345431: Detect duplicate entries in jar files with jar --validate [v2]

2025-04-28 Thread Henry Jen
> This PR check the jar file to ensure entries are consistent from the central > directory and local file header. Also check there is no duplicate entry names > that could override the desired content by accident. Henry Jen has updated the pull request with a new target base due to a merge or a

Re: RFR: 8350542: Optional.orElseThrow(Supplier) does not specify behavior when supplier returns null [v2]

2025-04-28 Thread Chen Liang
On Mon, 28 Apr 2025 22:14:29 GMT, simon wrote: >> Javadoc for java.util.Optional.orElseThrow(Supplier) misses mentioning of >> another possible cause of a NullPointerException - when the exception >> supplying function returns a null result. >> - >> ### Progress >> - [ ] Change must be

Re: RFR: 8355249: Remove the use of WMIC from the entire source code [v2]

2025-04-28 Thread Erik Joelsson
On Mon, 28 Apr 2025 20:08:00 GMT, Magnus Ihse Bursie wrote: > Are we sure powershell is always installed on Windows? I verified by running tests on all the Windows versions we use internally and looked at the calculated concurrency in RunTest.gmk. If we didn't get a number for memory I believe

Re: RFR: 8355080: java.base/jdk.internal.foreign.SystemLookup.find() doesn't work on static JDK [v3]

2025-04-28 Thread Jorn Vernee
On Mon, 28 Apr 2025 08:30:43 GMT, Maurizio Cimadamore wrote: >> Jiangli Zhou has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - Merge branch 'JDK-8355080' of ssh://github.com/jianglizhou/jdk into >> JDK-8355080 >> - Address henryjen@ c

Re: RFR: 8354996: Reduce dynamic code generation for a single downcall [v2]

2025-04-28 Thread Jorn Vernee
On Mon, 28 Apr 2025 14:23:53 GMT, Chen Liang wrote: >> That was from the past attempt of linking Class forName0. Tge exact shape >> doesn't really matter here as we are mainly saving on DMH. > > Can I just change this signature to `FunctionDescriptor.ofVoid()`? Ok, that makes sense. I suppose i

Re: RFR: 8354996: Reduce dynamic code generation for a single downcall [v3]

2025-04-28 Thread Jorn Vernee
On Mon, 28 Apr 2025 14:36:33 GMT, Chen Liang wrote: >> Perf numbers for simple main: >> Linking of `Class::forName0` down from ~152 to ~83 >> >> For calling little color management system >> https://bugs.openjdk.org/browse/JDK-8313344: >> JNI: ~45 >> baseline panama: ~164 >> patch: ~103 >> >>

Re: RFR: 8350542: Optional.orElseThrow(Supplier) does not specify behavior when supplier returns null

2025-04-28 Thread simon
On Mon, 28 Apr 2025 20:04:22 GMT, Chen Liang wrote: >> Javadoc for java.util.Optional.orElseThrow(Supplier) misses mentioning of >> another possible cause of a NullPointerException - when the exception >> supplying function returns a null result. >> - >> ### Progress >> - [ ] Change mus

Re: RFR: 8355689: Wrong native entry name for FloatMaxVector vector math stubs with -XX:MaxVectorSize=8

2025-04-28 Thread Paul Sandoz
On Mon, 28 Apr 2025 19:41:28 GMT, Vladimir Ivanov wrote: > Both SVML and SLEEF libraries reuse 128-bit versions for vector of 2 floats. > Usually, only `Float64Vector` shape satisfies that condiditon, but > with`-XX:MaxVectorSize=8` `FloatMaxVector` becomes 2 element vector as well. > > Adjus

Re: RFR: 8347471: Provide valid flags and mask in AccessFlag.Location [v10]

2025-04-28 Thread Chen Liang
> Some AccessFlag parsing methods throw IAE because a flag mask is not valid in > a location. However, there is no easy way to check what flag mask bits or > what flags are valid for a location. We need such APIs to check, specific to > each class file format version. > > Also in the investigat

Re: RFR: 8350542: Optional.orElseThrow(Supplier) does not specify behavior when supplier returns null [v2]

2025-04-28 Thread simon
> Javadoc for java.util.Optional.orElseThrow(Supplier) misses mentioning of > another possible cause of a NullPointerException - when the exception > supplying function returns a null result. > - > ### Progress > - [ ] Change must be properly reviewed (1 review required, with at least 1

Re: RFR: 8347471: Provide valid flags and mask in AccessFlag.Location [v9]

2025-04-28 Thread Chen Liang
On Mon, 28 Apr 2025 21:48:40 GMT, Roger Riggs wrote: >> Chen Liang has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Wording updates, thanks Roger > > src/java.base/share/classes/java/lang/reflect/AccessFlag.java line 342: > >> 340: /

Re: RFR: 8350542: Optional.orElseThrow(Supplier) does not specify behavior when supplier returns null

2025-04-28 Thread Roger Riggs
On Tue, 4 Mar 2025 16:34:19 GMT, simon wrote: > Javadoc for java.util.Optional.orElseThrow(Supplier) misses mentioning of > another possible cause of a NullPointerException - when the exception > supplying function returns a null result. > - > ### Progress > - [ ] Change must be properl

Re: RFR: 8347471: Provide valid flags and mask in AccessFlag.Location [v9]

2025-04-28 Thread Roger Riggs
On Mon, 28 Apr 2025 20:20:28 GMT, Chen Liang wrote: >> Some AccessFlag parsing methods throw IAE because a flag mask is not valid >> in a location. However, there is no easy way to check what flag mask bits or >> what flags are valid for a location. We need such APIs to check, specific to >> e

Integrated: 8354335: No longer deprecate wrapper class constructors for removal

2025-04-28 Thread Roger Riggs
On Thu, 10 Apr 2025 22:05:04 GMT, Roger Riggs wrote: > Remove forRemoval = true from @Deprecated annotation of Boolean, Byte, > Character, Double, Float, Integer, Long, Short. > And add `SuppressWarnings("deprecation") `where needed; and remove > `SuppressWarnings("removal")` This pull request

Re: RFR: 8350542: Optional.orElseThrow(Supplier) does not specify behavior when supplier returns null

2025-04-28 Thread simon
On Wed, 26 Mar 2025 00:21:38 GMT, Chen Liang wrote: >> Javadoc for java.util.Optional.orElseThrow(Supplier) misses mentioning of >> another possible cause of a NullPointerException - when the exception >> supplying function returns a null result. >> - >> ### Progress >> - [ ] Change mus

Re: RFR: 8350542: Optional.orElseThrow(Supplier) does not specify behavior when supplier returns null

2025-04-28 Thread simon
On Mon, 28 Apr 2025 14:32:59 GMT, Christoph Langer wrote: >> Thank you all for the help. Let's wait for the OCA verify process. Happy to >> contribute to Java. 😀 > > @gustavosimon Now the oca seems to be approved and the CSR is progressing. > Can you update your change to match the exact specif

Re: RFR: 8350542: Optional.orElseThrow(Supplier) does not specify behavior when supplier returns null

2025-04-28 Thread Christoph Langer
On Tue, 4 Mar 2025 16:34:19 GMT, simon wrote: > Javadoc for java.util.Optional.orElseThrow(Supplier) misses mentioning of > another possible cause of a NullPointerException - when the exception > supplying function returns a null result. > - > ### Progress > - [ ] Change must be properl

Re: RFR: 8350542: Optional.orElseThrow(Supplier) does not specify behavior when supplier returns null

2025-04-28 Thread Christoph Langer
On Fri, 18 Apr 2025 18:31:41 GMT, simon wrote: >> Javadoc for java.util.Optional.orElseThrow(Supplier) misses mentioning of >> another possible cause of a NullPointerException - when the exception >> supplying function returns a null result. >> - >> ### Progress >> - [ ] Change must be

Re: RFR: 8350542: Optional.orElseThrow(Supplier) does not specify behavior when supplier returns null

2025-04-28 Thread Chen Liang
On Tue, 4 Mar 2025 16:34:19 GMT, simon wrote: > Javadoc for java.util.Optional.orElseThrow(Supplier) misses mentioning of > another possible cause of a NullPointerException - when the exception > supplying function returns a null result. > - > ### Progress > - [ ] Change must be properl

Re: RFR: 8350542: Optional.orElseThrow(Supplier) does not specify behavior when supplier returns null

2025-04-28 Thread simon
On Tue, 4 Mar 2025 16:45:22 GMT, simon wrote: > @robilad As you asked, I have already sent you an e-mail verify my OCA. I > will need for this PR. Cheers, looking forward! 😀 @robilad Any luck into this matter? - PR Comment: https://git.openjdk.org/jdk/pull/23905#issuecomment-27527

Re: RFR: 8350542: Optional.orElseThrow(Supplier) does not specify behavior when supplier returns null

2025-04-28 Thread simon
On Tue, 4 Mar 2025 16:34:19 GMT, simon wrote: > Javadoc for java.util.Optional.orElseThrow(Supplier) misses mentioning of > another possible cause of a NullPointerException - when the exception > supplying function returns a null result. > - > ### Progress > - [ ] Change must be properl

RFR: 8350542: Optional.orElseThrow(Supplier) does not specify behavior when supplier returns null

2025-04-28 Thread simon
Javadoc for java.util.Optional.orElseThrow(Supplier) misses mentioning of another possible cause of a NullPointerException - when the exception supplying function returns a null result. - ### Progress - [ ] Change must be properly reviewed (1 review required, with at least 1 [Reviewer](h

Re: RFR: 8354897: Support Soft/Weak Reference in AOT cache [v4]

2025-04-28 Thread Ioi Lam
On Mon, 28 Apr 2025 12:51:13 GMT, Dan Heidinga wrote: >> In my mind, `MethodType::prepareForAOTCache()` makes sure all data used by >> `MethodType` are ready to be cached. `ReferenceKeySet::prepareForAOTCache()` >> does the same for this particular `ReferenceKeySet` instance. >> >> Potentially

RFR: 8355775: Improve symbolic sharing in dynamic constant pool entries

2025-04-28 Thread Chen Liang
Some dynamic constant pool entries with heavy symbolic descriptors currently don't share them, yet they are used by stack map generation, and computing a new descriptor every time introduces a heavy cost. This cost is obvious if bytecode generation uses constant dynamic - the stack map generato

Re: RFR: 8347471: Provide valid flags and mask in AccessFlag.Location [v9]

2025-04-28 Thread Chen Liang
On Mon, 28 Apr 2025 20:20:28 GMT, Chen Liang wrote: >> Some AccessFlag parsing methods throw IAE because a flag mask is not valid >> in a location. However, there is no easy way to check what flag mask bits or >> what flags are valid for a location. We need such APIs to check, specific to >> e

Re: RFR: 8347471: Provide valid flags and mask in AccessFlag.Location [v9]

2025-04-28 Thread Chen Liang
> Some AccessFlag parsing methods throw IAE because a flag mask is not valid in > a location. However, there is no easy way to check what flag mask bits or > what flags are valid for a location. We need such APIs to check, specific to > each class file format version. > > Also in the investigat

Re: RFR: 8355249: Remove the use of WMIC from the entire source code [v2]

2025-04-28 Thread Magnus Ihse Bursie
On Tue, 22 Apr 2025 07:41:43 GMT, Daishi Tabata wrote: >> After searching the entire JDK source code, I found that WMIC is only used >> in four files. These WMIC calls can be replaced with PowerShell for WMI. >> >> The primary challenge in this replacement is to make it work the same as >> bef

Re: RFR: 8347471: Provide valid flags and mask in AccessFlag.Location [v8]

2025-04-28 Thread Chen Liang
On Mon, 28 Apr 2025 19:56:23 GMT, Roger Riggs wrote: >> Chen Liang has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Fix iterator missing NSEE > > src/java.base/share/classes/java/lang/reflect/AccessFlag.java line 634: > >> 632:

Re: RFR: 8347471: Provide valid flags and mask in AccessFlag.Location [v8]

2025-04-28 Thread Roger Riggs
On Sat, 26 Apr 2025 19:44:02 GMT, Chen Liang wrote: >> Some AccessFlag parsing methods throw IAE because a flag mask is not valid >> in a location. However, there is no easy way to check what flag mask bits or >> what flags are valid for a location. We need such APIs to check, specific to >> e

RFR: 8355689: Wrong native entry name for FloatMaxVector vector math stubs with -XX:MaxVectorSize=8

2025-04-28 Thread Vladimir Ivanov
Both SVML and SLEEF libraries reuse 128-bit versions for vector of 2 floats. Usually, only `Float64Vector` shape satisfies that condiditon, but with`-XX:MaxVectorSize=8` `FloatMaxVector` becomes 2 element vector as well. Adjust the relevant logic to match vector of 2 floats shape structurally.

Re: RFR: 8355726: LinkedBlockingDeque fixes and improvements

2025-04-28 Thread Viktor Klang
On Mon, 28 Apr 2025 15:33:50 GMT, kabutz wrote: >> We logged several bugs on the LinkedBlockingDeque. This aggregates them into >> a single bug report and PR. >> >> 1. LinkedBlockingDeque does not immediately throw InterruptedException in >> put/take >> >> The LinkedBlockingDeque does not beh

Re: RFR: 8355080: java.base/jdk.internal.foreign.SystemLookup.find() doesn't work on static JDK [v3]

2025-04-28 Thread Magnus Ihse Bursie
On Mon, 28 Apr 2025 08:30:43 GMT, Maurizio Cimadamore wrote: >> Jiangli Zhou has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - Merge branch 'JDK-8355080' of ssh://github.com/jianglizhou/jdk into >> JDK-8355080 >> - Address henryjen@ c

Re: RFR: 8355632: WhiteBox.waitForReferenceProcessing() fails assert for return type [v2]

2025-04-28 Thread Brent Christian
On Sat, 26 Apr 2025 09:22:30 GMT, Kim Barrett wrote: >> test/hotspot/jtreg/vmTestbase/gc/gctests/ReferencesGC/WaitForRefProTest.java >> line 1: >> >>> 1: /* >> >> Wrong place for this test. vmTestbase is old tests, converted from an old >> testing infrastructure. >> See the readme here: >>

Re: RFR: 8355632: WhiteBox.waitForReferenceProcessing() fails assert for return type [v2]

2025-04-28 Thread Brent Christian
> The newly-added `WhiteBox.waitForReferenceProcessing()` (see > [8305186](https://bugs.openjdk.org/browse/JDK-8305186)) always fails with > assertions enabled. > I've updated the assertion, and also added the test I used locally to test > the new method (just not with assertions enabled, appare

Re: RFR: 8355080: java.base/jdk.internal.foreign.SystemLookup.find() doesn't work on static JDK [v3]

2025-04-28 Thread Jiangli Zhou
On Mon, 28 Apr 2025 08:30:43 GMT, Maurizio Cimadamore wrote: >> Jiangli Zhou has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - Merge branch 'JDK-8355080' of ssh://github.com/jianglizhou/jdk into >> JDK-8355080 >> - Address henryjen@ c

Re: RFR: 8349910: Implement HTTP/3 for the HTTP Client API [v2]

2025-04-28 Thread Sean Mullan
On Wed, 23 Apr 2025 13:07:31 GMT, Artur Barashev wrote: >> A lot of (existing) HttpClient tests in `test/jdk/java/net/httpclient` >> currently use this `SimpleSSLContext` construct to read the `testkeys` >> keystore that's available in the JDK repo's test directory. Moving to a >> dynamically

Re: RFR: 8349910: Implement HTTP/3 for the HTTP Client API [v2]

2025-04-28 Thread Sean Mullan
On Thu, 24 Apr 2025 16:59:45 GMT, Daniel Fuchs wrote: >> Hi, >> >> Please find here a PR for the implementation of JEP [JDK-8291976: HTTP/3 for >> the HTTP Client API](https://bugs.openjdk.org/browse/JDK-8291976). >> >> The CSR can be viewed at [JDK-8350588: Implement HTTP/3 for the HTTP Clien

Re: RFR: 8355632: WhiteBox.waitForReferenceProcessing() fails assert for return type

2025-04-28 Thread Brent Christian
On Sat, 26 Apr 2025 00:10:04 GMT, Stuart Marks wrote: >> The newly-added `WhiteBox.waitForReferenceProcessing()` (see >> [8305186](https://bugs.openjdk.org/browse/JDK-8305186)) always fails with >> assertions enabled. >> I've updated the assertion, and also added the test I used locally to test

Integrated: 8355080: java.base/jdk.internal.foreign.SystemLookup.find() doesn't work on static JDK

2025-04-28 Thread Jiangli Zhou
On Tue, 22 Apr 2025 21:08:56 GMT, Jiangli Zhou wrote: > Please review this PR that changes to use `NativeLibraries.loadLibrary()` for > loading the `libsyslookup` in `jdk.internal.foreign.SystemLookup` class. > > `NativeLibraries.loadLibrary()` handles both the shared library and (static) > bu

Re: RFR: 8355080: java.base/jdk.internal.foreign.SystemLookup.find() doesn't work on static JDK [v3]

2025-04-28 Thread Jiangli Zhou
On Mon, 28 Apr 2025 13:04:57 GMT, Jorn Vernee wrote: > > Having to upgrade to JNI is a bit sad -- although I get that it is required > > as a workaround for now. For the longer term I'd prefer a better way to > > integrate static lookups in the FFM API. For instance, all > > `JNI::loadLibrary`

Re: RFR: 8355444: [java.io] Use @requires tag instead of exiting based on "os.name" property value [v4]

2025-04-28 Thread Mark Sheppard
On Mon, 28 Apr 2025 17:22:36 GMT, Brian Burkhalter wrote: > > Brian created https://bugs.openjdk.org/browse/CODETOOLS-7903996 to have the > > JTREG reporting improved > > Yes, and this comment was added to that issue since then > > "Please note the work having been done in > https://bugs.open

Integrated: 8354053: Remove unused JavaIOFilePermissionAccess

2025-04-28 Thread Roger Riggs
On Fri, 11 Apr 2025 21:26:08 GMT, Roger Riggs wrote: > The JavaIOFilePermissionAccess interface is removed from SharedSecrets and > its implementation (FilePermCompat.java) used by the test is moved to java.io > FilePermission where cross package access is not needed. > The test FilePermission

Re: RFR: 8355444: [java.io] Use @requires tag instead of exiting based on "os.name" property value [v4]

2025-04-28 Thread Brian Burkhalter
On Mon, 28 Apr 2025 17:08:02 GMT, Lance Andersen wrote: > Brian created https://bugs.openjdk.org/browse/CODETOOLS-7903996 to have the > JTREG reporting improved Yes, and this comment was added to that issue since then "Please note the work having been done in https://bugs.openjdk.org/browse/J

Re: RFR: 8355444: [java.io] Use @requires tag instead of exiting based on "os.name" property value [v4]

2025-04-28 Thread Lance Andersen
On Mon, 28 Apr 2025 17:03:10 GMT, Roger Riggs wrote: > There are lots of tests using @requires to only run on relevant > configurations. If there needs to be more complete accounting of tests not > run on each platform, it belongs as a feature in jtreg. Switching to use > SkippedException in s

Re: RFR: 8355719: Reduce memory consumption of BigInteger.pow() [v40]

2025-04-28 Thread Raffaello Giulietti
On Mon, 28 Apr 2025 16:48:49 GMT, fabioromano1 wrote: >> This PR optimizes `BigInteger.pow(int)` method. The primary enhancement in >> `pow()` is not concerned most on execution time, but rather in memory >> optimization, because the PR implementation does the "shift of the exponent" >> squari

Re: RFR: 8355444: [java.io] Use @requires tag instead of exiting based on "os.name" property value [v4]

2025-04-28 Thread Roger Riggs
On Mon, 28 Apr 2025 16:45:01 GMT, Brian Burkhalter wrote: >> Use the `@requires` tag instead of obtaining the operating system name from >> the `os.name` property and then exiting if the test is not run on that >> operating system. > > Brian Burkhalter has updated the pull request incrementally

Re: RFR: 8355719: Reduce memory consumption of BigInteger.pow() [v19]

2025-04-28 Thread fabioromano1
On Mon, 28 Apr 2025 14:08:02 GMT, Raffaello Giulietti wrote: >>> * Performance enhancements in `pow()`, which is of general interest and >>> does not require submitting a >>> [CSR](https://wiki.openjdk.org/display/csr/Main). >> >> @rgiulietti Yes, but here, the primary enhancement in `pow()`

Re: RFR: 8355719: Reduce memory consumption of BigInteger.pow() [v40]

2025-04-28 Thread fabioromano1
> This PR optimizes `BigInteger.pow(int)` method. The primary enhancement in > `pow()` is not concerned most on execution time, but rather in memory > optimization, because the PR implementation does the "shift of the exponent" > squaring the result rather than the base, so the base is not squar

Re: RFR: 8355444: [java.io] Use @requires tag instead of exiting based on "os.name" property value [v4]

2025-04-28 Thread Jaikiran Pai
On Mon, 28 Apr 2025 16:45:01 GMT, Brian Burkhalter wrote: >> Use the `@requires` tag instead of obtaining the operating system name from >> the `os.name` property and then exiting if the test is not run on that >> operating system. > > Brian Burkhalter has updated the pull request incrementally

Re: RFR: 8355444: [java.io] Use @requires tag instead of exiting based on "os.name" property value [v2]

2025-04-28 Thread Brian Burkhalter
On Mon, 28 Apr 2025 16:23:16 GMT, Jaikiran Pai wrote: > then maybe consider adding jtreg's `@comment` in the test Added in fb9f0c5. - PR Review Comment: https://git.openjdk.org/jdk/pull/24860#discussion_r2064072161

Re: RFR: 8355444: [java.io] Use @requires tag instead of exiting based on "os.name" property value [v4]

2025-04-28 Thread Brian Burkhalter
> Use the `@requires` tag instead of obtaining the operating system name from > the `os.name` property and then exiting if the test is not run on that > operating system. Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision: 8355444:

Re: RFR: 8355444: [java.io] Use @requires tag instead of exiting based on "os.name" property value [v3]

2025-04-28 Thread Brian Burkhalter
> Use the `@requires` tag instead of obtaining the operating system name from > the `os.name` property and then exiting if the test is not run on that > operating system. Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision: 8355444:

Re: RFR: 8355444: [java.io] Use @requires tag instead of exiting based on "os.name" property value [v2]

2025-04-28 Thread Jaikiran Pai
On Fri, 25 Apr 2025 16:50:42 GMT, Brian Burkhalter wrote: >> Use the `@requires` tag instead of obtaining the operating system name from >> the `os.name` property and then exiting if the test is not run on that >> operating system. > > Brian Burkhalter has updated the pull request incrementally

Re: RFR: 8355444: [java.io] Use @requires tag instead of exiting based on "os.name" property value [v2]

2025-04-28 Thread Jaikiran Pai
On Fri, 25 Apr 2025 16:50:42 GMT, Brian Burkhalter wrote: >> Use the `@requires` tag instead of obtaining the operating system name from >> the `os.name` property and then exiting if the test is not run on that >> operating system. > > Brian Burkhalter has updated the pull request incrementally

Re: RFR: 8355444: [java.io] Use @requires tag instead of exiting based on "os.name" property value

2025-04-28 Thread Brian Burkhalter
On Fri, 25 Apr 2025 10:25:02 GMT, Mark Sheppard wrote: > test/jdk/java/io/File/MacPathTest.java test/jdk/java/io/File/MaxPath.java > > maybe for these two cases, throw a SkippedException rather than just return ? `MacPathTest` is run by `MacPath` in a `ProcessBuilder` so there is really no cha

Re: RFR: 8355558: SJIS.java test is always ignored [v2]

2025-04-28 Thread Naoto Sato
On Fri, 25 Apr 2025 19:41:54 GMT, Naoto Sato wrote: >> Stemmed from this PR: https://github.com/openjdk/jdk/pull/24838 >> After JEP 400, `file.encoding` is always UTF-8, so the test was never run. >> Using `native.encoding` is appropriate so that the intention of the initial >> test will hold.

Integrated: 8355558: SJIS.java test is always ignored

2025-04-28 Thread Naoto Sato
On Fri, 25 Apr 2025 17:02:30 GMT, Naoto Sato wrote: > Stemmed from this PR: https://github.com/openjdk/jdk/pull/24838 > After JEP 400, `file.encoding` is always UTF-8, so the test was never run. > Using `native.encoding` is appropriate so that the intention of the initial > test will hold. Test

Re: RFR: 8351996: Behavioral updates for ClassValue::remove [v2]

2025-04-28 Thread Viktor Klang
On Mon, 28 Apr 2025 04:29:40 GMT, Chen Liang wrote: >> Hello Chen, not a review of the code, but the tier1 failures in the GitHub >> actions jobs look related: >> >> >> java.lang.StackOverflowError: Recursive initialization of class value >> at >> java.base/java.lang.ClassValue$Entry.reg

Re: [External] : Re: Casting gatherer

2025-04-28 Thread Viktor Klang
In this case, it is rather straight-forward to experiment—given Gatherers—and be able to make progress on ergonomics without waiting for the standard library to offer a built-in. Cheers, √ Viktor Klang Software Architect, Java Platform Group Oracle From: Nir L

RFR: 8354475: TestDockerMemoryMetricsSubgroup.java fails with exitValue = 1

2025-04-28 Thread PAWAN CHAWDHARY
8354475: TestDockerMemoryMetricsSubgroup.java fails with exitValue = 1 - Commit messages: - 8354475: TestDockerMemoryMetricsSubgroup.java fails with exitValue = 1 Changes: https://git.openjdk.org/jdk/pull/24930/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24930&range=00

Re: RFR: 8354475: TestDockerMemoryMetricsSubgroup.java fails with exitValue = 1

2025-04-28 Thread PAWAN CHAWDHARY
On Mon, 28 Apr 2025 15:51:44 GMT, PAWAN CHAWDHARY wrote: > 8354475: TestDockerMemoryMetricsSubgroup.java fails with exitValue = 1 TestDockerMemoryMetricsSubgroup.java creates directory under /sys/fs/cgroup by running following command for this test needs to be run as root mode `mkdir -p /sys/fs

Re: RFR: 8342486: Implement JEP 505: Structured Concurrency (Fifth Preview) [v10]

2025-04-28 Thread Alan Bateman
> Changes for [JEP 505: Structured Concurrency (Fifth > Preview)](https://openjdk.org/jeps/8340343). The proposal is to re-preview > the API with some changes, specifically: > > - A > [StructuredTaskScope](https://download.java.net/java/early_access/loom/docs/api/java.base/java/util/concurrent/

Re: RFR: 8355726: LinkedBlockingDeque fixes and improvements

2025-04-28 Thread kabutz
On Mon, 28 Apr 2025 15:23:18 GMT, kabutz wrote: > We logged several bugs on the LinkedBlockingDeque. This aggregates them into > a single bug report and PR. > > 1. LinkedBlockingDeque does not immediately throw InterruptedException in > put/take > > The LinkedBlockingDeque does not behave con

RFR: 8355726: LinkedBlockingDeque fixes and improvements

2025-04-28 Thread kabutz
We logged several bugs on the LinkedBlockingDeque. This aggregates them into a single bug report and PR. 1. LinkedBlockingDeque does not immediately throw InterruptedException in put/take The LinkedBlockingDeque does not behave consistently with other concurrency components. If we call putFirs

Re: RFR: 8355719: Reduce memory consumption of BigInteger.pow() [v39]

2025-04-28 Thread fabioromano1
> This PR optimizes `BigInteger.pow(int)` method. The primary enhancement in > `pow()` is not concerned most on execution time, but rather in memory > optimization, because the PR implementation does the "shift of the exponent" > squaring the result rather than the base, so the base is not squar

Re: RFR: 8348986: Improve coverage of enhanced exception messages [v8]

2025-04-28 Thread Alan Bateman
On Fri, 25 Apr 2025 14:26:43 GMT, Michael McMahon wrote: >> Hi, >> >> Enhanced exception messages are designed to hide sensitive information such >> as hostnames, IP >> addresses from exception message strings, unless the enhanced mode for the >> specific category >> has been explicitly enab

Re: RFR: 8354996: Reduce dynamic code generation for a single downcall [v2]

2025-04-28 Thread Chen Liang
On Mon, 28 Apr 2025 13:50:17 GMT, Chen Liang wrote: >> make/jdk/src/classes/build/tools/classlist/HelloClasslist.java line 184: >> >>> 182: ADDRESS, ADDRESS, ADDRESS, >>> 183: JAVA_BOOLEAN, ADDRESS, ADDRESS); >>> 184: Linker.nativeLinker().downcallHandle(s

Re: RFR: 8354996: Reduce dynamic code generation for a single downcall [v3]

2025-04-28 Thread Chen Liang
> Perf numbers for simple main: > Linking of `Class::forName0` down from ~152 to ~83 > > For calling little color management system > https://bugs.openjdk.org/browse/JDK-8313344: > JNI: ~45 > baseline panama: ~164 > patch: ~103 > > Also see #24705. Chen Liang has updated the pull request with a

Re: RFR: 8355719: Reduce memory consumption of BigInteger.pow() [v38]

2025-04-28 Thread fabioromano1
On Mon, 28 Apr 2025 14:27:00 GMT, Chen Liang wrote: > In this case you can still use computePower and remove the branching to check > if double arithmetic should be used - you are passing the cache array, so you > can control what is the initial values in that array. Yes, but if I have to chec

Re: RFR: 8355719: Reduce memory consumption of BigInteger.pow() [v38]

2025-04-28 Thread Chen Liang
On Mon, 28 Apr 2025 14:18:34 GMT, fabioromano1 wrote: >> Doesn't pre-seeding involve extra cpu cycles which are defintely wasted if >> the results aren't used? > >> Doesn't pre-seeding involve extra cpu cycles which are defintely wasted if >> the results aren't used? > > It would involve just

Re: RFR: 8355719: Reduce memory consumption of BigInteger.pow() [v38]

2025-04-28 Thread fabioromano1
On Mon, 28 Apr 2025 14:12:29 GMT, Chen Liang wrote: > Doesn't pre-seeding involve extra cpu cycles which are defintely wasted if > the results aren't used? It would involve just 3 assignments and 3 multiplications of 64-bit words, I think the overhead is negligible. - PR Review C

Re: RFR: 8354242: VectorAPI: combine vector not operation with compare [v3]

2025-04-28 Thread Emanuel Peter
On Mon, 28 Apr 2025 14:06:49 GMT, Emanuel Peter wrote: >> erifan 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 four additional commits since >

Re: RFR: 8355658: Allow transforms to run on elements generated by a builder

2025-04-28 Thread Chen Liang
On Mon, 28 Apr 2025 01:43:32 GMT, Chen Liang wrote: > Transforms can run on a stream of class file elements. Currently, that stream > can only be from a CompoundElement. We can allow a ClassFileBuilder to > provide such a stream too; a recent request > https://mail.openjdk.org/pipermail/classf

Withdrawn: 8355658: Allow transforms to run on elements generated by a builder

2025-04-28 Thread Chen Liang
On Mon, 28 Apr 2025 01:43:32 GMT, Chen Liang wrote: > Transforms can run on a stream of class file elements. Currently, that stream > can only be from a CompoundElement. We can allow a ClassFileBuilder to > provide such a stream too; a recent request > https://mail.openjdk.org/pipermail/classf

Re: RFR: 8354242: VectorAPI: combine vector not operation with compare [v2]

2025-04-28 Thread Emanuel Peter
On Mon, 28 Apr 2025 07:46:14 GMT, erifan wrote: >> I would also prefer if you added the IR restrictions rather than the JTREG >> requires. >> The benefit is that we can still run the tests on all platforms, at least >> for result verification. >> >> Imagine someone adds optimizations to a new

Re: RFR: 8354242: VectorAPI: combine vector not operation with compare [v3]

2025-04-28 Thread Emanuel Peter
On Mon, 28 Apr 2025 09:51:10 GMT, erifan wrote: > > > > Just a drive-by comment for now, I may review this later more fully. > > > > > I would also prefer if you added the IR restrictions rather than the > > > > > JTREG requires. > > > > > The benefit is that we can still run the tests on all pl

Re: RFR: 8355719: Reduce memory consumption of BigInteger.pow() [v38]

2025-04-28 Thread Chen Liang
On Mon, 28 Apr 2025 07:29:10 GMT, fabioromano1 wrote: >> src/java.base/share/classes/java/math/BigInteger.java line 2746: >> >>> 2744: if (exp <= maxExp) { >>> 2745: // don't use fp arithmetic if exp <= 3 >>> 2746: xToExp = exp == 1 ? x : >> >> What a

Re: RFR: 4837946: Faster multiplication and exponentiation of large integers [v19]

2025-04-28 Thread Raffaello Giulietti
On Thu, 24 Apr 2025 20:18:42 GMT, fabioromano1 wrote: >> @fabioromano1 I just had a cursory glance at this PR. >> >> AFAIU, there are two main contributions here: >> >> - Performance enhancements in `pow()`, which is of general interest and does >> not require submitting a [CSR](https://wiki.o

Re: RFR: 8354242: VectorAPI: combine vector not operation with compare [v3]

2025-04-28 Thread Emanuel Peter
On Fri, 25 Apr 2025 07:24:15 GMT, erifan wrote: >> This patch optimizes the following patterns: >> For integer types: >> >> (XorV (VectorMaskCmp src1 src2 cond) (Replicate -1)) >> => (VectorMaskCmp src1 src2 ncond) >> (XorVMask (VectorMaskCmp src1 src2 cond) (MaskAll m1)) >> => (VectorMa

Re: RFR: 8341275: Explicit counter support for Code attribute building [v2]

2025-04-28 Thread Chen Liang
On Sun, 27 Apr 2025 03:38:35 GMT, Chen Liang wrote: >> Internal explicit counter support for Code max_stack and max_locals has been >> already added in #24807. Since that example works well, we may consider >> opening this functionality up to general users under strict restrictions. >> >> This

Re: RFR: 8351565: Implement JEP 502: Stable Values (Preview) [v33]

2025-04-28 Thread Jorn Vernee
On Mon, 28 Apr 2025 11:29:46 GMT, Maurizio Cimadamore wrote: >> Yeah, that was what I was thinking too. > > Note - the JEP uses the word `content` (which has, I think, been "vetted"). > So I believe it would be ok (and, preferrable) to leave it as is. Unless you > are suggesting to also update

Re: RFR: 8351996: Behavioral updates for ClassValue::remove [v8]

2025-04-28 Thread Jaikiran Pai
On Mon, 28 Apr 2025 04:12:03 GMT, Chen Liang wrote: >> The recent patch #23866 makes calling `ClassValue::remove()` from >> `ClassValue::computeValue()` end up in infinite loops while fixing the stale >> value risk from the method. >> >> The proposed fix is to preserve the stale value risk fix

Re: RFR: 8354996: Reduce dynamic code generation for a single downcall [v2]

2025-04-28 Thread Chen Liang
On Mon, 28 Apr 2025 13:40:47 GMT, Jorn Vernee wrote: >> Chen Liang has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Simplify FFM linker warmup > > make/jdk/src/classes/build/tools/classlist/HelloClasslist.java line 184: > >> 182:

  1   2   >