Re: RFR: 8293336: AOT-linking of invokedynamic for lambda expression and string concat [v3]

2024-10-10 Thread Ioi Lam
> This is the 7th and final PR for [JEP 483: Ahead-of-Time Class Loading & > Linking](https://bugs.openjdk.org/browse/JDK-8315737). > > This PR implements the AOT-linking of invokedynamic callsites: > - We only link lambda expressions (`LambdaMetafactory::metafactory`) and > string concat (`Stri

Re: RFR: 8341692: Implement JEP 490: ZGC: Remove the Non-Generational Mode [v3]

2024-10-10 Thread Axel Boldt-Christmas
> This is the implementation task for `JEP 490: ZGC: Remove the > Non-Generational Mode`. See the JEP for details. > [JDK-8335850](https://bugs.openjdk.org/browse/JDK-8335850) Axel Boldt-Christmas has updated the pull request with a new target base due to a merge or a rebase. The incremental we

Re: RFR: 8341566: Add Reader.of(CharSequence) [v10]

2024-10-10 Thread Markus KARG
On Thu, 10 Oct 2024 22:42:19 GMT, Bernd wrote: > > I have slightly adapted the copy loop to allow CPUs to use solely > > single-operand INC within the loop instead of dual-operand ADD. > > If that makes a difference we might need to consider fixing the Compiler :) Hm... really? In fact I am no

RFR: 8341924: Improve error message with structurally malformed Code array

2024-10-10 Thread Chen Liang
Patch a tableswitch instruction's low value to be greater than a high value, previously, javap will not print any previous instruction and report problematic address/bci to be 0. This is because the iteration of bound models require first collecting all data into a buffer list. We call the eager

Re: Potential URLClassLoader bug?

2024-10-10 Thread Patrick Reinhart
Hi Jaikiran, Thanks for the info. I will consult the bug for more details then. Patrick > Am 10.10.2024 um 16:21 schrieb Jaikiran Pai : > > Hello Patrick, > > This is a known bug https://bugs.openjdk.org/browse/JDK-8315993 which gets > triggered when the getResource() gets called on a URL r

Re: RFR: 8341664: ReferenceClassDescImpl cache internalName [v5]

2024-10-10 Thread Shaojin Wen
> ReferenceClassDescImpl caches internalName to avoid creating a new String > object for each call, which can also simplify the implementation of classfile. Shaojin Wen has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated c

Re: RFR: 8341722: Fix some warnings as errors when building on Linux with toolchain clang [v2]

2024-10-10 Thread Kim Barrett
On Wed, 9 Oct 2024 11:44:35 GMT, Matthias Baesken wrote: >> There are a few warnings as errors occurring when building on Linux with >> clang (clang15). Mostly these are some kind of 'unused' warnings. >> Might be related to https://bugs.openjdk.org/browse/JDK-8339156 . > > Matthias Baesken has

Withdrawn: 8338242: RoundingMode.HALF_UP gives different results with NumberFormat

2024-10-10 Thread duke
On Wed, 14 Aug 2024 11:46:31 GMT, Myp wrote: > Fix of problem RoundingMode.HALF_UP gives different results with NumberFormat This pull request has been closed without being integrated. - PR: https://git.openjdk.org/jdk/pull/20580

Integrated: 8341900: Optimize DirectCodeBuilder writeBody

2024-10-10 Thread Shaojin Wen
On Thu, 10 Oct 2024 03:55:34 GMT, Shaojin Wen wrote: > A simple optimization to reduce duplicate code. Reduce the codeSize of > writeBody from 268 to 240 This pull request has now been integrated. Changeset: 472db922 Author:Shaojin Wen URL: https://git.openjdk.org/jdk/commit/472db9

Re: RFR: 8341138: Rename jtreg property docker.support as container.support [v2]

2024-10-10 Thread duke
On Thu, 10 Oct 2024 14:27:08 GMT, Ramkumar Sunderbabu wrote: >> The System property "docker.support" defined in VMProps gives a wrong >> impression that it is tied to docker alone. The property is common for any >> container runtime. Hence, it needs to be renamed as "container.support". >> >>

Integrated: 8341906: Optimize ClassFile writing BufBuffer

2024-10-10 Thread Shaojin Wen
On Thu, 10 Oct 2024 01:13:13 GMT, Shaojin Wen wrote: > We made a lot of improvements to merge writes to BufWriter in #21243, and > this PR is about doing more of the same. This pull request has now been integrated. Changeset: 24eb3601 Author:Shaojin Wen URL: https://git.openjdk.org

Re: RFR: 8341138: Rename jtreg property docker.support as container.support [v2]

2024-10-10 Thread Mikhailo Seledtsov
On Thu, 10 Oct 2024 14:27:08 GMT, Ramkumar Sunderbabu wrote: >> The System property "docker.support" defined in VMProps gives a wrong >> impression that it is tied to docker alone. The property is common for any >> container runtime. Hence, it needs to be renamed as "container.support". >> >>

Re: RFR: 8341566: Add Reader.of(CharSequence) [v10]

2024-10-10 Thread Bernd
On Thu, 10 Oct 2024 21:12:50 GMT, Markus KARG wrote: > I have slightly adapted the copy loop to allow CPUs to use solely > single-operand INC within the loop instead of dual-operand ADD. If that makes a difference we might need to consider fixing the Compiler :) - PR Comment: http

Re: RFR: 8341470: BigDecimal.stripTrailingZeros() optimization [v33]

2024-10-10 Thread Raffaello Giulietti
On Thu, 10 Oct 2024 20:25:09 GMT, fabioromano1 wrote: >> The name `maxPowsOf5` has been chosen for consistence with `powsOf2`. > > Could make sense using Math.round() instead of Math.ceil() to get better > upper bound? I'll have to check... ... tomorrow ;-) - PR Review Comment: ht

Re: RFR: 8341566: Add Reader.of(CharSequence) [v10]

2024-10-10 Thread Markus KARG
On Thu, 10 Oct 2024 21:10:30 GMT, Markus KARG wrote: >> This Pull Requests proposes an implementation for >> [JDK-8341566](https://bugs.openjdk.org/browse/JDK-8341566): Adding the new >> method `public static Reader Reader.of(CharSequence)` will return an >> anonymous, non-synchronized impleme

Re: RFR: 8341566: Add Reader.of(CharSequence) [v10]

2024-10-10 Thread Markus KARG
> This Pull Requests proposes an implementation for > [JDK-8341566](https://bugs.openjdk.org/browse/JDK-8341566): Adding the new > method `public static Reader Reader.of(CharSequence)` will return an > anonymous, non-synchronized implementation of a `Reader` for each kind of > `CharSequence` im

Re: RFR: 8341470: BigDecimal.stripTrailingZeros() optimization [v35]

2024-10-10 Thread fabioromano1
> An optimized algorithm for `BigDecimal.stripTrailingZeros()` that uses > repeated squares trick. fabioromano1 has updated the pull request incrementally with one additional commit since the last revision: Refining mathematical definition of remainingZeros - Changes: - all: h

Re: RFR: 8341470: BigDecimal.stripTrailingZeros() optimization [v33]

2024-10-10 Thread fabioromano1
On Thu, 10 Oct 2024 19:44:21 GMT, fabioromano1 wrote: >> src/java.base/share/classes/java/math/BigDecimal.java line 5270: >> >>> 5268: intVal = intVal.shiftRight(powsOf2); // remove powers of 2 >>> 5269: // maxPowsOf5 == ceil(log5(intVal)) roughly >>> 5270: long maxPowsOf

Re: RFR: 8341470: BigDecimal.stripTrailingZeros() optimization [v34]

2024-10-10 Thread fabioromano1
> An optimized algorithm for `BigDecimal.stripTrailingZeros()` that uses > repeated squares trick. fabioromano1 has updated the pull request incrementally with one additional commit since the last revision: Added comments on mathematical semantic - Changes: - all: https://git.

Re: RFR: 8324672: Update jdk/java/time/tck/java/time/TCKInstant.java now() to be more robust [v2]

2024-10-10 Thread Ramkumar Sunderbabu
> The time difference check might fail for scenarios such as batch compilation. > It is safer to give a bigger allowance of 10 seconds instead of 0.1 sec. > > Testing: The test was run for 100 times with -Xcomp option. Ramkumar Sunderbabu has updated the pull request incrementally with one addi

Re: RFR: 8341470: BigDecimal.stripTrailingZeros() optimization [v33]

2024-10-10 Thread fabioromano1
On Thu, 10 Oct 2024 16:12:57 GMT, Raffaello Giulietti wrote: >> fabioromano1 has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Store log5(2) in BigDecimal > > src/java.base/share/classes/java/math/BigDecimal.java line 5270: > >> 5268:

Re: RFR: 8324672: Update jdk/java/time/tck/java/time/TCKInstant.java now() to be more robust

2024-10-10 Thread Roger Riggs
On Thu, 10 Oct 2024 19:25:01 GMT, Ramkumar Sunderbabu wrote: >> I don't think there is any way to meaningfully and reliably test the >> assertion that `Instant.now()` is the using the same clock as >> `Instant.now(Clock.systemUTC())` given the potential delays in execution of >> the two state

Re: RFR: 8324672: Update jdk/java/time/tck/java/time/TCKInstant.java now() to be more robust

2024-10-10 Thread Ramkumar Sunderbabu
On Thu, 10 Oct 2024 15:12:44 GMT, Roger Riggs wrote: >> If your objection is primarily on Math.abs, is this ok? >> ` >> long diff = test.toEpochMilli() - expected.toEpochMilli(); >> assertTrue(diff >= 0 && diff < 10_000); // less than 10 secs >> ` > > I don't think there is any

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

2024-10-10 Thread Chen Liang
Please review this patch that adds a test by @nizarbenalla to perform null checks across the ClassFile API. This is an updated version of #20556 that minimizes impact on our implementation code. Notes: 1. There's one change in `MethodHandleProxies` to explicitly use platform class loader instea

Re: RFR: 8340133: Investigate if the java launcher could give hints about JShell [v2]

2024-10-10 Thread Eirik Bjørsnøs
On Thu, 10 Oct 2024 17:56:23 GMT, Jan Lahoda wrote: > I've adjusted the concise help to: > > ``` > $ java > openjdk 24-internal 2025-03-18 > > Usage: java [java options...] [application arguments...] > ``` How about just `[arguments...]` instead of `[application arguments...]`? It's shorter,

Re: RFR: 8340133: Investigate if the java launcher could give hints about JShell [v2]

2024-10-10 Thread Kevin Bourrillion
On Thu, 10 Oct 2024 17:54:51 GMT, Jan Lahoda wrote: >> Currently, running `java` without any parameters will lead to an output that >> is a full `--help`, which is over 100 lines (on my computer at least), and >> it feels overwhelming. And many people might actually want to run >> JShell/REPL,

Re: RFR: 8340133: Investigate if the java launcher could give hints about JShell [v2]

2024-10-10 Thread Jan Lahoda
On Thu, 10 Oct 2024 17:54:51 GMT, Jan Lahoda wrote: >> Currently, running `java` without any parameters will lead to an output that >> is a full `--help`, which is over 100 lines (on my computer at least), and >> it feels overwhelming. And many people might actually want to run >> JShell/REPL,

Re: RFR: 8340133: Investigate if the java launcher could give hints about JShell [v2]

2024-10-10 Thread Jan Lahoda
> Currently, running `java` without any parameters will lead to an output that > is a full `--help`, which is over 100 lines (on my computer at least), and it > feels overwhelming. And many people might actually want to run JShell/REPL, > not the `java` launcher, but it is difficult find out abo

Re: RFR: 8341903: Implementation of Scoped Values (Fourth Preview) [v2]

2024-10-10 Thread Weijun Wang
On Thu, 10 Oct 2024 16:37:24 GMT, Andrew Haley wrote: >> The fourth preview of scoped values. > > Andrew Haley has updated the pull request incrementally with one additional > commit since the last revision: > > Fix javadoc The one line change in `Subject.java` is fine. - PR Co

Integrated: 8341789: Fix ExceptionOccurred in java.base

2024-10-10 Thread Justin Lu
On Wed, 9 Oct 2024 17:28:09 GMT, Justin Lu wrote: > Please review this PR which fixes incorrect usage of `jthrowable > ExceptionOccurred(JNIEnv *env)` within _java.base_. > > This corrects instances where the return value is being treated as a boolean. > Such occurrences are replaced with `jbo

Integrated: 8341791: Fix ExceptionOccurred in java.prefs

2024-10-10 Thread Justin Lu
On Wed, 9 Oct 2024 17:28:07 GMT, Justin Lu wrote: > Please review this PR which fixes incorrect usage of `jthrowable > ExceptionOccurred(JNIEnv *env)` within _java.prefs_. > > This corrects instances where the return value is being treated as a boolean. > Such occurrences are replaced with `jb

Re: RFR: 8341789: Fix ExceptionOccurred in java.base

2024-10-10 Thread Justin Lu
On Wed, 9 Oct 2024 17:28:09 GMT, Justin Lu wrote: > Please review this PR which fixes incorrect usage of `jthrowable > ExceptionOccurred(JNIEnv *env)` within _java.base_. > > This corrects instances where the return value is being treated as a boolean. > Such occurrences are replaced with `jbo

Re: RFR: 8341791: Fix ExceptionOccurred in java.prefs

2024-10-10 Thread Justin Lu
On Wed, 9 Oct 2024 17:28:07 GMT, Justin Lu wrote: > Please review this PR which fixes incorrect usage of `jthrowable > ExceptionOccurred(JNIEnv *env)` within _java.prefs_. > > This corrects instances where the return value is being treated as a boolean. > Such occurrences are replaced with `jb

Re: RFR: 8341903: Implementation of Scoped Values (Fourth Preview) [v2]

2024-10-10 Thread Alan Bateman
On Thu, 10 Oct 2024 17:02:00 GMT, Alan Bateman wrote: >> Andrew Haley has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Fix javadoc > > src/java.base/share/classes/java/lang/ScopedValue.java line 163: > >> 161: * // @link substri

Re: RFR: 8341903: Implementation of Scoped Values (Fourth Preview) [v2]

2024-10-10 Thread Alan Bateman
On Thu, 10 Oct 2024 16:37:24 GMT, Andrew Haley wrote: >> The fourth preview of scoped values. > > Andrew Haley has updated the pull request incrementally with one additional > commit since the last revision: > > Fix javadoc @theRealAph The update to src/java.base/share/classes/jdk/internal/

Re: RFR: 8311071: Avoid SoftReferences in LambdaFormEditor and MethodTypeForm when storing heap objects into AOT cache [v7]

2024-10-10 Thread John R Rose
On Wed, 2 Oct 2024 01:06:20 GMT, Ioi Lam wrote: >> This is the 6th PR for [JEP 483: Ahead-of-Time Class Loading & >> Linking](https://bugs.openjdk.org/browse/JDK-8315737). >> >> The implementation of java.lang.invoke uses SoftReferences so that unused >> MethodHandles, LambdaForms, etc, can be

Re: RFR: 8341903: Implementation of Scoped Values (Fourth Preview) [v2]

2024-10-10 Thread Andrew Haley
> The fourth preview of scoped values. Andrew Haley has updated the pull request incrementally with one additional commit since the last revision: Fix javadoc - Changes: - all: https://git.openjdk.org/jdk/pull/21456/files - new: https://git.openjdk.org/jdk/pull/21456/files/77

Re: RFR: 8341566: Add Reader.of(CharSequence) [v7]

2024-10-10 Thread Markus KARG
On Thu, 10 Oct 2024 14:32:30 GMT, Roger Riggs wrote: >> I think "release 24" is fine for now as similar text exists in >> `java.util.Vector`. We can normalize such texts when we implement >> https://bugs.openjdk.org/browse/JDK-8341736. > > Please remove the reference to JDK 24; it will age rapi

Re: RFR: 8341566: Add Reader.of(CharSequence) [v7]

2024-10-10 Thread Markus KARG
On Thu, 10 Oct 2024 05:47:26 GMT, Markus KARG wrote: >> Currently uncontested locks have a performance regression after the removal >> of biased locking: A similar example with `StringBuffer` is available in >> #19513. > > I do not have any personal preferences here. The text was paraphrased fr

Re: RFR: 8341566: Add Reader.of(CharSequence) [v9]

2024-10-10 Thread Markus KARG
> This Pull Requests proposes an implementation for > [JDK-8341566](https://bugs.openjdk.org/browse/JDK-8341566): Adding the new > method `public static Reader Reader.of(CharSequence)` will return an > anonymous, non-synchronized implementation of a `Reader` for each kind of > `CharSequence` im

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

2024-10-10 Thread Jatin Bhateja
On Tue, 8 Oct 2024 19:25:24 GMT, Jatin Bhateja wrote: >> Hi All, >> >> As per the discussion on panama-dev mailing list[1], patch adds the support >> for following new vector operators. >> >> >> . SUADD : Saturating unsigned addition. >> . SADD: Saturating signed addition. >>

RFR: 8341903: Implementation of Scoped Values (Fourth Preview)

2024-10-10 Thread Andrew Haley
The fourth preview of scoped values. - Commit messages: - Scoped Values API changes - Scoped Values API changes - Scoped Values API changes Changes: https://git.openjdk.org/jdk/pull/21456/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=21456&range=00 Issue: https://bugs

Re: RFR: 8341470: BigDecimal.stripTrailingZeros() optimization [v33]

2024-10-10 Thread Raffaello Giulietti
On Wed, 9 Oct 2024 15:18:15 GMT, fabioromano1 wrote: >> An optimized algorithm for `BigDecimal.stripTrailingZeros()` that uses >> repeated squares trick. > > fabioromano1 has updated the pull request incrementally with one additional > commit since the last revision: > > Store log5(2) in Big

Re: RFR: 8341791: Fix ExceptionOccurred in java.prefs

2024-10-10 Thread Naoto Sato
On Wed, 9 Oct 2024 17:28:07 GMT, Justin Lu wrote: > Please review this PR which fixes incorrect usage of `jthrowable > ExceptionOccurred(JNIEnv *env)` within _java.prefs_. > > This corrects instances where the return value is being treated as a boolean. > Such occurrences are replaced with `jb

Re: RFR: 8341789: Fix ExceptionOccurred in java.base

2024-10-10 Thread Naoto Sato
On Wed, 9 Oct 2024 17:28:09 GMT, Justin Lu wrote: > Please review this PR which fixes incorrect usage of `jthrowable > ExceptionOccurred(JNIEnv *env)` within _java.base_. > > This corrects instances where the return value is being treated as a boolean. > Such occurrences are replaced with `jbo

Re: RFR: 8341470: BigDecimal.stripTrailingZeros() optimization [v12]

2024-10-10 Thread Raffaello Giulietti
On Thu, 10 Oct 2024 07:32:15 GMT, fabioromano1 wrote: >> The class Javadoc mentions, in at least two places, that the two's >> complement representation conceptually has an infinite number of leading >> virtual sign bits. >> Once this point is clear, IMO the method's own Javadoc is then clear i

Integrated: 8339538: Wrong timeout computations in DnsClient

2024-10-10 Thread Aleksei Efimov
On Fri, 6 Sep 2024 16:28:36 GMT, Aleksei Efimov wrote: > This PR proposes the following changes to address wrong timeout computations > in the `com.sun.jndi.dns.DnsClient`: > - The `DnsClient` has been updated to use a monotonic high-resolution (nano) > clock. The existing `Timeout` test has al

Re: RFR: 8339538: Wrong timeout computations in DnsClient [v11]

2024-10-10 Thread Mark Sheppard
On Mon, 7 Oct 2024 09:00:28 GMT, Aleksei Efimov wrote: >> This PR proposes the following changes to address wrong timeout computations >> in the `com.sun.jndi.dns.DnsClient`: >> - The `DnsClient` has been updated to use a monotonic high-resolution (nano) >> clock. The existing `Timeout` test ha

Re: RFR: 8341138: Rename jtreg property docker.support as container.support [v2]

2024-10-10 Thread Severin Gehwolf
On Thu, 10 Oct 2024 14:27:08 GMT, Ramkumar Sunderbabu wrote: >> The System property "docker.support" defined in VMProps gives a wrong >> impression that it is tied to docker alone. The property is common for any >> container runtime. Hence, it needs to be renamed as "container.support". >> >>

Re: RFR: 8341664: ReferenceClassDescImpl cache internalName [v4]

2024-10-10 Thread Shaojin Wen
> ReferenceClassDescImpl caches internalName to avoid creating a new String > object for each call, which can also simplify the implementation of classfile. Shaojin Wen has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated c

Integrated: 8341136: Optimize StackMapGenerator::trimAndCompress

2024-10-10 Thread Shaojin Wen
On Fri, 27 Sep 2024 17:05:25 GMT, Shaojin Wen wrote: > A small optimization to reduce the write operations of trimAndCompress This pull request has now been integrated. Changeset: 6e013845 Author:Shaojin Wen URL: https://git.openjdk.org/jdk/commit/6e0138450ab4b0af917cbf61701b0d1d17e

Re: RFR: 8324672: Update jdk/java/time/tck/java/time/TCKInstant.java now() to be more robust

2024-10-10 Thread Roger Riggs
On Wed, 9 Oct 2024 01:26:53 GMT, Ramkumar Sunderbabu wrote: >> Thanks @RogerRiggs for the comments. I increased the diff allowance to >> absorb any compilation related delays. What would you propose here? > > If your objection is primarily on Math.abs, is this ok? > ` > long diff = test

Re: RFR: 8341664: ReferenceClassDescImpl cache internalName [v3]

2024-10-10 Thread Shaojin Wen
> ReferenceClassDescImpl caches internalName to avoid creating a new String > object for each call, which can also simplify the implementation of classfile. Shaojin Wen has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated c

Re: RFR: 8341136: Optimize StackMapGenerator::trimAndCompress

2024-10-10 Thread Chen Liang
On Fri, 27 Sep 2024 17:05:25 GMT, Shaojin Wen wrote: > A small optimization to reduce the write operations of trimAndCompress Marked as reviewed by liach (Reviewer). - PR Review: https://git.openjdk.org/jdk/pull/21227#pullrequestreview-2360639076

Re: RFR: 8339538: Wrong timeout computations in DnsClient [v11]

2024-10-10 Thread Mark Sheppard
On Mon, 7 Oct 2024 09:00:28 GMT, Aleksei Efimov wrote: >> This PR proposes the following changes to address wrong timeout computations >> in the `com.sun.jndi.dns.DnsClient`: >> - The `DnsClient` has been updated to use a monotonic high-resolution (nano) >> clock. The existing `Timeout` test ha

Re: RFR: 8339538: Wrong timeout computations in DnsClient [v11]

2024-10-10 Thread Mark Sheppard
On Mon, 7 Oct 2024 09:00:28 GMT, Aleksei Efimov wrote: >> This PR proposes the following changes to address wrong timeout computations >> in the `com.sun.jndi.dns.DnsClient`: >> - The `DnsClient` has been updated to use a monotonic high-resolution (nano) >> clock. The existing `Timeout` test ha

Re: RFR: 8341566: Add Reader.of(CharSequence) [v7]

2024-10-10 Thread Roger Riggs
On Thu, 10 Oct 2024 04:53:05 GMT, Chen Liang wrote: >> src/java.base/share/classes/java/io/StringReader.java line 38: >> >>> 36: * {@code Reader.of(String)} should generally be used in preference to >>> this one, >>> 37: * as it supports all of the same operations but it is faster, as it >>>

Integrated: 8339205: Optimize StackMapGenerator

2024-10-10 Thread Shaojin Wen
On Wed, 28 Aug 2024 22:20:25 GMT, Shaojin Wen wrote: > Reduce code size by combining calls and defining local variables This pull request has now been integrated. Changeset: e9327b6e Author:Shaojin Wen URL: https://git.openjdk.org/jdk/commit/e9327b6e3c1fcc47ec790fa4e4019f7651a8f912

Re: RFR: 8341566: Add Reader.of(CharSequence) [v8]

2024-10-10 Thread Roger Riggs
On Thu, 10 Oct 2024 07:32:53 GMT, Markus KARG wrote: >> This Pull Requests proposes an implementation for >> [JDK-8341566](https://bugs.openjdk.org/browse/JDK-8341566): Adding the new >> method `public static Reader Reader.of(CharSequence)` will return an >> anonymous, non-synchronized impleme

Re: RFR: 8339205: Optimize StackMapGenerator [v7]

2024-10-10 Thread Chen Liang
On Wed, 9 Oct 2024 17:40:13 GMT, Shaojin Wen wrote: >> Reduce code size by combining calls and defining local variables > > Shaojin Wen has updated the pull request with a new target base due to a > merge or a rebase. The pull request now contains 18 commits: > > - Merge remote-tracking branch

Re: RFR: 8307513: C2: intrinsify Math.max(long,long) and Math.min(long,long) [v3]

2024-10-10 Thread Tobias Hartmann
On Fri, 27 Sep 2024 14:21:57 GMT, Galder Zamarreño wrote: >> This patch intrinsifies `Math.max(long, long)` and `Math.min(long, long)` in >> order to help improve vectorization performance. >> >> Currently vectorization does not kick in for loops containing either of >> these calls because of

Re: RFR: 8307513: C2: intrinsify Math.max(long,long) and Math.min(long,long) [v3]

2024-10-10 Thread Tobias Hartmann
On Wed, 9 Oct 2024 11:05:15 GMT, Galder Zamarreño wrote: >> You've probably seen this but the new test is failing IR verification: >> >> >> Failed IR Rules (4) of Methods (4) >> -- >> 1) Method "private static double >> compiler.intrinsics.math.TestMinMaxInlinin

Re: RFR: 8341138: Rename jtreg property docker.support as container.support [v2]

2024-10-10 Thread Ramkumar Sunderbabu
> The System property "docker.support" defined in VMProps gives a wrong > impression that it is tied to docker alone. The property is common for any > container runtime. Hence, it needs to be renamed as "container.support". > > Positive Testing: > tier1,tier2,tier3 - to check stability > tier5 -

Re: Potential URLClassLoader bug?

2024-10-10 Thread Jaikiran Pai
Hello Patrick, This is a known bug https://bugs.openjdk.org/browse/JDK-8315993 which gets triggered when the getResource() gets called on a URL returned through the URLClassLoader. We know what's causing this but the fix isn't straightforward and is currently under investigation. -Jaikiran

Potential URLClassLoader bug?

2024-10-10 Thread Patrick Reinhart
Hi Everybody, I recently stumbled over a strange behavior within the URLClassLoader under Windows regarding a left open file handle even though everything is handled within try-with-resources blocks. Here is simple test that passes under Linux & Mac but fails under Windows: import java.io.*;

Re: RFR: 8341906: Optimize ClassFile writing BufBuffer

2024-10-10 Thread Chen Liang
On Thu, 10 Oct 2024 01:13:13 GMT, Shaojin Wen wrote: > We made a lot of improvements to merge writes to BufWriter in #21243, and > this PR is about doing more of the same. Marked as reviewed by liach (Reviewer). - PR Review: https://git.openjdk.org/jdk/pull/21437#pullrequestreview

RFR: 8341906: Optimize ClassFile writing BufBuffer

2024-10-10 Thread Shaojin Wen
We made a lot of improvements to merge writes to BufWriter in #21243, and this PR is about doing more of the same. - Commit messages: - merge write Changes: https://git.openjdk.org/jdk/pull/21437/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=21437&range=00 Issue: https

Re: RFR: 8341789: Fix ExceptionOccurred in java.base

2024-10-10 Thread Roger Riggs
On Wed, 9 Oct 2024 17:28:09 GMT, Justin Lu wrote: > Please review this PR which fixes incorrect usage of `jthrowable > ExceptionOccurred(JNIEnv *env)` within _java.base_. > > This corrects instances where the return value is being treated as a boolean. > Such occurrences are replaced with `jbo

Re: RFR: 8311530: Deprecate jdk.jsobject module for removal [v3]

2024-10-10 Thread Kevin Rushforth
> Deprecate the `jdk.jsobject` module for removal from the JDK, and ship it > with JavaFX instead. > > See [JDK-8337280](https://bugs.openjdk.org/browse/JDK-8337280) / PR > openjdk/jfx#1529 for the JavaFX PR that will include the module with JavaFX. > That PR describes the needed test scenarios

Re: RFR: 8341789: Fix ExceptionOccurred in java.base

2024-10-10 Thread Lance Andersen
On Thu, 10 Oct 2024 11:40:27 GMT, Alan Bateman wrote: > > were left out from the commit for the PR but are listed in the JBS issue so > > it would be great to include the updates as part of this PR or explain why > > they were excluded if it was intentional > > The original bug report has seve

Re: RFR: 8341789: Fix ExceptionOccurred in java.base

2024-10-10 Thread Lance Andersen
On Wed, 9 Oct 2024 17:28:09 GMT, Justin Lu wrote: > Please review this PR which fixes incorrect usage of `jthrowable > ExceptionOccurred(JNIEnv *env)` within _java.base_. > > This corrects instances where the return value is being treated as a boolean. > Such occurrences are replaced with `jbo

Re: RFR: 8335989: Implement Module Import Declarations (Second Preview)

2024-10-10 Thread Jan Lahoda
On Wed, 9 Oct 2024 19:22:01 GMT, Jan Lahoda wrote: > This is a current patch for module imports declarations, second preview. At > least the JEP number and preview revision will need to be updated in > `jdk.internal.javac.PreviewFeature.Feature`, but otherwise I believe this is > ready to rece

Re: RFR: 8335989: Implement Module Import Declarations (Second Preview) [v2]

2024-10-10 Thread Jan Lahoda
> This is a current patch for module imports declarations, second preview. At > least the JEP number and preview revision will need to be updated in > `jdk.internal.javac.PreviewFeature.Feature`, but otherwise I believe this is > ready to receive feedback. > > The main changes are: > - `require

Re: RFR: 8341789: Fix ExceptionOccurred in java.base

2024-10-10 Thread Alan Bateman
On Thu, 10 Oct 2024 11:07:19 GMT, Lance Andersen wrote: > were left out from the commit for the PR but are listed in the JBS issue so > it would be great to include the updates as part of this PR or explain why > they were excluded if it was intentional The original bug report has several fals

Re: RFR: 8341789: Fix ExceptionOccurred in java.base

2024-10-10 Thread Lance Andersen
On Wed, 9 Oct 2024 17:28:09 GMT, Justin Lu wrote: > Please review this PR which fixes incorrect usage of `jthrowable > ExceptionOccurred(JNIEnv *env)` within _java.base_. > > This corrects instances where the return value is being treated as a boolean. > Such occurrences are replaced with `jbo

Re: RFR: 8341273: JVMTI is not properly hiding some continuation related methods [v3]

2024-10-10 Thread Serguei Spitsyn
On Wed, 9 Oct 2024 22:58:33 GMT, Serguei Spitsyn wrote: >> This fixes a problem in the VTMS (Virtual Thread Mount State) transition >> frames hiding mechanism. >> Please, see a fix description in the first comment. >> >> Testing: >> - Verified with new test `vthread/CheckHiddenFrames` >> - Ma

Re: RFR: 8341789: Fix ExceptionOccurred in java.base

2024-10-10 Thread Daniel Fuchs
On Wed, 9 Oct 2024 17:28:09 GMT, Justin Lu wrote: > Please review this PR which fixes incorrect usage of `jthrowable > ExceptionOccurred(JNIEnv *env)` within _java.base_. > > This corrects instances where the return value is being treated as a boolean. > Such occurrences are replaced with `jbo

Re: RFR: 8341900: Optimize DirectCodeBuilder writeBody

2024-10-10 Thread Chen Liang
On Thu, 10 Oct 2024 03:55:34 GMT, Shaojin Wen wrote: > A simple optimization to reduce duplicate code. Reduce the codeSize of > writeBody from 268 to 240 A simplification indeed. - Marked as reviewed by liach (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/21440#pullreque

RFR: 8341900: Optimize DirectCodeBuilder writeBody

2024-10-10 Thread Shaojin Wen
A simple optimization to reduce duplicate code. Reduce the codeSize of writeBody from 268 to 240 - Commit messages: - optimize writeBody Changes: https://git.openjdk.org/jdk/pull/21440/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=21440&range=00 Issue: https://bugs.ope

Re: RFR: 8340801: Disable ubsan checks in some awt/2d coding [v4]

2024-10-10 Thread Julian Waters
On Wed, 9 Oct 2024 07:50:20 GMT, Matthias Baesken wrote: >> There is some old awt/2d coding where warnings occur when running with ubsan >> enabled binaries. >> However at most of these locations the coding should work (at least on our >> supported platform set) so the warnings can be disabled

Re: RFR: 8340801: Disable ubsan checks in some awt/2d coding [v2]

2024-10-10 Thread Matthias Baesken
On Wed, 2 Oct 2024 20:29:10 GMT, David Holmes wrote: > jni_util.h is used across all modules but it is located in > `java.base/share/native/libjava` not `java.base/unix/native/libjava`. > > I think you could probably place ub.h along-side jni_util.h in that directory. Hi David, are you fine w

Re: RFR: 8341791: Fix ExceptionOccurred in java.prefs

2024-10-10 Thread Jaikiran Pai
On Wed, 9 Oct 2024 17:28:07 GMT, Justin Lu wrote: > Please review this PR which fixes incorrect usage of `jthrowable > ExceptionOccurred(JNIEnv *env)` within _java.prefs_. > > This corrects instances where the return value is being treated as a boolean. > Such occurrences are replaced with `jb

Re: RFR: 8341470: BigDecimal.stripTrailingZeros() optimization [v12]

2024-10-10 Thread fabioromano1
On Wed, 9 Oct 2024 21:11:16 GMT, Raffaello Giulietti wrote: >> @rgiulietti At least for me, the expression "the bits that differ from its >> sign bit" is misleading, it seems to implicitly imply that he is talking >> about the 1s bits which are not sign bits, while it means the bits whose >>

Re: RFR: 8341566: Add Reader.of(CharSequence) [v7]

2024-10-10 Thread Markus KARG
On Wed, 9 Oct 2024 18:42:20 GMT, Roger Riggs wrote: >> Markus KARG has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - assertThrows instead of expectedExceptions >> - ordered jtreg tags according recommendation in >> https://openjdk.org/

Re: RFR: 8341566: Add Reader.of(CharSequence) [v7]

2024-10-10 Thread Markus KARG
On Wed, 9 Oct 2024 19:19:04 GMT, Chen Liang wrote: >> src/java.base/share/classes/java/io/Reader.java line 161: >> >>> 159: * {@code transferTo()} methods all throw {@code IOException}. >>> 160: * >>> 161: * The returned reader supports the {@link #mark mark()} >>> operation. >>

Re: RFR: 8341566: Add Reader.of(CharSequence) [v8]

2024-10-10 Thread Markus KARG
> This Pull Requests proposes an implementation for > [JDK-8341566](https://bugs.openjdk.org/browse/JDK-8341566): Adding the new > method `public static Reader Reader.of(CharSequence)` will return an > anonymous, non-synchronized implementation of a `Reader` for each kind of > `CharSequence` im

Integrated: 8341722: Fix some warnings as errors when building on Linux with toolchain clang

2024-10-10 Thread Matthias Baesken
On Tue, 8 Oct 2024 13:38:54 GMT, Matthias Baesken wrote: > There are a few warnings as errors occurring when building on Linux with > clang (clang15). Mostly these are some kind of 'unused' warnings. > Might be related to https://bugs.openjdk.org/browse/JDK-8339156 . This pull request has now b

Re: RFR: 8341722: Fix some warnings as errors when building on Linux with toolchain clang [v2]

2024-10-10 Thread Matthias Baesken
On Wed, 9 Oct 2024 11:44:35 GMT, Matthias Baesken wrote: >> There are a few warnings as errors occurring when building on Linux with >> clang (clang15). Mostly these are some kind of 'unused' warnings. >> Might be related to https://bugs.openjdk.org/browse/JDK-8339156 . > > Matthias Baesken has

Re: RFR: 8341566: Add Reader.of(CharSequence) [v7]

2024-10-10 Thread Markus KARG
On Thu, 10 Oct 2024 04:50:18 GMT, Alan Bateman wrote: >> I see Alan and I have different views on the inclusion of the details. >> With only a single CharSequence argument, I can't see any ambiguity about >> the starting position. > >> I see Alan and I have different views on the inclusion of th

Re: RFR: 8341789: Fix ExceptionOccurred in java.base

2024-10-10 Thread Jaikiran Pai
On Wed, 9 Oct 2024 17:28:09 GMT, Justin Lu wrote: > Please review this PR which fixes incorrect usage of `jthrowable > ExceptionOccurred(JNIEnv *env)` within _java.base_. > > This corrects instances where the return value is being treated as a boolean. > Such occurrences are replaced with `jbo