Re: RFR: 8302871: Speed up StringLatin1.regionMatchesCI [v14]

2023-02-22 Thread Eirik Bjorsnos
On Thu, 23 Feb 2023 07:21:08 GMT, Eirik Bjorsnos wrote: > Seems compatibility with existing 6-bit devices might have been the primary > concern: This also explains the placement of brackets, braces, bars, tilde etc. They would look visually similar on 6-bit devices:

Re: RFR: 8302871: Speed up StringLatin1.regionMatchesCI [v14]

2023-02-22 Thread Eirik Bjorsnos
On Wed, 22 Feb 2023 20:01:52 GMT, Eirik Bjorsnos wrote: >> This PR suggests we can speed up `StringLatin1.regionMatchesCI` by applying >> 'the oldest ASCII trick in the book'. >> >> The new static method `CharacterDataLatin1.equalsIgnoreCase` compares two >> latin1 bytes for equality ignoring

Re: RFR: 8303040: linux PPC64le: Implementation of Foreign Function & Memory API (Preview) [v3]

2023-02-22 Thread Martin Doerr
On Thu, 23 Feb 2023 06:18:49 GMT, Martin Doerr wrote: >> Implementation of "Foreign Function & Memory API" for linux on Power (Little >> Endian) according to "Power Architecture 64-Bit ELF V2 ABI Specification". >> >> This PR does not include code for VaList support because it's supposed to

Re: RFR: 8302806: (fs) Remove com.sun.nio.file.SensitivityWatchEventModifier [v3]

2023-02-22 Thread Alan Bateman
On Wed, 22 Feb 2023 23:35:08 GMT, Brian Burkhalter wrote: >> This enum is not used in the JDK and did not appear in external source code >> searches. > > Brian Burkhalter has updated the pull request incrementally with one > additional commit since the last revision: > > 8302806: Remove

Re: RFR: 8303040: linux PPC64le: Implementation of Foreign Function & Memory API (Preview) [v3]

2023-02-22 Thread Martin Doerr
On Thu, 23 Feb 2023 06:18:49 GMT, Martin Doerr wrote: >> Implementation of "Foreign Function & Memory API" for linux on Power (Little >> Endian) according to "Power Architecture 64-Bit ELF V2 ABI Specification". >> >> This PR does not include code for VaList support because it's supposed to

Re: RFR: 8303040: linux PPC64le: Implementation of Foreign Function & Memory API (Preview) [v3]

2023-02-22 Thread Martin Doerr
> Implementation of "Foreign Function & Memory API" for linux on Power (Little > Endian) according to "Power Architecture 64-Bit ELF V2 ABI Specification". > > This PR does not include code for VaList support because it's supposed to get > removed by

Re: RFR: 8303040: linux PPC64le: Implementation of Foreign Function & Memory API (Preview)

2023-02-22 Thread Martin Doerr
On Wed, 22 Feb 2023 17:03:16 GMT, Jorn Vernee wrote: > I will do a more thorough review soon. Thanks a lot! > > The ABI has some tricky corner cases related to HFA (Homogeneous Float > > Aggregate). The same argument may need to get passed in both, a FP reg and > > a GP reg or stack slot

Re: RFR: 8303040: linux PPC64le: Implementation of Foreign Function & Memory API (Preview) [v2]

2023-02-22 Thread Martin Doerr
On Thu, 23 Feb 2023 04:37:49 GMT, Martin Doerr wrote: >> Implementation of "Foreign Function & Memory API" for linux on Power (Little >> Endian) according to "Power Architecture 64-Bit ELF V2 ABI Specification". >> >> This PR does not include code for VaList support because it's supposed to

Re: RFR: 8303040: linux PPC64le: Implementation of Foreign Function & Memory API (Preview) [v2]

2023-02-22 Thread Martin Doerr
On Wed, 22 Feb 2023 18:23:54 GMT, Jorn Vernee wrote: >> Martin Doerr has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Clean fix for NativeMemorySegmentImpl issue with byteSize 0. > >

Re: RFR: 8303040: linux PPC64le: Implementation of Foreign Function & Memory API (Preview) [v2]

2023-02-22 Thread Martin Doerr
On Wed, 22 Feb 2023 18:31:45 GMT, Maurizio Cimadamore wrote: >> Martin Doerr has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Clean fix for NativeMemorySegmentImpl issue with byteSize 0. > >

Re: RFR: 8303040: linux PPC64le: Implementation of Foreign Function & Memory API (Preview) [v2]

2023-02-22 Thread Martin Doerr
> Implementation of "Foreign Function & Memory API" for linux on Power (Little > Endian) according to "Power Architecture 64-Bit ELF V2 ABI Specification". > > This PR does not include code for VaList support because it's supposed to get > removed by

Re: RFR: 8302204: Optimize BigDecimal.divide

2023-02-22 Thread Xiaowei Lu
On Tue, 14 Feb 2023 03:20:14 GMT, Sergey Kuksenko wrote: >> [JDK-8269667](https://bugs.openjdk.org/browse/JDK-8269667) has uncovered the >> poor performance of BigDecimal.divide under certain circumstance. >> >> We confront similar situations when benchmarking Spark3 on TPC-DS test kit. >>

Re: RFR: 8302976: C2 intrinsification of Float.floatToFloat16 and Float.float16ToFloat yields different result than the interpreter

2023-02-22 Thread Joe Darcy
On Wed, 22 Feb 2023 09:46:59 GMT, Doug Simon wrote: > > That said, I think it is reasonable on a given JVM invocation if > > Float.floatToFloat16(f) gave the same result for input f regardless of in > > what context it was called. > > Yes, I'm under the impression that for math API methods

Re: RFR: 8302976: C2 intrinsification of Float.floatToFloat16 and Float.float16ToFloat yields different result than the interpreter

2023-02-22 Thread Dean Long
On Wed, 22 Feb 2023 21:21:42 GMT, Vladimir Kozlov wrote: >>> I'm also a bit concerned that we are rushing in to "fix" this. IIUC we have >>> three mechanisms for implementing this functionality: >>> >>> 1. The interpreted Java code >>> >>> 2. The compiled non-intrinisc sharedRuntime

Re: RFR: 8302806: (fs) Remove com.sun.nio.file.SensitivityWatchEventModifier [v3]

2023-02-22 Thread Brian Burkhalter
> This enum is not used in the JDK and did not appear in external source code > searches. Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision: 8302806: Remove sensitivity from PollingWatchService - Changes: - all:

Re: RFR: 8292914: Drop the counter from lambda class names

2023-02-22 Thread John Rose
On 15 Feb 2023, at 10:34, Mandy Chung wrote: On Wed, 15 Feb 2023 17:32:38 GMT, David M. Lloyd wrote: The class generated for lambda proxies is now defined as a hidden class. This means that the counter, which was used to ensure a unique class name and avoid clashes, is now redundant. In

Integrated: JDK-8302028: Port fdlibm atan2 to Java

2023-02-22 Thread Joe Darcy
On Thu, 16 Feb 2023 19:30:06 GMT, Joe Darcy wrote: > Working down the porting list, next stop, atan2. This pull request has now been integrated. Changeset: fcaf8714 Author:Joe Darcy URL: https://git.openjdk.org/jdk/commit/fcaf871408321ed523cf1c6dd3adf9914f2bf9aa Stats: 615

Re: RFR: JDK-8302028: Port fdlibm atan2 to Java [v5]

2023-02-22 Thread Brian Burkhalter
On Tue, 21 Feb 2023 23:03:04 GMT, Joe Darcy wrote: >> Working down the porting list, next stop, atan2. > > Joe Darcy has updated the pull request incrementally with one additional > commit since the last revision: > > Respond to review feedback. Looks good. - Marked as

Re: RFR: 8302976: C2 intrinsification of Float.floatToFloat16 and Float.float16ToFloat yields different result than the interpreter

2023-02-22 Thread Sandhya Viswanathan
On Wed, 22 Feb 2023 21:21:42 GMT, Vladimir Kozlov wrote: >>> I'm also a bit concerned that we are rushing in to "fix" this. IIUC we have >>> three mechanisms for implementing this functionality: >>> >>> 1. The interpreted Java code >>> >>> 2. The compiled non-intrinisc sharedRuntime

Re: RFR: 8292914: Drop the counter from lambda class names [v8]

2023-02-22 Thread Ioi Lam
On Fri, 17 Feb 2023 19:37:59 GMT, David M. Lloyd wrote: >> The class generated for lambda proxies is now defined as a hidden class. >> This means that the counter, which was used to ensure a unique class name >> and avoid clashes, is now redundant. In addition to performing redundant >> work,

Re: RFR: 8302154: Hidden classes created by LambdaMetaFactory can't be unloaded [v2]

2023-02-22 Thread Rémi Forax
On Wed, 22 Feb 2023 17:05:00 GMT, Kasper Nielsen wrote: >> Volker Simonis has updated the pull request incrementally with two >> additional commits since the last revision: >> >> - Remove assertions which insist on Lambda proxy classes being strongly >> linked to their class loader >> -

Re: RFR: 8302976: C2 intrinsification of Float.floatToFloat16 and Float.float16ToFloat yields different result than the interpreter

2023-02-22 Thread Vladimir Kozlov
On Wed, 22 Feb 2023 05:21:48 GMT, Joe Darcy wrote: >> I'm also a bit concerned that we are rushing in to "fix" this. IIUC we have >> three mechanisms for implementing this functionality: >> >> 1. The interpreted Java code >> 2. The compiled non-intrinisc sharedRuntime code >> 3. The compiler

Re: RFR: 8302976: C2 intrinsification of Float.floatToFloat16 and Float.float16ToFloat yields different result than the interpreter

2023-02-22 Thread Dean Long
On Wed, 22 Feb 2023 05:21:48 GMT, Joe Darcy wrote: >> I'm also a bit concerned that we are rushing in to "fix" this. IIUC we have >> three mechanisms for implementing this functionality: >> >> 1. The interpreted Java code >> 2. The compiled non-intrinisc sharedRuntime code >> 3. The compiler

Re: RFR: 8302983: ZoneRulesProvider.registerProvider() twice will remove provider

2023-02-22 Thread Naoto Sato
On Tue, 21 Feb 2023 13:44:52 GMT, Madjosz wrote: > Fixes JDK-8302983 (and duplicate JDK-8302898) Thanks for fixing this. Some comments follow. test/jdk/java/time/test/java/time/zone/TestZoneRulesProvider.java line 43: > 41: /** > 42: * @summary Tests for ZoneRulesProvider class. > 43: *

Re: RFR: 8302871: Speed up StringLatin1.regionMatchesCI [v14]

2023-02-22 Thread Eirik Bjorsnos
> This PR suggests we can speed up `StringLatin1.regionMatchesCI` by applying > 'the oldest ASCII trick in the book'. > > The new static method `CharacterDataLatin1.equalsIgnoreCase` compares two > latin1 bytes for equality ignoring case. `StringLatin1.regionMatchesCI` is > updated to use

Re: RFR: 8293667: Align jlink's --compress option with jmod's --compress option [v11]

2023-02-22 Thread Ian Graves
On Wed, 22 Feb 2023 19:39:28 GMT, Ian Graves wrote: >> This is an approach to adding a flag to jlink that will allow --compress to >> take the same types of arguments as jmod, thus bringing the two into >> alignment. This likely requires a CSR and a discussion on whether we should >>

Re: RFR: 8293667: Align jlink's --compress option with jmod's --compress option [v11]

2023-02-22 Thread Ian Graves
> This is an approach to adding a flag to jlink that will allow --compress to > take the same types of arguments as jmod, thus bringing the two into > alignment. This likely requires a CSR and a discussion on whether we should > deprecate or simply remove the original numeric compression

Re: RFR: 8302871: Speed up StringLatin1.regionMatchesCI [v13]

2023-02-22 Thread Eirik Bjorsnos
> This PR suggests we can speed up `StringLatin1.regionMatchesCI` by applying > 'the oldest ASCII trick in the book'. > > The new static method `CharacterDataLatin1.equalsIgnoreCase` compares two > latin1 bytes for equality ignoring case. `StringLatin1.regionMatchesCI` is > updated to use

Re: RFR: 8302976: C2 intrinsification of Float.floatToFloat16 and Float.float16ToFloat yields different result than the interpreter

2023-02-22 Thread Vladimir Kozlov
On Wed, 22 Feb 2023 02:08:27 GMT, Sandhya Viswanathan wrote: > Change the java/lang/float.java and the corresponding shared runtime constant > expression evaluation to generate QNaN. > The HW instructions generate QNaNs and not SNaNs for floating point > instructions. This happens across

Re: RFR: 8302899: Executors.newSingleThreadExecutor can use Cleaner to shutdown executor [v3]

2023-02-22 Thread Brent Christian
On Wed, 22 Feb 2023 18:57:00 GMT, Alan Bateman wrote: >> The cleaning action would not have access to the isShutdown() instance >> method of the (Phantom-reachable) AutoShutdownDelegatedExecutorService. > >> The cleaning action would not have access to the isShutdown() instance >> method of

Re: RFR: 8302899: Executors.newSingleThreadExecutor can use Cleaner to shutdown executor [v3]

2023-02-22 Thread Alan Bateman
On Wed, 22 Feb 2023 18:41:13 GMT, Brent Christian wrote: > The cleaning action would not have access to the isShutdown() instance method > of the (Phantom-reachable) AutoShutdownDelegatedExecutorService. The cleaning action has a reference to the delegate (the underlying ExecutorService) so

Re: RFR: 8302871: Speed up StringLatin1.regionMatchesCI [v12]

2023-02-22 Thread Eirik Bjorsnos
On Wed, 22 Feb 2023 16:37:45 GMT, Eirik Bjorsnos wrote: >> This PR suggests we can speed up `StringLatin1.regionMatchesCI` by applying >> 'the oldest ASCII trick in the book'. >> >> The new static method `CharacterDataLatin1.equalsIgnoreCase` compares two >> latin1 bytes for equality ignoring

Re: RFR: 8302899: Executors.newSingleThreadExecutor can use Cleaner to shutdown executor [v3]

2023-02-22 Thread Brent Christian
On Wed, 22 Feb 2023 18:02:46 GMT, Alan Bateman wrote: >> src/java.base/share/classes/java/util/concurrent/Executors.java line 844: >> >>> 842: @Override >>> 843: public void shutdown() { >>> 844: cleaner.clean(); >> >> Hmmm... so now shutdown no longer requires

Re: RFR: 8303040: linux PPC64le: Implementation of Foreign Function & Memory API (Preview)

2023-02-22 Thread Maurizio Cimadamore
On Wed, 22 Feb 2023 05:31:46 GMT, Martin Doerr wrote: > Implementation of "Foreign Function & Memory API" for linux on Power (Little > Endian) according to "Power Architecture 64-Bit ELF V2 ABI Specification". > > This PR does not include code for VaList support because it's supposed to get >

Re: RFR: 8298619: java/io/File/GetXSpace.java is failing [v2]

2023-02-22 Thread Brian Burkhalter
On Tue, 14 Feb 2023 16:31:48 GMT, Brian Burkhalter wrote: >>> Another possibility would be to add a native method to the test itself to >>> invoke >>> [GetDiskSpaceInformationW](https://learn.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-getdiskspaceinformationw) >>> to obtain the

Re: RFR: 8298619: java/io/File/GetXSpace.java is failing [v2]

2023-02-22 Thread Brian Burkhalter
> Modify the `Space` instances used for size comparison to be created with > total number of bytes derived from the Windows `diskFree` utility instead of > Cygwin’s `df`. Brian Burkhalter has updated the pull request incrementally with two additional commits since the last revision: -

Re: RFR: 8303040: linux PPC64le: Implementation of Foreign Function & Memory API (Preview)

2023-02-22 Thread Jorn Vernee
On Wed, 22 Feb 2023 05:31:46 GMT, Martin Doerr wrote: > Implementation of "Foreign Function & Memory API" for linux on Power (Little > Endian) according to "Power Architecture 64-Bit ELF V2 ABI Specification". > > This PR does not include code for VaList support because it's supposed to get >

Re: RFR: 8301119: Support for GB18030-2022 [v2]

2023-02-22 Thread Naoto Sato
On Wed, 22 Feb 2023 11:34:59 GMT, Alan Bateman wrote: >> src/java.base/share/classes/sun/nio/cs/StandardCharsets.java.template line >> 217: >> >>> 215: if (VM.initLevel() < 1) { >>> 216: // Cannot get the system property yet. Assumes non-2000 >>> 217:

Re: RFR: 8301119: Support for GB18030-2022 [v2]

2023-02-22 Thread Naoto Sato
> Upgrading the GB18030 charset in the JDK to the latest 2022 standard. Since > this is not a compatible upgrade to the existing mapping, a new system > property `jdk.charset.GB18030` is introduced. If it is set to "2000", the > mapping falls back to the existing mapping based on the 2000

Re: RFR: 8302899: Executors.newSingleThreadExecutor can use Cleaner to shutdown executor [v3]

2023-02-22 Thread Alan Bateman
On Wed, 22 Feb 2023 17:20:21 GMT, Daniel Fuchs wrote: > Hmmm... so now shutdown no longer requires permission. You should probably > call super.shutdown() before invoking cleaner.clean(), assuming that > shutdown() can be called twice. You could modify the cleanup action to only > call

Re: RFR: 8302976: C2 intrinsification of Float.floatToFloat16 and Float.float16ToFloat yields different result than the interpreter

2023-02-22 Thread Sandhya Viswanathan
On Wed, 22 Feb 2023 04:03:02 GMT, David Holmes wrote: >> Change the java/lang/float.java and the corresponding shared runtime >> constant expression evaluation to generate QNaN. >> The HW instructions generate QNaNs and not SNaNs for floating point >> instructions. This happens across double,

Integrated: 8302667: Improve message format when failing to load symbols or libraries

2023-02-22 Thread Julian Waters
On Thu, 16 Feb 2023 15:02:38 GMT, Julian Waters wrote: > DLL_ERROR4 is a macro expanding to an error message when a failure to load a > generic item (shared libraries or an exported symbol from said libraries for > example) occurs. "Error: loading:" is not a very pretty message, so this >

Re: RFR: 8302667: Improve message format when failing to load symbols or libraries [v2]

2023-02-22 Thread Julian Waters
On Tue, 21 Feb 2023 16:59:18 GMT, Mandy Chung wrote: >> Julian Waters 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 two additional >> commits

Re: RFR: 8302667: Improve message format when failing to load symbols or libraries [v4]

2023-02-22 Thread Julian Waters
> DLL_ERROR4 is a macro expanding to an error message when a failure to load a > generic item (shared libraries or an exported symbol from said libraries for > example) occurs. "Error: loading:" is not a very pretty message, so this > small change results in "Error: Failed to load %s" instead,

Re: RFR: 8302267: [jittester] Improve separation of test generation and execution [v2]

2023-02-22 Thread Evgeny Nikitin
> Please review a set of improvements that should improve working with other > fuzzing generators and usage of JitTesterDriver with tests generated not by > the JITTester: > > - Provide better separation of individual test generation from java file > writing, compiling, executing, etc.; > -

Re: RFR: 8303040: linux PPC64le: Implementation of Foreign Function & Memory API (Preview)

2023-02-22 Thread Jorn Vernee
On Wed, 22 Feb 2023 17:03:16 GMT, Jorn Vernee wrote: > (I'd be happy to implement the needed changes in shared code if you want, > since it touches `BindingSpecializer` which is pretty dense) FYI: https://github.com/openjdk/jdk/compare/master...JornVernee:jdk:I2L (assuming `I2L` has the same

Re: RFR: 8302899: Executors.newSingleThreadExecutor can use Cleaner to shutdown executor [v3]

2023-02-22 Thread Daniel Fuchs
On Wed, 22 Feb 2023 16:17:11 GMT, Alan Bateman wrote: >> Executors.newSingleThreadExecutor returns a delegating ExecutorService that >> has finalizer to shutdown the underlying TPE when the wrapper is >> finalizable. It goes back to JDK 6 and JDK-6399443. This is the last >> non-empty

Re: RFR: 8302154: Hidden classes created by LambdaMetaFactory can't be unloaded [v2]

2023-02-22 Thread Kasper Nielsen
On Thu, 9 Feb 2023 18:11:18 GMT, Volker Simonis wrote: >> Prior to >> [JDK-8239384](https://bugs.openjdk.org/browse/JDK-8239384)/[JDK-8238358](https://bugs.openjdk.org/browse/JDK-8238358) >> LambdaMetaFactory has created VM-anonymous classes which could easily be >> unloaded once they were

Re: RFR: 8303040: linux PPC64le: Implementation of Foreign Function & Memory API (Preview)

2023-02-22 Thread Jorn Vernee
On Wed, 22 Feb 2023 05:31:46 GMT, Martin Doerr wrote: > Implementation of "Foreign Function & Memory API" for linux on Power (Little > Endian) according to "Power Architecture 64-Bit ELF V2 ABI Specification". > > This PR does not include code for VaList support because it's supposed to get >

Re: RFR: 8302667: Improve message format when failing to load symbols or libraries [v3]

2023-02-22 Thread Mandy Chung
On Tue, 21 Feb 2023 17:14:57 GMT, Julian Waters wrote: >> DLL_ERROR4 is a macro expanding to an error message when a failure to load a >> generic item (shared libraries or an exported symbol from said libraries for >> example) occurs. "Error: loading:" is not a very pretty message, so this >>

Re: RFR: 8292914: Drop the counter from lambda class names [v8]

2023-02-22 Thread Mandy Chung
On Fri, 17 Feb 2023 19:37:59 GMT, David M. Lloyd wrote: >> The class generated for lambda proxies is now defined as a hidden class. >> This means that the counter, which was used to ensure a unique class name >> and avoid clashes, is now redundant. In addition to performing redundant >> work,

Re: RFR: 8292914: Drop the counter from lambda class names [v8]

2023-02-22 Thread David M . Lloyd
On Fri, 17 Feb 2023 19:37:59 GMT, David M. Lloyd wrote: >> The class generated for lambda proxies is now defined as a hidden class. >> This means that the counter, which was used to ensure a unique class name >> and avoid clashes, is now redundant. In addition to performing redundant >> work,

Re: RFR: 8292914: Drop the counter from lambda class names [v8]

2023-02-22 Thread Brian Goetz
On Tue, 21 Feb 2023 19:08:30 GMT, Joe Darcy wrote: >> David M. Lloyd has updated the pull request incrementally with two >> additional commits since the last revision: >> >> - Many tests have patterns for lambda class names; update them >> - Update comments and javadoc showin the old pattern

Re: RFR: 8302871: Speed up StringLatin1.regionMatchesCI [v12]

2023-02-22 Thread Eirik Bjorsnos
> This PR suggests we can speed up `StringLatin1.regionMatchesCI` by applying > 'the oldest ASCII trick in the book'. > > The new static method `CharacterDataLatin1.equalsIgnoreCase` compares two > latin1 bytes for equality ignoring case. `StringLatin1.regionMatchesCI` is > updated to use

Re: RFR: 8302871: Speed up StringLatin1.regionMatchesCI [v10]

2023-02-22 Thread Eirik Bjorsnos
On Wed, 22 Feb 2023 16:25:41 GMT, Martin Buchholz wrote: >> Eirik Bjorsnos has updated the pull request incrementally with two >> additional commits since the last revision: >> >> - Replace 'oldest ASCII trick in the book' use in toUpperCase, toLowerCase >> with "by removing (setting) a

Re: RFR: 8302871: Speed up StringLatin1.regionMatchesCI [v7]

2023-02-22 Thread Eirik Bjorsnos
On Wed, 22 Feb 2023 16:10:42 GMT, Martin Buchholz wrote: >> Thanks Martin, David, Alan. This was instructive (and fun!) >> >> I suggest we condense the comment to something like this: >> >> >> // Uppercase b1 by removing a single bit >> int upper = b1 & 0xDF; >> if (upper < 'A') { >>

Re: RFR: 8302871: Speed up StringLatin1.regionMatchesCI [v10]

2023-02-22 Thread Martin Buchholz
On Wed, 22 Feb 2023 07:11:16 GMT, Eirik Bjorsnos wrote: >> This PR suggests we can speed up `StringLatin1.regionMatchesCI` by applying >> 'the oldest ASCII trick in the book'. >> >> The new static method `CharacterDataLatin1.equalsIgnoreCase` compares two >> latin1 bytes for equality ignoring

Re: RFR: 8302871: Speed up StringLatin1.regionMatchesCI [v11]

2023-02-22 Thread Eirik Bjorsnos
> This PR suggests we can speed up `StringLatin1.regionMatchesCI` by applying > 'the oldest ASCII trick in the book'. > > The new static method `CharacterDataLatin1.equalsIgnoreCase` compares two > latin1 bytes for equality ignoring case. `StringLatin1.regionMatchesCI` is > updated to use

Re: RFR: 8302899: Executors.newSingleThreadExecutor can use Cleaner to shutdown executor [v3]

2023-02-22 Thread Alan Bateman
> Executors.newSingleThreadExecutor returns a delegating ExecutorService that > has finalizer to shutdown the underlying TPE when the wrapper is finalizable. > It goes back to JDK 6 and JDK-6399443. This is the last non-empty finalizer > in java.base. Removing it will likely lead to bug

Re: RFR: 8302899: Executors.newSingleThreadExecutor can use Cleaner to shutdown executor [v3]

2023-02-22 Thread Alan Bateman
On Tue, 21 Feb 2023 19:38:08 GMT, Brent Christian wrote: >> Alan Bateman 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 five additional >>

Re: RFR: 8302871: Speed up StringLatin1.regionMatchesCI [v7]

2023-02-22 Thread Martin Buchholz
On Wed, 22 Feb 2023 07:12:35 GMT, Eirik Bjorsnos wrote: >>> Do you have an opinion on the appropriate level of documentation / comments >>> for this kind of 'tricky' code? >> >> This code is not that tricky! And the proposed level of documentation is >> excessive! A couple of lines of

Re: RFR: 8302815 Use new Math.clamp method in core libraries [v3]

2023-02-22 Thread Pavel Rappo
On Tue, 21 Feb 2023 20:39:53 GMT, Tagir F. Valeev wrote: >> For cleanup and dogfooding the new method, it would be nice to use >> Math.clamp where possible in java.base. See PR #12428. >> >> As Math.clamp performs an additional check that min is not greater than max, >> I conservatively

Re: RFR: 8302987: Add uniform and spatially equidistributed bounded float/double streams to RandomGenerator

2023-02-22 Thread Raffaello Giulietti
On Wed, 22 Feb 2023 15:23:13 GMT, Raffaello Giulietti wrote: > The `default` method `nextDouble(double origin, double bound)` in > `java.util.random.RandomGenerator` aims at generating a uniformly and > spatially equidistributed random `double` in the left-closed and right-open > range

Re: RFR: 8302987: Add uniform and spatially equidistributed bounded float/double streams to RandomGenerator

2023-02-22 Thread Raffaello Giulietti
On Wed, 22 Feb 2023 15:23:13 GMT, Raffaello Giulietti wrote: > The `default` method `nextDouble(double origin, double bound)` in > `java.util.random.RandomGenerator` aims at generating a uniformly and > spatially equidistributed random `double` in the left-closed and right-open > range

RFR: 8302987: Add uniform and spatially equidistributed bounded float/double streams to RandomGenerator

2023-02-22 Thread Raffaello Giulietti
The `default` method `nextDouble(double origin, double bound)` in `java.util.random.RandomGenerator` aims at generating a uniformly and spatially equidistributed random `double` in the left-closed and right-open range [`origin`, `bound`). It does so by applying the affine transform `origin +

Re: RFR: 8302815 Use new Math.clamp method in core libraries [v3]

2023-02-22 Thread Pavel Rappo
On Tue, 21 Feb 2023 20:39:53 GMT, Tagir F. Valeev wrote: >> For cleanup and dogfooding the new method, it would be nice to use >> Math.clamp where possible in java.base. See PR #12428. >> >> As Math.clamp performs an additional check that min is not greater than max, >> I conservatively

Re: RFR: 8301119: Support for GB18030-2022

2023-02-22 Thread Alan Bateman
On Fri, 10 Feb 2023 20:35:58 GMT, Naoto Sato wrote: > Upgrading the GB18030 charset in the JDK to the latest 2022 standard. Since > this is not a compatible upgrade to the existing mapping, a new system > property `jdk.charset.GB18030` is introduced. If it is set to "2000", the > mapping

Re: RFR: 8302154: Hidden classes created by LambdaMetaFactory can't be unloaded [v2]

2023-02-22 Thread Jorn Vernee
On Thu, 9 Feb 2023 18:11:18 GMT, Volker Simonis wrote: >> Prior to >> [JDK-8239384](https://bugs.openjdk.org/browse/JDK-8239384)/[JDK-8238358](https://bugs.openjdk.org/browse/JDK-8238358) >> LambdaMetaFactory has created VM-anonymous classes which could easily be >> unloaded once they were

RFR: JDK-8303072: Memory leak in exeNullCallerTest.cpp

2023-02-22 Thread Justin King
Fix trivial memory leak that occurs during tests. - Commit messages: - Memory leak in exeNullCallerTest.cpp Changes: https://git.openjdk.org/jdk/pull/12715/files Webrev: https://webrevs.openjdk.org/?repo=jdk=12715=00 Issue: https://bugs.openjdk.org/browse/JDK-8303072 Stats: 3

Re: RFR: 8303040: linux PPC64le: Implementation of Foreign Function & Memory API (Preview)

2023-02-22 Thread Per Minborg
On Wed, 22 Feb 2023 05:31:46 GMT, Martin Doerr wrote: > Implementation of "Foreign Function & Memory API" for linux on Power (Little > Endian) according to "Power Architecture 64-Bit ELF V2 ABI Specification". > > This PR does not include code for VaList support because it's supposed to get >

Re: RFR: 8302154: Hidden classes created by LambdaMetaFactory can't be unloaded [v2]

2023-02-22 Thread Rémi Forax
On Thu, 9 Feb 2023 18:11:18 GMT, Volker Simonis wrote: >> Prior to >> [JDK-8239384](https://bugs.openjdk.org/browse/JDK-8239384)/[JDK-8238358](https://bugs.openjdk.org/browse/JDK-8238358) >> LambdaMetaFactory has created VM-anonymous classes which could easily be >> unloaded once they were

Re: RFR: 8302154: Hidden classes created by LambdaMetaFactory can't be unloaded [v2]

2023-02-22 Thread Volker Simonis
On Wed, 22 Feb 2023 13:38:57 GMT, Volker Simonis wrote: >> I also have to disagree with the statement. The unit of unloading is the >> ClassLoader. > >> I also have to disagree with the statement. The unit of unloading is the >> ClassLoader. > > Hidden classes are not normal classes. They are

Re: RFR: 8302154: Hidden classes created by LambdaMetaFactory can't be unloaded [v2]

2023-02-22 Thread Volker Simonis
On Tue, 21 Feb 2023 23:44:48 GMT, David Holmes wrote: > I also have to disagree with the statement. The unit of unloading is the > ClassLoader. Hidden classes are not normal classes. They are not defined, created or loaded by a class loader. The only reason why hidden classes maintain a link

Re: RFR: 8301119: Support for GB18030-2022

2023-02-22 Thread Alan Bateman
On Wed, 22 Feb 2023 10:46:10 GMT, Sean Coffey wrote: > curious - what scenario triggers this call at initLevel < 1 ? It's not supported, but it is possible that someone might run with -Dfile.encoding=GB18030, in which case the default charset is used before the system properties are

Re: RFR: 8302871: Speed up StringLatin1.regionMatchesCI [v10]

2023-02-22 Thread Claes Redestad
On Wed, 22 Feb 2023 07:11:16 GMT, Eirik Bjorsnos wrote: >> This PR suggests we can speed up `StringLatin1.regionMatchesCI` by applying >> 'the oldest ASCII trick in the book'. >> >> The new static method `CharacterDataLatin1.equalsIgnoreCase` compares two >> latin1 bytes for equality ignoring

Re: RFR: 8302154: Hidden classes created by LambdaMetaFactory can't be unloaded [v2]

2023-02-22 Thread Volker Simonis
On Tue, 21 Feb 2023 19:49:24 GMT, Coleen Phillimore wrote: > The reason that non-strongly linked classes have their own ClassLoaderData is > because it implements the property that when the class loader is no longer > loaded, metadata for it can be removed at once. Even though Metaspace has >

Re: RFR: 8301119: Support for GB18030-2022

2023-02-22 Thread Sean Coffey
On Fri, 10 Feb 2023 20:35:58 GMT, Naoto Sato wrote: > Upgrading the GB18030 charset in the JDK to the latest 2022 standard. Since > this is not a compatible upgrade to the existing mapping, a new system > property `jdk.charset.GB18030` is introduced. If it is set to "2000", the > mapping

Re: RFR: 8301119: Support for GB18030-2022

2023-02-22 Thread Alan Bateman
On Fri, 10 Feb 2023 20:35:58 GMT, Naoto Sato wrote: > Upgrading the GB18030 charset in the JDK to the latest 2022 standard. Since > this is not a compatible upgrade to the existing mapping, a new system > property `jdk.charset.GB18030` is introduced. If it is set to "2000", the > mapping

Integrated: 8302815 Use new Math.clamp method in core libraries

2023-02-22 Thread Tagir F . Valeev
On Sat, 18 Feb 2023 10:50:53 GMT, Tagir F. Valeev wrote: > For cleanup and dogfooding the new method, it would be nice to use Math.clamp > where possible in java.base. See PR #12428. > > As Math.clamp performs an additional check that min is not greater than max, > I conservatively replaced

Re: RFR: 8302976: C2 intrinsification of Float.floatToFloat16 and Float.float16ToFloat yields different result than the interpreter

2023-02-22 Thread Doug Simon
On Wed, 22 Feb 2023 05:21:48 GMT, Joe Darcy wrote: > That said, I think it is reasonable on a given JVM invocation if > Float.floatToFloat16(f) gave the same result for input f regardless of in > what context it was called. Yes, I'm under the impression that for math API methods like this,