Re: RFR: 8320448: Accelerate IndexOf using AVX2 [v41]

2024-05-24 Thread Alan Bateman
On Fri, 24 May 2024 23:15:26 GMT, Scott Gibbons wrote: >> Re-write the IndexOf code without the use of the pcmpestri instruction, only >> using AVX2 instructions. This change accelerates String.IndexOf on average >> 1.3x for AVX2. The benchmark numbers: >> >> >> Benchmark

Re: RFR: 8320448: Accelerate IndexOf using AVX2 [v35]

2024-05-24 Thread Sandhya Viswanathan
On Thu, 23 May 2024 23:12:42 GMT, Scott Gibbons wrote: >> Re-write the IndexOf code without the use of the pcmpestri instruction, only >> using AVX2 instructions. This change accelerates String.IndexOf on average >> 1.3x for AVX2. The benchmark numbers: >> >> >> Benchmark

Re: RFR: 8320448: Accelerate IndexOf using AVX2 [v41]

2024-05-24 Thread Sandhya Viswanathan
On Fri, 24 May 2024 23:15:26 GMT, Scott Gibbons wrote: >> Re-write the IndexOf code without the use of the pcmpestri instruction, only >> using AVX2 instructions. This change accelerates String.IndexOf on average >> 1.3x for AVX2. The benchmark numbers: >> >> >> Benchmark

Re: RFR: 8330182: Start of release updates for JDK 24 [v7]

2024-05-24 Thread Joe Darcy
> Get JDK 24 underway. Joe Darcy has updated the pull request incrementally with one additional commit since the last revision: Add symbol files current with JDK 23 build 24. - Changes: - all: https://git.openjdk.org/jdk/pull/18787/files - new: https://git.openjdk.org/jdk/pul

Re: RFR: 8332614: Type-checked ConstantPool.entryByIndex and ClassReader.readEntryOrNull [v3]

2024-05-24 Thread Chen Liang
> I propose to add type-checked ConstantPool.entryByIndex and > ClassReader.readEntryOrNull taking an extra Class parameter, which throws > ConstantPoolException instead of ClassCastException on type mismatch, which > can happen to malformed ClassFiles. > > Requesting a review from @asotona. Th

Re: RFR: 8330542: Template for Creating Strict JAXP Configuration File [v14]

2024-05-24 Thread Magnus Ihse Bursie
On Fri, 24 May 2024 16:36:32 GMT, Joe Wang wrote: >> Add two sample configuration files: >> >> jaxp-strict.properties: used to set strict configuration, stricter than >> jaxp.properties in previous versions such as JDK 22 >> >>> jaxp-compat.properties: used to regain compatibility from any

Re: RFR: 8320448: Accelerate IndexOf using AVX2 [v41]

2024-05-24 Thread Scott Gibbons
> Re-write the IndexOf code without the use of the pcmpestri instruction, only > using AVX2 instructions. This change accelerates String.IndexOf on average > 1.3x for AVX2. The benchmark numbers: > > > BenchmarkScore > Latest

Re: RFR: 8320448: Accelerate IndexOf using AVX2 [v20]

2024-05-24 Thread Scott Gibbons
On Tue, 21 May 2024 22:39:42 GMT, Sandhya Viswanathan wrote: >> Scott Gibbons has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Addressing lots of comments. Interim commit. > > src/hotspot/cpu/x86/c2_MacroAssembler_x86.cpp line 4737: >

Re: RFR: 8320448: Accelerate IndexOf using AVX2 [v27]

2024-05-24 Thread Scott Gibbons
On Wed, 22 May 2024 20:36:25 GMT, Sandhya Viswanathan wrote: >> Scott Gibbons has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Revert last change to IndexOf.java > > src/hotspot/cpu/x86/stubGenerator_x86_64_string.cpp line 1218: > >> 12

Re: RFR: 8320448: Accelerate IndexOf using AVX2 [v25]

2024-05-24 Thread Scott Gibbons
On Wed, 22 May 2024 18:22:24 GMT, Sandhya Viswanathan wrote: >> Scott Gibbons has updated the pull request incrementally with one additional >> commit since the last revision: >> >> un-helper-ize preload_needle_helper; try fix for macos build > > src/hotspot/cpu/x86/stubGenerator_x86_64_stri

Re: RFR: 8320448: Accelerate IndexOf using AVX2 [v35]

2024-05-24 Thread Scott Gibbons
On Fri, 24 May 2024 00:09:38 GMT, Sandhya Viswanathan wrote: >> Scott Gibbons has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Review comments - move stubGen*_string.cpp to c2_stubGen*_string.cpp > > src/hotspot/cpu/x86/c2_stubGenerator_

Re: RFR: 8320448: Accelerate IndexOf using AVX2 [v40]

2024-05-24 Thread Scott Gibbons
On Fri, 24 May 2024 22:26:56 GMT, Sandhya Viswanathan wrote: >> Scott Gibbons has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Review comments. > > src/hotspot/cpu/x86/c2_stubGenerator_x86_64_string.cpp line 1122: > >> 1120: // eq_mask

