Re: RFR: 8355636: Reuse StringBuilder in printStackTrace [v7]

2025-04-28 Thread Per Minborg
On Sat, 26 Apr 2025 22:42:08 GMT, Shaojin Wen wrote: >> In the Throwable::printStackTrace method, StringBuilder is created multiple >> times to build String. By sharing StringBuilder to build String, object >> allocation and copying are reduced. >> >> In the scenario without suppressed and our

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

2025-04-28 Thread fabioromano1
On Mon, 28 Apr 2025 00:09:28 GMT, Johannes Graham wrote: > What about pre-seeding the cache with values for 1, 2 and 3? That would allow > unconditionally using fp here (and below) It's a good idea, but doing so would increase the already high dependence of `computePower()` by the precondition

Re: Casting gatherer

2025-04-28 Thread Nir Lisker
Hi Viktor, stream.filter(myClass:isInstance).map(myClass:cast) is indeed the current way of doing it. I've written this code many times and I suspect others have too. An extracted version might reside in many utility classes. This is why I suggested having a Gatherer for it in Gatherers. I've wri

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

2025-04-28 Thread Maurizio Cimadamore
On Wed, 23 Apr 2025 07:38:00 GMT, Viktor Klang wrote: >> I asked around/looked this up, and it seems 'contents' would be more correct >> here, since a StableValue is primarily a container of things (you put things >> into it, get things out). > > Yeah, that was what I was thinking too. Note -

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 [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 [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

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: [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

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: 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 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: 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: 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: 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: 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: 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

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: 8344706: Implement JEP 512: Compact Source Files and Instance Main Methods [v6]

2025-04-28 Thread Jan Lahoda
> This is a PR that implements JEP: Compact Source Files and Instance Main > Methods. Changes include: > - `java.io.IO` moved to `java.lang.IO`, and no longer uses `System.console()` > to implement the methods (thanks to @stuart-marks) > - `java. ... .IO` is no longer automatically imported in an

Re: RFR: 8342283: CDS cannot handle a large number of classes [v2]

2025-04-28 Thread Aleksey Shipilev
> CDS cannot handle large number of classes, because `ClassLoader` data > structures get too large for CDS archival. The new test captures such an > occasion. We do `clear()`-s, but that is not enough to trim the backing > storages for the affected collections. > > In contrast with previous att

Re: Casting gatherer

2025-04-28 Thread Viktor Klang
The challenge here is that there is no, current, reification of a pattern application, so all it boils down to at this point is: given a Predicate for some type T, make a cast to some unrelated type R. For Class-based retention of elements, it is possible to do the equivalent of testing Class::

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

2025-04-28 Thread Emanuel Peter
On Mon, 28 Apr 2025 07:48:58 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 platforms, at leas

Re: RFR: 8342283: CDS cannot handle a large number of classes [v2]

2025-04-28 Thread Aleksey Shipilev
On Sun, 27 Apr 2025 20:32:24 GMT, Andrey Turbanov wrote: >> Aleksey Shipilev 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 >>

Re: RFR: 8342283: CDS cannot handle a large number of classes [v2]

2025-04-28 Thread Aleksey Shipilev
On Fri, 25 Apr 2025 20:54:21 GMT, John R Rose wrote: >> Aleksey Shipilev 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 >> comm

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

2025-04-28 Thread Adam Sotona
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: 8344708: Compiler Implementation of Module Import Declarations [v7]

2025-04-28 Thread Jan Lahoda
> This is a patch to finalize the module imports feature. Please see: > https://bugs.openjdk.org/browse/JDK-8344700 Jan Lahoda has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 13 commits: - Merge branch 'master' into JDK-8344708 - Ad

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

2025-04-28 Thread Jorn Vernee
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: 8344708: Compiler Implementation of Module Import Declarations [v7]

2025-04-28 Thread Vicente Romero
On Mon, 28 Apr 2025 13:26:30 GMT, Jan Lahoda wrote: >> This is a patch to finalize the module imports feature. Please see: >> https://bugs.openjdk.org/browse/JDK-8344700 > > Jan Lahoda has updated the pull request with a new target base due to a merge > or a rebase. The pull request now contains

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

2025-04-28 Thread Jorn Vernee
On Fri, 18 Apr 2025 18:25:54 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: 8343110: Add getChars(int, int, char[], int) to CharSequence and CharBuffer [v8]

2025-04-28 Thread Daniel Fuchs
On Sat, 26 Apr 2025 17:07:33 GMT, Markus KARG wrote: >> This Pull Request proposes an implementation for >> [JDK-8343110](https://bugs.openjdk.org/browse/JDK-8343110): Adding the new >> method `public void getChars(int srcBegin, int srcEnd, char[] dst, int >> dstBegin)` to the `CharSequence` i

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:

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: 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: 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: 8354242: VectorAPI: combine vector not operation with compare [v3]

2025-04-28 Thread erifan
On Mon, 28 Apr 2025 09:17:58 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 tests on all pla

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

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: 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: 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: 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: 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: 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: 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: 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: 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

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

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: 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: 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: 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 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: 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: 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: 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: 8354242: VectorAPI: combine vector not operation with compare [v2]

2025-04-28 Thread erifan
On Mon, 28 Apr 2025 06:45:58 GMT, Emanuel Peter wrote: >> This is not specifically required on x86, but because this test fails on x86 >> when `-XX:UseAVX=0` is specified. When `-XX:UseAVX=0` is specified, the >> sub-graph is like this: >> `(XorV (VectorMaskCmp (LoadVector ...)) (Replicate -1))

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

2025-04-28 Thread Per Minborg
On Thu, 24 Apr 2025 23:53:11 GMT, Luca Kellermann wrote: >> Per Minborg has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Make public constuctor private > > src/java.base/share/classes/java/util/ImmutableCollections.java line 898: > >> 89

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

2025-04-28 Thread Maurizio Cimadamore
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: 8342206: Convenience method to check if a constant pool entry matches nominal descriptors [v3]

2025-04-28 Thread Adam Sotona
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

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

2025-04-28 Thread Adam Sotona
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: 8354242: VectorAPI: combine vector not operation with compare [v3]

2025-04-28 Thread erifan
On Mon, 28 Apr 2025 06:47:38 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 tests on all platforms, at le

Re: RFR: 8355636: Reuse StringBuilder in printStackTrace [v7]

2025-04-28 Thread Shaojin Wen
On Sat, 26 Apr 2025 22:42:08 GMT, Shaojin Wen wrote: >> In the Throwable::printStackTrace method, StringBuilder is created multiple >> times to build String. By sharing StringBuilder to build String, object >> allocation and copying are reduced. >> >> In the scenario without suppressed and our

Withdrawn: 8355636: Reuse StringBuilder in printStackTrace

2025-04-28 Thread Shaojin Wen
On Fri, 25 Apr 2025 01:36:50 GMT, Shaojin Wen wrote: > In the Throwable::printStackTrace method, StringBuilder is created multiple > times to build String. By sharing StringBuilder to build String, object > allocation and copying are reduced. > > In the scenario without suppressed and ourCause

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

2025-04-28 Thread Dan Heidinga
On Mon, 28 Apr 2025 05:28:58 GMT, Ioi Lam wrote: >> src/hotspot/share/cds/aotReferenceObjSupport.cpp line 106: >> >>> 104: assert(CDSConfig::allow_only_single_java_thread(), "Required"); >>> 105: >>> 106: TempNewSymbol method_name = >>> SymbolTable::new_symbol("prepareForAOTCache"); >>

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

2025-04-28 Thread Chen Liang
On Mon, 28 Apr 2025 11:51:23 GMT, Maurizio Cimadamore wrote: >> Chen Liang has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Simplify FFM linker warmup > > src/java.base/share/classes/jdk/internal/foreign/abi/NativeEntryPoint.java > line

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

2025-04-28 Thread Maurizio Cimadamore
On Fri, 18 Apr 2025 18:25:54 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: 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: > 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: Namespace Prefix Issue in XML to XSL Transformation

2025-04-28 Thread Johannes Döbler
Probably best to nail down the problem in a bug report first, providing XML input, XSLT stylesheet, actual and expected XML output to demonstrate the problem. Now if https://bugs.openjdk.org/browse/JDK-8168664 describes your problem: The Xalan version bundled with the JDK /afaik/ seems to get oc

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: 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: 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 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: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: 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 [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

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: 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 [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: 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: 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: 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: 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: 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: 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: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: 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: 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

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: 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

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: 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: 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

  1   2   >