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

2025-04-27 Thread Andrey Turbanov
On Fri, 25 Apr 2025 14:49:37 GMT, Aleksey Shipilev wrote: > 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

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

2025-04-27 Thread Chen Liang
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/classfile-api-dev/2025-April/000698.html asks for this as well. Wi

Re: RFR: 8077587: BigInteger Roots [v3]

2025-04-27 Thread fabioromano1
> This PR implements nth root computation for BigIntegers using Newton method. > This PR is dependent by this [PR](https://github.com/openjdk/jdk/pull/24690). fabioromano1 has updated the pull request incrementally with one additional commit since the last revision: Correct unsigned division

Re: RFR: 8077587: BigInteger Roots [v4]

2025-04-27 Thread fabioromano1
> This PR implements nth root computation for BigIntegers using Newton method. > This PR is dependent by this [PR](https://github.com/openjdk/jdk/pull/24690). fabioromano1 has updated the pull request incrementally with one additional commit since the last revision: An optimization -

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

2025-04-27 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: 8351996: Behavioral updates for ClassValue::remove [v2]

2025-04-27 Thread Chen Liang
On Fri, 21 Mar 2025 13:44:17 GMT, Jaikiran Pai wrote: >> Chen Liang 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 s

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

2025-04-27 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: 8344706: Compiler Implementation of Compact Source Files and Instance Main Methods [v5]

2025-04-27 Thread Tatsunori Uchino
On Tue, 22 Apr 2025 12:39:05 GMT, Jan Lahoda wrote: >> 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) >>

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

2025-04-27 Thread Chen Liang
On Sun, 27 Apr 2025 05:28:56 GMT, John R Rose wrote: >> Chen Liang 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 12 additional >> commits sinc

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

2025-04-27 Thread Ioi Lam
> This PR contains 2 parts > > - Upstream of Soft/Weak Reference support authored by @macarte from [the > Leyden > repo](https://github.com/openjdk/leyden/commit/4ca75d156519596e23abc8a312496b7c2f0e0ca5) > - New C++ class `AOTReferenceObjSupport` and new Java method > `ReferencedKeyMap::prepare

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

2025-04-27 Thread Ioi Lam
On Fri, 25 Apr 2025 19:17:51 GMT, Dan Heidinga wrote: >> Ioi Lam has updated the pull request incrementally with one additional >> commit since the last revision: >> >> @fisk comment > > src/hotspot/share/cds/aotReferenceObjSupport.cpp line 76: > >> 74: // the use of Weak/Soft references use

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

2025-04-27 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 [v2]

2025-04-27 Thread Emanuel Peter
On Sun, 27 Apr 2025 10:09:48 GMT, erifan wrote: >> I don't see XorVMask implemented on all non-x86 target, like PPC etc.. > > 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 lik

Re: RFR: 8077587: BigInteger Roots [v2]

2025-04-27 Thread fabioromano1
> This PR implements nth root computation for BigIntegers using Newton method. > This PR is dependent by this [PR](https://github.com/openjdk/jdk/pull/24690). fabioromano1 has updated the pull request incrementally with two additional commits since the last revision: - Correct typo in comment

Re: RFR: 8344706: Compiler Implementation of Compact Source Files and Instance Main Methods [v5]

2025-04-27 Thread Tatsunori Uchino
On Sun, 27 Apr 2025 14:21:32 GMT, Tatsunori Uchino wrote: >> I believe that after: >> https://github.com/openjdk/jdk/pull/24738 >> the `stdin.encoding` property is set when the process is connected to a >> console, which is probably the main case where the encoding can be detected >> automatica

Re: RFR: 8344706: Compiler Implementation of Compact Source Files and Instance Main Methods [v5]

2025-04-27 Thread Tatsunori Uchino
On Sun, 27 Apr 2025 10:51:33 GMT, Jan Lahoda wrote: >> src/java.base/share/classes/java/lang/IO.java line 192: >> >>> 190: String enc = System.getProperty("stdin.encoding", ""); >>> 191: Charset cs = Charset.forName(enc, StandardCharsets.UTF_8); >>> 192: br =

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

2025-04-27 Thread erifan
On Fri, 25 Apr 2025 09:48:59 GMT, Jatin Bhateja wrote: >> Since this is a platform independent optimization, I tend to use this >> `@requires` because it's simpler. If we use `applyIfCPUFeatureOr`, we need >> to add the same restriction before each test. In addition, if a new >> architecture

Re: RFR: 8298783: java/lang/ref/FinalizerHistogramTest.java failed with "RuntimeException: MyObject is not found in test output" [v5]

2025-04-27 Thread Kim Barrett
On Fri, 25 Apr 2025 21:30:10 GMT, Brent Christian wrote: >> I propose some cleanups to `FinalizerHistogramTest.java` to hopefully clear >> up the intermittent failures: >> >> * run with `othervm`: this test blocks the (global) finalizer thread, and >> also requires the (global) finalizer threa

Re: RFR: 8344706: Compiler Implementation of Compact Source Files and Instance Main Methods [v5]

2025-04-27 Thread Jan Lahoda
On Sun, 27 Apr 2025 09:12:47 GMT, Tatsunori Uchino wrote: >> Jan Lahoda has updated the pull request incrementally with seven additional >> commits since the last revision: >> >> - Merge remote-tracking branch 'origin/finalize-concise-source-files' into >> finalize-concise-source-files >> -

Re: RFR: 8298783: java/lang/ref/FinalizerHistogramTest.java failed with "RuntimeException: MyObject is not found in test output" [v5]

2025-04-27 Thread Jaikiran Pai
On Fri, 25 Apr 2025 21:30:10 GMT, Brent Christian wrote: >> I propose some cleanups to `FinalizerHistogramTest.java` to hopefully clear >> up the intermittent failures: >> >> * run with `othervm`: this test blocks the (global) finalizer thread, and >> also requires the (global) finalizer threa

Re: RFR: 8343110: Add getChars(int, int, char[], int) to CharSequence and CharBuffer [v8]

2025-04-27 Thread Jaikiran Pai
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: 8347471: Provide valid flags and mask in AccessFlag.Location [v8]

2025-04-27 Thread ExE Boss
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

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

2025-04-27 Thread Chen Liang
On Sun, 27 Apr 2025 16:47:59 GMT, ExE Boss 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 722: > >> 720: } >> 721

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

2025-04-27 Thread Johannes Graham
On Sat, 26 Apr 2025 21:48:25 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: 8351996: Behavioral updates for ClassValue::remove [v6]

2025-04-27 Thread Chen Liang
On Sun, 27 Apr 2025 04:50:37 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: 8351996: Behavioral updates for ClassValue::remove [v7]

2025-04-27 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: 8354897: Support Soft/Weak Reference in AOT cache [v4]

2025-04-27 Thread Ioi Lam
On Fri, 25 Apr 2025 19:39:01 GMT, Dan Heidinga wrote: >> Ioi Lam has updated the pull request incrementally with one additional >> commit since the last revision: >> >> @fisk comment > > src/hotspot/share/cds/aotReferenceObjSupport.cpp line 106: > >> 104: assert(CDSConfig::allow_only_sin