Re: RFR: 8320448: Accelerate IndexOf using AVX2 [v20]

2024-05-24 Thread Sandhya Viswanathan
On Fri, 17 May 2024 23:47:45 GMT, Scott Gibbons wrote: >> Re-write the IndexOf code without the use of the pcmpestri instruction, only >> using AVX2 instructions. This change accelerates String.IndexOf on average >> 1.3x for AVX2. The benchmark numbers: >> >> >> Benchmark

Re: RFR: 8320448: Accelerate IndexOf using AVX2 [v27]

2024-05-24 Thread Sandhya Viswanathan
On Wed, 22 May 2024 18:52:27 GMT, Scott Gibbons wrote: >> Re-write the IndexOf code without the use of the pcmpestri instruction, only >> using AVX2 instructions. This change accelerates String.IndexOf on average >> 1.3x for AVX2. The benchmark numbers: >> >> >> Benchmark

Re: RFR: 8320448: Accelerate IndexOf using AVX2 [v25]

2024-05-24 Thread Sandhya Viswanathan
On Wed, 22 May 2024 17:40:24 GMT, Scott Gibbons wrote: >> Re-write the IndexOf code without the use of the pcmpestri instruction, only >> using AVX2 instructions. This change accelerates String.IndexOf on average >> 1.3x for AVX2. The benchmark numbers: >> >> >> Benchmark

Re: RFR: 8320448: Accelerate IndexOf using AVX2 [v40]

2024-05-24 Thread Sandhya Viswanathan
On Fri, 24 May 2024 20:47:23 GMT, Scott Gibbons wrote: >> Re-write the IndexOf code without the use of the pcmpestri instruction, only >> using AVX2 instructions. This change accelerates String.IndexOf on average >> 1.3x for AVX2. The benchmark numbers: >> >> >> Benchmark

Re: RFR: 8320448: Accelerate IndexOf using AVX2 [v35]

2024-05-24 Thread Sandhya Viswanathan
On Thu, 23 May 2024 23:12:42 GMT, Scott Gibbons wrote: >> Re-write the IndexOf code without the use of the pcmpestri instruction, only >> using AVX2 instructions. This change accelerates String.IndexOf on average >> 1.3x for AVX2. The benchmark numbers: >> >> >> Benchmark

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

