Re: RFR: 8323835: Updating ASM to 9.6 for JDK 23

2024-01-25 Thread Mandy Chung
On Tue, 16 Jan 2024 21:18:55 GMT, Vicente Romero wrote: > Updating ASM to version 9.6, > > Thanks in advance for the reviews, > Vicente Looks okay to me. I would rely on your testing for verification. - Marked as reviewed by mchung (Reviewer). PR Review:

Re: RFR: 8323835: Updating ASM to 9.6 for JDK 23

2024-01-25 Thread Vicente Romero
On Tue, 16 Jan 2024 21:18:55 GMT, Vicente Romero wrote: > Updating ASM to version 9.6, > > Thanks in advance for the reviews, > Vicente hi Mandy, thanks for your comments, > The change looks okay to me. Most of the changes are doc change. I see many > files are updated just to remove the

Re: RFR: 8200559: Java agents doing instrumentation need a means to define auxiliary classes [v2]

2024-01-25 Thread Alexander Kriegisch
On Thu, 25 Jan 2024 13:33:10 GMT, Andrew Dinn wrote: >> Requiring such an API opens the module to anybody, though, punching a hole >> into the module boundary. >> >> BB currently opens the jdk.internal.misc.Unsafe class to a module on a >> seperate class loader that is not reachable outside

Re: RFR: 8314480: Memory ordering spec updates in java.lang.ref [v7]

2024-01-25 Thread Brent Christian
> Classes in the `java.lang.ref` package would benefit from an update to bring > the spec in line with how the VM already behaves. The changes would focus on > _happens-before_ edges at some key points during reference processing. > > A couple key things we want to be able to say are: > -

Re: RFR: 8314480: Memory ordering spec updates in java.lang.ref [v6]

2024-01-25 Thread Brent Christian
On Tue, 23 Jan 2024 11:40:00 GMT, Kim Barrett wrote: >> Brent Christian has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Tweak Reference.enqueue memory consistency effects wording > >

Re: RFR: 8323699: MessageFormat.toPattern() generates non-equivalent MessageFormat pattern [v5]

2024-01-25 Thread Archie Cobbs
On Thu, 25 Jan 2024 22:49:39 GMT, Justin Lu wrote: > In terms of the CSR,... Hi Justin, thanks again very much for the comments and careful review. The CSR should be updated accordingly. - PR Comment: https://git.openjdk.org/jdk/pull/17416#issuecomment-1911134650

Re: RFR: 8323699: MessageFormat.toPattern() generates non-equivalent MessageFormat pattern [v5]

2024-01-25 Thread Justin Lu
On Thu, 25 Jan 2024 21:38:54 GMT, Archie Cobbs wrote: >> Please consider this fix to ensure that going from `MessageFormat` to >> pattern string via `toPattern()` and then back via `new MessageFormat()` >> results in a format that is equivalent to the original. >> >> The quoting and escaping

Re: RFR: 8323699: MessageFormat.toPattern() generates non-equivalent MessageFormat pattern [v5]

2024-01-25 Thread Archie Cobbs
> Please consider this fix to ensure that going from `MessageFormat` to pattern > string via `toPattern()` and then back via `new MessageFormat()` results in a > format that is equivalent to the original. > > The quoting and escaping rules for `MessageFormat` pattern strings are really >

Integrated: 8323717: Introduce test keyword for tests that need external dependencies

2024-01-25 Thread Aleksey Shipilev
On Mon, 15 Jan 2024 10:48:23 GMT, Aleksey Shipilev wrote: > Some jtreg tests require resolvable external dependencies. This resolution is > delegated to JIB, which is not used in vanilla OpenJDK testing. It would be > convenient to add a keyword that marks tests that require these external >

Re: RFR: 8323717: Introduce test keyword for tests that need external dependencies

2024-01-25 Thread Aleksey Shipilev
On Mon, 15 Jan 2024 10:48:23 GMT, Aleksey Shipilev wrote: > Some jtreg tests require resolvable external dependencies. This resolution is > delegated to JIB, which is not used in vanilla OpenJDK testing. It would be > convenient to add a keyword that marks tests that require these external >

Re: RFR: 8303374: Implement JEP 455: Primitive Types in Patterns, instanceof, and switch (Preview) [v54]

2024-01-25 Thread Aggelos Biboudis
> This is the proposed patch for Primitive types in patterns, instanceof, and > switch (Preview). > > Draft spec here: https://cr.openjdk.org/~abimpoudis/instanceof/latest/ Aggelos Biboudis has updated the pull request incrementally with one additional commit since the last revision: Small

Re: RFR: 8303374: Implement JEP 455: Primitive Types in Patterns, instanceof, and switch (Preview) [v53]

2024-01-25 Thread Aggelos Biboudis
> This is the proposed patch for Primitive types in patterns, instanceof, and > switch (Preview). > > Draft spec here: https://cr.openjdk.org/~abimpoudis/instanceof/latest/ Aggelos Biboudis has updated the pull request incrementally with one additional commit since the last revision: Tidy

Re: RFR: 8323717: Introduce test keyword for tests that need external dependencies

2024-01-25 Thread Leonid Mesnik
On Wed, 24 Jan 2024 21:28:29 GMT, Leonid Mesnik wrote: >> Some jtreg tests require resolvable external dependencies. This resolution >> is delegated to JIB, which is not used in vanilla OpenJDK testing. It would >> be convenient to add a keyword that marks tests that require these external >>

Re: RFR: 8324433: Introduce a way to determine if an expression is evaluated as a constant by the Jit compiler [v6]

2024-01-25 Thread Aleksey Shipilev
On Thu, 25 Jan 2024 14:48:16 GMT, Maurizio Cimadamore wrote: > I don't 100% buy the `MethodHandleImpl` analogy. In that case the check is > not simply used to save a branch, but to spare spinning of a completely new > lambda form. Doing this to save a few intructions would not likely to

Integrated: 8324657: Intermittent OOME on exception message create

2024-01-25 Thread Roger Riggs
On Mon, 22 Jan 2024 20:52:32 GMT, Roger Riggs wrote: > When an exception handler for an OutOfMemoryError uses string concatenation > to compose an exception message, the invoke dynamic string format > implementation may itself exhaust memory, preventing the exception from being > handled. >

Re: RFR: 8324657: Intermittent OOME on exception message create [v2]

2024-01-25 Thread Roger Riggs
> When an exception handler for an OutOfMemoryError uses string concatenation > to compose an exception message, the invoke dynamic string format > implementation may itself exhaust memory, preventing the exception from being > handled. > Explicit use of String.concat() call can improve

Re: RFR: 8324433: Introduce a way to determine if an expression is evaluated as a constant by the Jit compiler [v6]