2024-05-24 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: > - `Refer

Re: RFR: 8332110: [macos] jpackage tries to sign added files without the --mac-sign option

2024-05-24 Thread Alexander Matveev
Hi Michael, > Doesn’t this still leave you with an application that isn’t validly signed? > And probably won’t run because of that. Yes, it will leave you with an application that isn’t signed. I was able to run such application on same machine as it was generated by jpackage. > For your exampl

Integrated: 8320575: generic type information lost on mandated parameters of record's compact constructors

2024-05-24 Thread Vicente Romero
On Mon, 11 Dec 2023 23:33:16 GMT, Vicente Romero wrote: > Reflection is not retrieving generic type information for mandated > parameters. This is a known issue which has been explicitly stated in the API > of some reflection methods. Fix for > [JDK-8292275](https://bugs.openjdk.org/browse/JDK

Re: RFR: 8320448: Accelerate IndexOf using AVX2 [v37]

2024-05-24 Thread Scott Gibbons
On Fri, 24 May 2024 19:30:54 GMT, Volodymyr Paprotski wrote: >> Scott Gibbons has updated the pull request incrementally with one additional >> commit since the last revision: >> >> mov64 => lea(InternalAddress) > > src/hotspot/cpu/x86/c2_MacroAssembler_x86.cpp line 4633: > >> 4631: andl

Re: RFR: 8320448: Accelerate IndexOf using AVX2 [v40]

2024-05-24 Thread Scott Gibbons
> Re-write the IndexOf code without the use of the pcmpestri instruction, only > using AVX2 instructions. This change accelerates String.IndexOf on average > 1.3x for AVX2. The benchmark numbers: > > > BenchmarkScore > Latest

Re: RFR: 8320448: Accelerate IndexOf using AVX2 [v19]

2024-05-24 Thread Volodymyr Paprotski
On Wed, 22 May 2024 14:50:40 GMT, Scott Gibbons wrote: >> test/jdk/java/lang/StringBuffer/IndexOf.java line 284: >> >>> 282: >>> 283: // Note: it is possible although highly improbable that failCount >>> will >>> 284: // be > 0 even if everthing is working ok >> >> This sounds like either

Re: RFR: 8320448: Accelerate IndexOf using AVX2 [v38]

2024-05-24 Thread Scott Gibbons
On Fri, 24 May 2024 20:12:07 GMT, Vladimir Kozlov wrote: >> Scott Gibbons has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Test clarifications > > test/jdk/java/lang/StringBuffer/IndexOf.java line 28: > >> 26: * @summary Test indexOf an

Re: RFR: 8320448: Accelerate IndexOf using AVX2 [v37]

2024-05-24 Thread Volodymyr Paprotski
On Fri, 24 May 2024 15:32:26 GMT, Scott Gibbons wrote: >> Re-write the IndexOf code without the use of the pcmpestri instruction, only >> using AVX2 instructions. This change accelerates String.IndexOf on average >> 1.3x for AVX2. The benchmark numbers: >> >> >> Benchmark

Re: RFR: 8320448: Accelerate IndexOf using AVX2 [v39]

2024-05-24 Thread Scott Gibbons
> Re-write the IndexOf code without the use of the pcmpestri instruction, only > using AVX2 instructions. This change accelerates String.IndexOf on average > 1.3x for AVX2. The benchmark numbers: > > > BenchmarkScore > Latest

Re: RFR: 8320448: Accelerate IndexOf using AVX2 [v38]

2024-05-24 Thread Vladimir Kozlov
On Fri, 24 May 2024 19:55:40 GMT, Scott Gibbons wrote: >> Re-write the IndexOf code without the use of the pcmpestri instruction, only >> using AVX2 instructions. This change accelerates String.IndexOf on average >> 1.3x for AVX2. The benchmark numbers: >> >> >> Benchmark

Re: RFR: 8320448: Accelerate IndexOf using AVX2 [v18]

2024-05-24 Thread Scott Gibbons
On Wed, 15 May 2024 19:41:58 GMT, Volodymyr Paprotski wrote: >> Scott Gibbons has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains 50 commits: >> >> - Merge remote-tracking branch 'origin/master' into indexof >> - Move arrays_equals

Re: RFR: 8320448: Accelerate IndexOf using AVX2 [v19]

2024-05-24 Thread Scott Gibbons
On Wed, 15 May 2024 19:34:40 GMT, Volodymyr Paprotski wrote: >> Scott Gibbons has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Rearrange; add lambdas for clarity > > test/jdk/java/lang/StringBuffer/IndexOf.java line 90: > >> 88: >> 89:

Re: RFR: 8320448: Accelerate IndexOf using AVX2 [v19]

2024-05-24 Thread Scott Gibbons
On Fri, 24 May 2024 18:32:53 GMT, Volodymyr Paprotski wrote: >> Fixed > > (missed a `git add`? don't see the updates for this file) Hmmm... Not sure what happened. >> Since we're only concerned with the delta of performance, does this really >> matter? Can you suggest an alternative? > > The

Re: RFR: 8320448: Accelerate IndexOf using AVX2 [v38]

2024-05-24 Thread Scott Gibbons
> Re-write the IndexOf code without the use of the pcmpestri instruction, only > using AVX2 instructions. This change accelerates String.IndexOf on average > 1.3x for AVX2. The benchmark numbers: > > > BenchmarkScore > Latest

Re: RFR: 8320575: generic type information lost on mandated parameters of record's compact constructors [v7]

2024-05-24 Thread Joe Darcy
On Fri, 10 May 2024 21:06:22 GMT, Vicente Romero wrote: >> As the core reflection code will encounter record classes compiled before >> and after the javac code generation change, if the old behavior can be >> triggered in javac using `--release $OLD`/`--source $OLD`, that would be >> helpful

Re: RFR: 8330182: Start of release updates for JDK 24 [v6]

2024-05-24 Thread Joe Darcy
> Get JDK 24 underway. Joe Darcy 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-8330188 - Merge branch 'master' into JDK-8330188 - Fix-up test. - Merge branch 'master' into JDK-8330188

Re: RFR: 8330542: Template for Creating Strict JAXP Configuration File [v14]

2024-05-24 Thread Lance Andersen
On Fri, 24 May 2024 16:36:32 GMT, Joe Wang wrote: >> Add two sample configuration files: >> >> jaxp-strict.properties: used to set strict configuration, stricter than >> jaxp.properties in previous versions such as JDK 22 >> >>> jaxp-compat.properties: used to regain compatibility from any

Re: RFR: 8332885: Clarify failure_handler self-tests

2024-05-24 Thread Erik Joelsson
On Fri, 24 May 2024 12:16:25 GMT, Ludvig Janiuk wrote: > Adding commetns to clarify that the failure_handler selftests are intended to > be run manually. Ideally this would include a more thorough description of > the exepcted outputs, but this is what I have time to add right now. test/failur

Re: RFR: 8332161: Test restoring echo in the Console implementation (java.base) [v5]

2024-05-24 Thread Naoto Sato
> This test intends to verify the behavior of JdkConsole for the java.base > module, wrt restoring the echo. The test assumes the internal methods that > sets/gets the echo status of the platform. Naoto Sato has updated the pull request with a new target base due to a merge or a rebase. The pul

Re: RFR: 8332161: Test restoring echo in the Console implementation (java.base) [v4]

2024-05-24 Thread Naoto Sato
> This test intends to verify the behavior of JdkConsole for the java.base > module, wrt restoring the echo. The test assumes the internal methods that > sets/gets the echo status of the platform. Naoto Sato has updated the pull request with a new target base due to a merge or a rebase. The inc

Re: RFR: 8320448: Accelerate IndexOf using AVX2 [v33]

2024-05-24 Thread Vladimir Kozlov
On Fri, 24 May 2024 15:33:46 GMT, Scott Gibbons wrote: >> Thanks for checking. Well I know that the >> `MacroAssembler::movdqu(XMMRegister dst, AddressLiteral src, Register >> rscratch)` method actually generates rip-relative addresses. Maybe we could >> copy some of that code. > > Changed to

Re: RFR: 8320448: Accelerate IndexOf using AVX2 [v19]

2024-05-24 Thread Volodymyr Paprotski
On Fri, 17 May 2024 23:59:05 GMT, Scott Gibbons wrote: >> test/jdk/java/lang/StringBuffer/IndexOf.java line 40: >> >>> 38: private static boolean failure = false; >>> 39: public static void main(String[] args) throws Exception { >>> 40: String testName = "IndexOf"; >> >> intentation > >

Re: RFR: 8320448: Accelerate IndexOf using AVX2 [v19]

2024-05-24 Thread Volodymyr Paprotski
On Wed, 22 May 2024 14:41:36 GMT, Scott Gibbons wrote: >> test/micro/org/openjdk/bench/java/lang/StringIndexOfHuge.java line 132: >> >>> 130: @Benchmark >>> 131: public int searchHugeLargeSubstring() { >>> 132: return dataStringHuge.indexOf("B".repeat(30) + "X" + >>> "A".repeat(30), 7

Re: RFR: 8320448: Accelerate IndexOf using AVX2 [v37]

2024-05-24 Thread Scott Gibbons
On Fri, 24 May 2024 17:59:49 GMT, Vladimir Kozlov wrote: >> Scott Gibbons has updated the pull request incrementally with one additional >> commit since the last revision: >> >> mov64 => lea(InternalAddress) > > My testing for v34 passed without new failures. Thank you @vnkozlov . Waiting f

Re: RFR: 8320448: Accelerate IndexOf using AVX2 [v37]

2024-05-24 Thread Vladimir Kozlov
On Fri, 24 May 2024 15:32:26 GMT, Scott Gibbons wrote: >> Re-write the IndexOf code without the use of the pcmpestri instruction, only >> using AVX2 instructions. This change accelerates String.IndexOf on average >> 1.3x for AVX2. The benchmark numbers: >> >> >> Benchmark

Re: RFR: 8320448: Accelerate IndexOf using AVX2 [v37]

2024-05-24 Thread Vladimir Kozlov
On Fri, 24 May 2024 15:32:26 GMT, Scott Gibbons wrote: >> Re-write the IndexOf code without the use of the pcmpestri instruction, only >> using AVX2 instructions. This change accelerates String.IndexOf on average >> 1.3x for AVX2. The benchmark numbers: >> >> >> Benchmark

Re: RFR: 8307818: Convert Indify tool to Classfile API [v9]

2024-05-24 Thread Oussama Louati
On Wed, 22 May 2024 22:37:35 GMT, Oussama Louati wrote: >> test/jdk/java/lang/invoke/CallSiteTest.java line 96: >> >>> 94: } >>> 95: >>> 96: public static class MyCCS extends ConstantCallSite { >> >> Any reason for this change? > > Otherwise, it throws an java.lang.IllegalAccessError:

Re: RFR: 8307818: Convert Indify tool to Classfile API [v9]

2024-05-24 Thread Oussama Louati
On Wed, 22 May 2024 08:57:23 GMT, Adam Sotona wrote: >> Oussama Louati has updated the pull request incrementally with 19 additional >> commits since the last revision: >> >> - fix: fixed whitespaces >> - fix: fixed whitespaces >> - chore: used Class::descriptorString >> - remove: added rem

Re: RFR: 8307818: Convert Indify tool to Classfile API [v8]

2024-05-24 Thread Oussama Louati
On Tue, 21 May 2024 11:37:26 GMT, Adam Sotona wrote: > Indify invocation on Microbenchmarks as a part of the JDK build (after > application of the above patch) still fails with: > > ``` > Failure on > /Applications/XcodeJIB.app/dev/github/jdk/build/macosx-aarch64/support/test/micro/classes > E

Re: RFR: 8307818: Convert Indify tool to Classfile API [v9]

2024-05-24 Thread Oussama Louati
On Fri, 24 May 2024 17:57:28 GMT, Oussama Louati wrote: >> An indify tool in j.l.i tests (also in vmTestBase) convert some source-code >> private static methods with MT_ MH_, and INDY_ prefixes into MethodHandle, >> MethodType, and CallSite constants. >> It currently uses ad-hoc code to process

Re: RFR: 8307818: Convert Indify tool to Classfile API [v9]

2024-05-24 Thread Adam Sotona
On Fri, 24 May 2024 17:57:28 GMT, Oussama Louati wrote: >> An indify tool in j.l.i tests (also in vmTestBase) convert some source-code >> private static methods with MT_ MH_, and INDY_ prefixes into MethodHandle, >> MethodType, and CallSite constants. >> It currently uses ad-hoc code to process

Re: RFR: 8307818: Convert Indify tool to Classfile API [v9]

2024-05-24 Thread Oussama Louati
> An indify tool in j.l.i tests (also in vmTestBase) convert some source-code > private static methods with MT_ MH_, and INDY_ prefixes into MethodHandle, > MethodType, and CallSite constants. > It currently uses ad-hoc code to process class files and intends to migrate > to ASM; but since we ha

Integrated: 8332084: Ensure JdkConsoleImpl.restoreEcho visibility in a shutdown hook

2024-05-24 Thread Naoto Sato
On Fri, 10 May 2024 21:55:26 GMT, Naoto Sato wrote: > Making sure `restoreEcho` correctly reflects the state in the shutdown > thread, which differs from the application's thread that issues the > `readPassword()` method. This pull request has now been integrated. Changeset: 236432db Author:

Re: RFR: 8332898: failure_handler: log directory of commands

2024-05-24 Thread Leonid Mesnik
On Fri, 24 May 2024 14:34:39 GMT, Ludvig Janiuk wrote: > Also log the directory in which the command used by failure_handler was > executed. While often the same, it isn't always, and so it this should > simplify troubleshooting for someone looking at this at a glance without > being a failure

Re: RFR: 8332885: Clarify failure_handler self-tests

2024-05-24 Thread Leonid Mesnik
On Fri, 24 May 2024 12:16:25 GMT, Ludvig Janiuk wrote: > Adding commetns to clarify that the failure_handler selftests are intended to > be run manually. Ideally this would include a more thorough description of > the exepcted outputs, but this is what I have time to add right now. Marked as r

Re: RFR: 8332084: Ensure JdkConsoleImpl.restoreEcho visibility in a shutdown hook [v10]

2024-05-24 Thread Naoto Sato
> Making sure `restoreEcho` correctly reflects the state in the shutdown > thread, which differs from the application's thread that issues the > `readPassword()` method. Naoto Sato has updated the pull request incrementally with one additional commit since the last revision: Added comment fo

Re: RFR: 8328821: Map.of().entrySet() mutators should throw UnsupportedOperationException

2024-05-24 Thread Stuart Marks
On Wed, 27 Mar 2024 17:36:28 GMT, Liam Miller-Cushon wrote: > This change overrides mutator methods in the implementation returned by > `Map.of().entrySet()` to throw `UnsupportedOperationException`. Sorry for the delay, I'm still totally backlogged on other stuff. I can't commit to get this i

Re: RFR: 8330542: Template for Creating Strict JAXP Configuration File [v14]

2024-05-24 Thread Joe Wang
On Fri, 24 May 2024 16:36:32 GMT, Joe Wang wrote: >> Add two sample configuration files: >> >> jaxp-strict.properties: used to set strict configuration, stricter than >> jaxp.properties in previous versions such as JDK 22 >> >>> jaxp-compat.properties: used to regain compatibility from any

Re: RFR: 8332597: Remove redundant methods from j.l.classfile.ClassReader API [v2]

2024-05-24 Thread Adam Sotona
> j.l.classfile.ClassReader instance is exposed in the Class-File API through > j.l.classfile.AttributeMapper::readAttribute method only. > ClassReader only purpose is to serve as a tool for reading content of a > custom attribute in a user-provided AttribtueMapper. > It contains useful set of lo

Re: RFR: 8330542: Template for Creating Strict JAXP Configuration File [v14]

2024-05-24 Thread Joe Wang
> Add two sample configuration files: > > jaxp-strict.properties: used to set strict configuration, stricter than > jaxp.properties in previous versions such as JDK 22 > >> jaxp-compat.properties: used to regain compatibility from any more >> restricted configuration than previous versions

Re: RFR: 8294960: Convert java.base/java.lang.invoke package to use the Classfile API to generate lambdas and method handles [v13]

2024-05-24 Thread Adam Sotona
> java.base java.lang.invoke package heavily uses ASM to generate lambdas and > method handles. > > This patch converts ASM calls to Classfile API. > > This PR is continuation of https://github.com/openjdk/jdk/pull/12945 > > Any comments and suggestions are welcome. > > Please review. > > Tha

Re: RFR: 8320396: Class-File API ClassModel::verify should include checks from hotspot/share/classfile/classFileParser.cpp [v9]

2024-05-24 Thread Adam Sotona
> ClassFile API `jdk.internal.classfile.verifier.VerifierImpl` performed only > bytecode-level class verification. > This patch adds `jdk.internal.classfile.verifier.ParserVerifier` with > additional class checks inspired by > `hotspot/share/classfile/classFileParser.cpp`. > > Also new `Verifie

Re: RFR: 8332084: Ensure JdkConsoleImpl.restoreEcho visibility in a shutdown hook [v9]

2024-05-24 Thread Stuart Marks
On Fri, 24 May 2024 15:38:16 GMT, Naoto Sato wrote: >> Making sure `restoreEcho` correctly reflects the state in the shutdown >> thread, which differs from the application's thread that issues the >> `readPassword()` method. > > Naoto Sato has updated the pull request with a new target base due

Integrated: 8331291: java.lang.classfile.Attributes class performs a lot of static initializations

2024-05-24 Thread Adam Sotona
On Mon, 29 Apr 2024 18:48:53 GMT, Adam Sotona wrote: > Hi, > During performance optimization work on Class-File API as JDK lambda > generator we found some static initialization killers. > One of them is `java.lang.classfile.Attributes` with tens of static fields > initialized with individual a

Re: RFR: 8331876: JFR: Move file read and write events to java.base [v3]

2024-05-24 Thread Erik Gahlin
On Tue, 21 May 2024 22:41:12 GMT, Stuart Marks wrote: >> I think `if (jfrTracing && FileReadEvent.enabled())` would be more readable >> as it would avoid calling going through the traceXXX methods when the flag >> is enabled but the specific event is not enabled. > > Collapsing the extra layer

Re: RFR: 8332161: Test restoring echo in the Console implementation (java.base) [v3]

2024-05-24 Thread Naoto Sato
> This test intends to verify the behavior of JdkConsole for the java.base > module, wrt restoring the echo. The test assumes the internal methods that > sets/gets the echo status of the platform. Naoto Sato has updated the pull request with a new target base due to a merge or a rebase. The inc

Re: RFR: 8332084: Ensure JdkConsoleImpl.restoreEcho visibility in a shutdown hook [v9]

2024-05-24 Thread Naoto Sato
> Making sure `restoreEcho` correctly reflects the state in the shutdown > thread, which differs from the application's thread that issues the > `readPassword()` method. Naoto Sato has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes th

Re: RFR: 8320448: Accelerate IndexOf using AVX2 [v33]

2024-05-24 Thread Scott Gibbons
On Fri, 24 May 2024 14:49:05 GMT, Daniel Jeliński wrote: >> Just did the experiment and it turns out that `mov64(r15, >> (int64_t)small_jump_table)` and `lea(r15, >> ExternalAddress(small_jump_table))` produce exactly the same code: >> >> `0x7fffe463d68b: 49 bf a0 d5 63 e4 ff 7f 00 00 m

Re: RFR: 8320448: Accelerate IndexOf using AVX2 [v37]

2024-05-24 Thread Scott Gibbons
> Re-write the IndexOf code without the use of the pcmpestri instruction, only > using AVX2 instructions. This change accelerates String.IndexOf on average > 1.3x for AVX2. The benchmark numbers: > > > BenchmarkScore > Latest

Re: RFR: 8320448: Accelerate IndexOf using AVX2 [v33]

2024-05-24 Thread Vladimir Kozlov
On Fri, 24 May 2024 14:49:05 GMT, Daniel Jeliński wrote: >> Just did the experiment and it turns out that `mov64(r15, >> (int64_t)small_jump_table)` and `lea(r15, >> ExternalAddress(small_jump_table))` produce exactly the same code: >> >> `0x7fffe463d68b: 49 bf a0 d5 63 e4 ff 7f 00 00 m

Re: RFR: 8331670: Deprecate the Memory-Access Methods in sun.misc.Unsafe for Removal [v3]

2024-05-24 Thread Daniel Fuchs
On Tue, 21 May 2024 07:26:17 GMT, Alan Bateman wrote: >> This is the implementation changes for JEP 471. >> >> The methods in sun.misc.Unsafe for on-heap and off-heap access are >> deprecated for removal. This means a removal warning at compile time. No >> methods have been removed. A deprecat

Re: RFR: 8327964: Simplify BigInteger.implMultiplyToLen intrinsic [v7]

2024-05-24 Thread Yudi Zheng
> Moving array construction within BigInteger.implMultiplyToLen intrinsic > candidate to its caller simplifies the intrinsic implementation in JIT > compiler. Yudi Zheng has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated

Re: RFR: 8332589: ubsan: unix/native/libjava/ProcessImpl_md.c:562:5: runtime error: null pointer passed as argument 2, which is declared to never be null [v3]

2024-05-24 Thread Martin Doerr
On Fri, 24 May 2024 07:24:13 GMT, Matthias Baesken wrote: >> When building with ubsan enabled (--enable-uban) on Linux x86_64 and doing >> jtreg tests afterwards I run into this error : >> >> /jdk/src/java.base/unix/native/libjava/ProcessImpl_md.c:562:5: runtime >> error: null pointer passed a

Re: RFR: 8327964: Simplify BigInteger.implMultiplyToLen intrinsic [v6]

2024-05-24 Thread Yudi Zheng
On Thu, 23 May 2024 10:12:17 GMT, Bhavana Kilambi wrote: >> Yudi Zheng has updated the pull request incrementally with one additional >> commit since the last revision: >> >> address comments. > > src/hotspot/share/opto/library_call.cpp line 5925: > >> 5923: // Set the original stack and t

Re: RFR: 8320448: Accelerate IndexOf using AVX2 [v33]

2024-05-24 Thread Daniel Jeliński
On Fri, 24 May 2024 14:19:13 GMT, Scott Gibbons wrote: >> the RIP-relative lea should have a shorter encoding. I think something like >> `lea(r15, ExternalAddress(small_jump_table))` should produce it (untested) > > Just did the experiment and it turns out that `mov64(r15, > (int64_t)small_jump

RFR: 8332898: failure_handler: log directory of commands

2024-05-24 Thread Ludvig Janiuk
Also log the directory in which the command used by failure_handler was executed. While often the same, it isn't always, and so it this should simplify troubleshooting for someone looking at this at a glance without being a failure_handler expert. Example output after this change:

Re: RFR: 8320448: Accelerate IndexOf using AVX2 [v33]

2024-05-24 Thread Scott Gibbons
On Fri, 24 May 2024 06:31:40 GMT, Daniel Jeliński wrote: >> It may, but I believe the movq is shorter (although maybe not to r15). I'll >> do some experimentation. > > the RIP-relative lea should have a shorter encoding. I think something like > `lea(r15, ExternalAddress(small_jump_table))` sh

Re: RFR: 8332589: ubsan: unix/native/libjava/ProcessImpl_md.c:562:5: runtime error: null pointer passed as argument 2, which is declared to never be null [v3]

2024-05-24 Thread Roger Riggs
On Fri, 24 May 2024 07:24:13 GMT, Matthias Baesken wrote: >> When building with ubsan enabled (--enable-uban) on Linux x86_64 and doing >> jtreg tests afterwards I run into this error : >> >> /jdk/src/java.base/unix/native/libjava/ProcessImpl_md.c:562:5: runtime >> error: null pointer passed a

Re: RFR: 8331051: Add an `@since` checker test for `java.base` module [v7]

2024-05-24 Thread Jan Lahoda
On Wed, 22 May 2024 13:58:21 GMT, Nizar Benalla wrote: >> This checker checks the values of the `@since` tag found in the >> documentation comment for an element against the release in which the >> element first appeared. >> >> Real since value of an API element is computed as the oldest relea

Re: RFR: 8320448: Accelerate IndexOf using AVX2 [v35]

2024-05-24 Thread Scott Gibbons
On Fri, 24 May 2024 00:47:04 GMT, Vladimir Kozlov wrote: >> Scott Gibbons has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Review comments - move stubGen*_string.cpp to c2_stubGen*_string.cpp > > test/jdk/java/lang/StringBuffer/IndexOf.ja

Re: RFR: 8320448: Accelerate IndexOf using AVX2 [v33]

2024-05-24 Thread Scott Gibbons
On Fri, 24 May 2024 06:31:36 GMT, Daniel Jeliński wrote: >> Thanks for finding this. It was ignorance on my part as I thought the xorq >> would have logic to not emit the REX prefix if not necessary, but it >> doesn't. Fixed. > > Right, it seems to surprise people. There's a lot of preexistin

Re: RFR: 8320448: Accelerate IndexOf using AVX2 [v36]

2024-05-24 Thread Scott Gibbons
> Re-write the IndexOf code without the use of the pcmpestri instruction, only > using AVX2 instructions. This change accelerates String.IndexOf on average > 1.3x for AVX2. The benchmark numbers: > > > BenchmarkScore > Latest

Integrated: 8305457: Implement java.io.IO

2024-05-24 Thread Pavel Rappo
On Mon, 6 May 2024 21:45:12 GMT, Pavel Rappo wrote: > Please review this PR which introduces the `java.io.IO` top-level class and > three methods to `java.io.Console` for [Implicitly Declared Classes and > Instance Main Methods (Third Preview)]. > > This PR has been obtained as `git merge --sq

Re: RFR: 8305457: Implement java.io.IO [v14]

2024-05-24 Thread Jan Lahoda
On Fri, 24 May 2024 11:30:19 GMT, Pavel Rappo wrote: >> Please review this PR which introduces the `java.io.IO` top-level class and >> three methods to `java.io.Console` for [Implicitly Declared Classes and >> Instance Main Methods (Third Preview)]. >> >> This PR has been obtained as `git merg

Re: RFR: 8331291: java.lang.classfile.Attributes class performs a lot of static initializations [v11]

2024-05-24 Thread Adam Sotona
> Hi, > During performance optimization work on Class-File API as JDK lambda > generator we found some static initialization killers. > One of them is `java.lang.classfile.Attributes` with tens of static fields > initialized with individual attribute mappers, and common set of all mappers, > and

RFR: 8332885: Clarify failure_handler self-tests

2024-05-24 Thread Ludvig Janiuk
Adding commetns to clarify that the failure_handler selftests are intended to be run manually. Ideally this would include a more thorough description of the exepcted outputs, but this is what I have time to add right now. - Commit messages: - 8332885 Clarify failure_handler self-te

Re: RFR: 8330542: Template for Creating Strict JAXP Configuration File [v13]

2024-05-24 Thread Alan Bateman
On Fri, 24 May 2024 05:26:40 GMT, Joe Wang wrote: >> Add two sample configuration files: >> >> jaxp-strict.properties: used to set strict configuration, stricter than >> jaxp.properties in previous versions such as JDK 22 >> >>> jaxp-compat.properties: used to regain compatibility from any

Re: RFR: 8305457: Implement java.io.IO [v14]

2024-05-24 Thread Pavel Rappo
> Please review this PR which introduces the `java.io.IO` top-level class and > three methods to `java.io.Console` for [Implicitly Declared Classes and > Instance Main Methods (Third Preview)]. > > This PR has been obtained as `git merge --squash` of a now obsolete [draft > PR]. > > [Implicitl

Re: RFR: 8305457: Implement java.io.IO [v13]

2024-05-24 Thread Jan Lahoda
On Thu, 23 May 2024 17:14:19 GMT, Pavel Rappo wrote: >> Please review this PR which introduces the `java.io.IO` top-level class and >> three methods to `java.io.Console` for [Implicitly Declared Classes and >> Instance Main Methods (Third Preview)]. >> >> This PR has been obtained as `git merg

Re: RFR: 8331291: java.lang.classfile.Attributes class performs a lot of static initializations [v10]

2024-05-24 Thread Claes Redestad
On Fri, 24 May 2024 08:24:15 GMT, Adam Sotona wrote: >> Hi, >> During performance optimization work on Class-File API as JDK lambda >> generator we found some static initialization killers. >> One of them is `java.lang.classfile.Attributes` with tens of static fields >> initialized with individ

Re: RFR: 8330542: Template for Creating Strict JAXP Configuration File [v13]

2024-05-24 Thread Magnus Ihse Bursie
On Fri, 24 May 2024 05:26:40 GMT, Joe Wang wrote: >> Add two sample configuration files: >> >> jaxp-strict.properties: used to set strict configuration, stricter than >> jaxp.properties in previous versions such as JDK 22 >> >>> jaxp-compat.properties: used to regain compatibility from any

Re: RFR: 8332110: [macos] jpackage tries to sign added files without the --mac-sign option

2024-05-24 Thread Michael Hall
> On May 24, 2024, at 3:08 AM, Michael Hall wrote: > >> On May 23, 2024, at 8:13 PM, Alexander Matveev > > wrote: >> >> otherwise add additional content as post-processing step. > > Doesn’t this still leave you with an application that isn’t validly signed? > And

Re: RFR: 8332589: ubsan: unix/native/libjava/ProcessImpl_md.c:562:5: runtime error: null pointer passed as argument 2, which is declared to never be null [v3]

2024-05-24 Thread Magnus Ihse Bursie
On Fri, 24 May 2024 07:24:13 GMT, Matthias Baesken wrote: >> When building with ubsan enabled (--enable-uban) on Linux x86_64 and doing >> jtreg tests afterwards I run into this error : >> >> /jdk/src/java.base/unix/native/libjava/ProcessImpl_md.c:562:5: runtime >> error: null pointer passed a

Re: RFR: 8331291: java.lang.classfile.Attributes class performs a lot of static initializations [v10]

2024-05-24 Thread Adam Sotona
> Hi, > During performance optimization work on Class-File API as JDK lambda > generator we found some static initialization killers. > One of them is `java.lang.classfile.Attributes` with tens of static fields > initialized with individual attribute mappers, and common set of all mappers, > and

Re: RFR: 8242888: Convert dynamic proxy to hidden classes

2024-05-24 Thread Alan Bateman
On Thu, 23 May 2024 23:24:16 GMT, Chen Liang wrote: > Hmm, actually, looking at the specs of the method again, does it imply that > Proxy classes are never unloaded once defined in a ClassLoader, as seen in > `Proxy::getProxyClass`: It's not specified, Proxy pre-dates hidden classes although i

Re: RFR: 8331291: java.lang.classfile.Attributes class performs a lot of static initializations [v9]

2024-05-24 Thread Adam Sotona
> Hi, > During performance optimization work on Class-File API as JDK lambda > generator we found some static initialization killers. > One of them is `java.lang.classfile.Attributes` with tens of static fields > initialized with individual attribute mappers, and common set of all mappers, > and

Re: RFR: 8332589: ubsan: unix/native/libjava/ProcessImpl_md.c:562:5: runtime error: null pointer passed as argument 2, which is declared to never be null [v2]

2024-05-24 Thread Matthias Baesken
On Thu, 23 May 2024 07:26:14 GMT, Matthias Baesken wrote: >> When building with ubsan enabled (--enable-uban) on Linux x86_64 and doing >> jtreg tests afterwards I run into this error : >> >> /jdk/src/java.base/unix/native/libjava/ProcessImpl_md.c:562:5: runtime >> error: null pointer passed a

Re: RFR: 8332589: ubsan: unix/native/libjava/ProcessImpl_md.c:562:5: runtime error: null pointer passed as argument 2, which is declared to never be null [v3]

2024-05-24 Thread Matthias Baesken
> When building with ubsan enabled (--enable-uban) on Linux x86_64 and doing > jtreg tests afterwards I run into this error : > > /jdk/src/java.base/unix/native/libjava/ProcessImpl_md.c:562:5: runtime error: > null pointer passed as argument 2, which is declared to never be null > #0 0x7fd95

Re: RFR: 8327964: Simplify BigInteger.implMultiplyToLen intrinsic [v6]

2024-05-24 Thread Fei Yang
On Wed, 22 May 2024 14:47:43 GMT, Yudi Zheng wrote: >> Moving array construction within BigInteger.implMultiplyToLen intrinsic >> candidate to its caller simplifies the intrinsic implementation in JIT >> compiler. > > Yudi Zheng has updated the pull request incrementally with one additional >