2024-01-25 Thread Maurizio Cimadamore
On Thu, 25 Jan 2024 12:52:21 GMT, Maurizio Cimadamore wrote: >>> > Naive question: the right way to use this would be almost invariably be >>> > like this: >>> > ``` >>> > if (isCompileConstant(foo) && fooHasCertainStaticProperties(foo)) { >>> > // fast-path >>> > } >>> > // slow path >>>

Re: RFR: 8324433: Introduce a way to determine if an expression is evaluated as a constant by the Jit compiler [v7]

2024-01-25 Thread Quan Anh Mai
> Hi, > > This patch introduces `JitCompiler::isConstantExpression` which can be used > to statically determine whether an expression has been constant-folded by the > Jit compiler, leading to more constant-folding opportunities. For example, it > can be used in

Re: RFR: 8324433: Introduce a way to determine if an expression is evaluated as a constant by the Jit compiler [v5]

2024-01-25 Thread Quan Anh Mai
On Thu, 25 Jan 2024 05:06:12 GMT, David Holmes wrote: >> I agree. All values are produced by evaluating expressions. In this case we >> want to query whether a value produced by the compiler evaluating its >> expression is a constant value (inputs to the expression are constants and >> the

Re: RFR: 8324433: Introduce a way to determine if an expression is evaluated as a constant by the Jit compiler [v6]

2024-01-25 Thread Quan Anh Mai
On Thu, 25 Jan 2024 12:52:21 GMT, Maurizio Cimadamore wrote: >>> > Naive question: the right way to use this would be almost invariably be >>> > like this: >>> > ``` >>> > if (isCompileConstant(foo) && fooHasCertainStaticProperties(foo)) { >>> > // fast-path >>> > } >>> > // slow path >>>

Re: Gatherer: spliterator characteristics are not propagated

2024-01-25 Thread forax
> From: "Viktor Klang" > To: "Remi Forax" > Cc: "core-libs-dev" , "Paul Sandoz" > > Sent: Wednesday, January 24, 2024 2:45:15 PM > Subject: Re: Gatherer: spliterator characteristics are not propagated > As a (related) side-note, the ability to implement the interface directly has > a >

Re: RFR: 8303374: Implement JEP 455: Primitive Types in Patterns, instanceof, and switch (Preview) [v50]

2024-01-25 Thread Aggelos Biboudis
On Thu, 25 Jan 2024 09:57:13 GMT, Maurizio Cimadamore wrote: >> Aggelos Biboudis has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Update year > > src/java.base/share/classes/java/lang/runtime/SwitchBootstraps.java line 148: > >> 146:

Re: RFR: 8303374: Implement JEP 455: Primitive Types in Patterns, instanceof, and switch (Preview) [v52]

2024-01-25 Thread Aggelos Biboudis
> This is the proposed patch for Primitive types in patterns, instanceof, and > switch (Preview). > > Draft spec here: https://cr.openjdk.org/~abimpoudis/instanceof/latest/ Aggelos Biboudis has updated the pull request incrementally with one additional commit since the last revision: Tidy

Re: RFR: 8200559: Java agents doing instrumentation need a means to define auxiliary classes [v2]

2024-01-25 Thread Andrew Dinn
On Thu, 25 Jan 2024 12:16:13 GMT, Rafael Winterhalter wrote: > Requiring such an API opens the module to anybody, though, punching a hole > into the module boundary. How so? Any module created to print Lookups can easily rely on a shared secret to secure the API. Byteman employs a non-null

Re: Gatherer: spliterator characteristics are not propagated

2024-01-25 Thread forax
> From: "Viktor Klang" > To: "Remi Forax" > Cc: "core-libs-dev" , "Paul Sandoz" > > Sent: Wednesday, January 24, 2024 2:34:11 PM > Subject: Re: Gatherer: spliterator characteristics are not propagated > Presuming that you mean mutating the Gatherer such that its behavior isn't > stable, the

Re: RFR: 8324433: Introduce a way to determine if an expression is evaluated as a constant by the Jit compiler [v6]

2024-01-25 Thread Maurizio Cimadamore
On Thu, 25 Jan 2024 07:41:27 GMT, Roland Westrelin wrote: > > > Naive question: the right way to use this would be almost invariably be > > > like this: > > > ``` > > > if (isCompileConstant(foo) && fooHasCertainStaticProperties(foo)) { > > > // fast-path > > > } > > > // slow path > > >

Re: RFR: 8200559: Java agents doing instrumentation need a means to define auxiliary classes [v2]

2024-01-25 Thread Rafael Winterhalter
On Fri, 16 Apr 2021 20:30:15 GMT, Rafael Winterhalter wrote: >> To allow agents the definition of auxiliary classes, an API is needed to >> allow this. Currently, this is often achieved by using `sun.misc.Unsafe` or >> `jdk.internal.misc.Unsafe` ever since the `defineClass` method was removed

Re: RFR: 8303374: Implement JEP 455: Primitive Types in Patterns, instanceof, and switch (Preview) [v51]

2024-01-25 Thread Aggelos Biboudis
> This is the proposed patch for Primitive types in patterns, instanceof, and > switch (Preview). > > Draft spec here: https://cr.openjdk.org/~abimpoudis/instanceof/latest/ Aggelos Biboudis has updated the pull request incrementally with one additional commit since the last revision:

Re: RFR: 8303374: Implement JEP 455: Primitive Types in Patterns, instanceof, and switch (Preview) [v44]

2024-01-25 Thread Aggelos Biboudis
On Thu, 25 Jan 2024 10:22:52 GMT, Maurizio Cimadamore wrote: >> see my other comment above that I think supersedes this one > > I see what you mean, that said, I think having some high-level checks driving > low-level classfile generation is pretty standard for code generators (e.g. > lambda

Re: RFR: 8303374: Implement JEP 455: Primitive Types in Patterns, instanceof, and switch (Preview) [v50]

2024-01-25 Thread Aggelos Biboudis
On Thu, 25 Jan 2024 10:21:26 GMT, Maurizio Cimadamore wrote: >> Aggelos Biboudis has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Update year > > src/java.base/share/classes/java/lang/runtime/SwitchBootstraps.java line 404: > >> 402:

Re: RFR: 8303374: Implement JEP 455: Primitive Types in Patterns, instanceof, and switch (Preview) [v45]

2024-01-25 Thread Aggelos Biboudis
On Wed, 24 Jan 2024 17:29:09 GMT, Vicente Romero wrote: >> Aggelos Biboudis has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Remove redundant test from checkUnconditionallyExact > >

Re: RFR: 8303374: Implement JEP 455: Primitive Types in Patterns, instanceof, and switch (Preview) [v50]

2024-01-25 Thread Jan Lahoda
On Thu, 25 Jan 2024 10:15:48 GMT, Maurizio Cimadamore wrote: >> Aggelos Biboudis has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Update year > > src/java.base/share/classes/java/lang/runtime/SwitchBootstraps.java line 592: > >> 590:

Re: RFR: 8303374: Implement JEP 455: Primitive Types in Patterns, instanceof, and switch (Preview) [v44]

2024-01-25 Thread Jan Lahoda
On Thu, 25 Jan 2024 10:12:31 GMT, Maurizio Cimadamore wrote: >> src/java.base/share/classes/java/lang/runtime/SwitchBootstraps.java line 471: >> >>> 469: // o instanceof float >>> 470: Label notNumber = cb.newLabel(); >>>

Re: RFR: 8320575: generic type information lost on mandated parameters [v9]

2024-01-25 Thread Serafin
On Thu, 14 Dec 2023 03:57:51 GMT, Vicente Romero wrote: >> Vicente Romero has updated the pull request incrementally with one >> additional commit since the last revision: >> >> adding a comment to the test > > I have uploaded a few commits addressing the review comments, thanks! Will this

Re: RFR: JDK-8324598: use mem_unit when working with sysinfo memory and swap related information [v2]

2024-01-25 Thread Matthias Baesken
On Thu, 25 Jan 2024 09:15:38 GMT, Matthias Baesken wrote: >> According to the sysinfo manpage ( >> https://man7.org/linux/man-pages/man2/sysinfo.2.html ) the memory and swap >> related entries in the struct sysinfo are given as multiples of mem_unit >> bytes. >> "In the above structure, sizes

Integrated: JDK-8324598: use mem_unit when working with sysinfo memory and swap related information

2024-01-25 Thread Matthias Baesken
On Wed, 24 Jan 2024 10:07:17 GMT, Matthias Baesken wrote: > According to the sysinfo manpage ( > https://man7.org/linux/man-pages/man2/sysinfo.2.html ) the memory and swap > related entries in the struct sysinfo are given as multiples of mem_unit > bytes. > "In the above structure, sizes of

Re: RFR: 8303374: Implement JEP 455: Primitive Types in Patterns, instanceof, and switch (Preview) [v44]

2024-01-25 Thread Maurizio Cimadamore
On Wed, 24 Jan 2024 17:30:34 GMT, Vicente Romero wrote: >> src/java.base/share/classes/java/lang/runtime/SwitchBootstraps.java line 461: >> >>> 459: // Object o = ... >>> 460: // o instanceof Wrapped(float) >>> 461:

Re: RFR: 8303374: Implement JEP 455: Primitive Types in Patterns, instanceof, and switch (Preview) [v50]

2024-01-25 Thread Maurizio Cimadamore
On Wed, 24 Jan 2024 23:50:51 GMT, Aggelos Biboudis wrote: >> This is the proposed patch for Primitive types in patterns, instanceof, and >> switch (Preview). >> >> Draft spec here: https://cr.openjdk.org/~abimpoudis/instanceof/latest/ > > Aggelos Biboudis has updated the pull request

Re: RFR: JDK-8324598: use mem_unit when working with sysinfo memory and swap related information [v2]

2024-01-25 Thread Martin Doerr
On Thu, 25 Jan 2024 09:15:38 GMT, Matthias Baesken wrote: >> According to the sysinfo manpage ( >> https://man7.org/linux/man-pages/man2/sysinfo.2.html ) the memory and swap >> related entries in the struct sysinfo are given as multiples of mem_unit >> bytes. >> "In the above structure, sizes

Re: RFR: 8303374: Implement JEP 455: Primitive Types in Patterns, instanceof, and switch (Preview) [v50]

2024-01-25 Thread Maurizio Cimadamore
On Wed, 24 Jan 2024 23:50:51 GMT, Aggelos Biboudis wrote: >> This is the proposed patch for Primitive types in patterns, instanceof, and >> switch (Preview). >> >> Draft spec here: https://cr.openjdk.org/~abimpoudis/instanceof/latest/ > > Aggelos Biboudis has updated the pull request

Re: RFR: 8322768: Optimize non-subword vector compress and expand APIs for AVX2 target. [v9]

2024-01-25 Thread Jatin Bhateja
On Thu, 25 Jan 2024 09:15:26 GMT, Emanuel Peter wrote: >> Jatin Bhateja 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 10 additional >>

Re: RFR: 8303374: Implement JEP 455: Primitive Types in Patterns, instanceof, and switch (Preview) [v44]

2024-01-25 Thread Maurizio Cimadamore
On Wed, 24 Jan 2024 15:37:58 GMT, Vicente Romero wrote: >> Aggelos Biboudis has updated the pull request incrementally with two >> additional commits since the last revision: >> >> - Enhance Javadoc of ExactConversionsSupport (2) >> - Enhance Javadoc of ExactConversionsSupport > >

Integrated: 8322768: Optimize non-subword vector compress and expand APIs for AVX2 target.

2024-01-25 Thread Jatin Bhateja
On Thu, 4 Jan 2024 05:28:59 GMT, Jatin Bhateja wrote: > Hi, > > Patch optimizes non-subword vector compress and expand APIs for x86 AVX2 only > targets. > Upcoming E-core Xeons (Sierra Forest) and Hybrid CPUs only support AVX2 > instruction set. > These are very frequently used APIs in

Re: RFR: 8200559: Java agents doing instrumentation need a means to define auxiliary classes [v2]

2024-01-25 Thread Andrew Dinn
On Thu, 25 Jan 2024 06:39:56 GMT, Alexander Kriegisch wrote: >> Setting '-javaagent' is mainly an operations problem. Many build tools do >> not allow to declare a test dependency this way as the life cycles are not >> laid out for it, the internal repository location might be machine >>

Re: RFR: 8303374: Implement JEP 455: Primitive Types in Patterns, instanceof, and switch (Preview) [v50]

2024-01-25 Thread Maurizio Cimadamore
On Wed, 24 Jan 2024 23:50:51 GMT, Aggelos Biboudis wrote: >> This is the proposed patch for Primitive types in patterns, instanceof, and >> switch (Preview). >> >> Draft spec here: https://cr.openjdk.org/~abimpoudis/instanceof/latest/ > > Aggelos Biboudis has updated the pull request

Re: RFR: 8323717: Introduce test keyword for tests that need external dependencies

2024-01-25 Thread Aleksey Shipilev
On Wed, 24 Jan 2024 21:28:29 GMT, Leonid Mesnik wrote: >> Some jtreg tests require resolvable external dependencies. This resolution >> is delegated to JIB, which is not used in vanilla OpenJDK testing. It would >> be convenient to add a keyword that marks tests that require these external >>

Re: RFR: 8322768: Optimize non-subword vector compress and expand APIs for AVX2 target. [v9]

2024-01-25 Thread Emanuel Peter
On Tue, 23 Jan 2024 11:56:58 GMT, Jatin Bhateja wrote: >> Hi, >> >> Patch optimizes non-subword vector compress and expand APIs for x86 AVX2 >> only targets. >> Upcoming E-core Xeons (Sierra Forest) and Hybrid CPUs only support AVX2 >> instruction set. >> These are very frequently used APIs

Re: RFR: JDK-8324598: use mem_unit when working with sysinfo memory and swap related information [v2]

2024-01-25 Thread Matthias Baesken
> According to the sysinfo manpage ( > https://man7.org/linux/man-pages/man2/sysinfo.2.html ) the memory and swap > related entries in the struct sysinfo are given as multiples of mem_unit > bytes. > "In the above structure, sizes of the memory and swap fields are given as > multiples of

Re: RFR: JDK-8324598: use mem_unit when working with sysinfo memory and swap related information

2024-01-25 Thread Matthias Baesken
On Wed, 24 Jan 2024 10:07:17 GMT, Matthias Baesken wrote: > According to the sysinfo manpage ( > https://man7.org/linux/man-pages/man2/sysinfo.2.html ) the memory and swap > related entries in the struct sysinfo are given as multiples of mem_unit > bytes. > "In the above structure, sizes of

[jdk22] Integrated: 8319128: sun/security/pkcs11 tests fail on OL 7.9 aarch64

2024-01-25 Thread Goetz Lindenmaier
On Tue, 23 Jan 2024 10:21:42 GMT, Goetz Lindenmaier wrote: > I backport this to fix this issue in 22. We see it failing there in our CI. This pull request has now been integrated. Changeset: 57bc96e5 Author:Goetz Lindenmaier URL: