Re: RFR: 8300916: Re-examine the initialization of JNU Charset in StaticProperty [v4]

2023-01-25 Thread Ichiroh Takiguchi
On Wed, 25 Jan 2023 18:58:40 GMT, Alan Bateman wrote: >> `Charset.defaultCharset()` now uses >> `standardProvider.charsetForName()` charset. > >> `Charset.defaultCharset()` now uses >> `standardProvider.charsetForName()` charset. > > I think this is the right thing to do. It can also be change

Re: RFR: 8300916: Re-examine the initialization of JNU Charset in StaticProperty [v9]

2023-01-25 Thread Mandy Chung
On Thu, 26 Jan 2023 00:19:45 GMT, Naoto Sato wrote: >> This issue was found during the review of this PR: >> https://github.com/openjdk/jdk/pull/12132 where `Charset` class was >> loaded/initialized at the phase 1 of the startup process. Since `Charset` >> depends on `StaticProperty`, loading

Integrated: JDK-8301092 - Add benchmark for CRC32

2023-01-25 Thread Scott Gibbons
On Wed, 25 Jan 2023 15:03:05 GMT, Scott Gibbons wrote: > Adding a performance benchmark test for CRC32. This does exactly the same > test as for CRC32C. This pull request has now been integrated. Changeset: 7e951f4b Author:Scott Gibbons Committer: Sandhya Viswanathan URL: https:/

Re: RFR: 8300916: Re-examine the initialization of JNU Charset in StaticProperty [v9]

2023-01-25 Thread Naoto Sato
> This issue was found during the review of this PR: > https://github.com/openjdk/jdk/pull/12132 where `Charset` class was > loaded/initialized at the phase 1 of the startup process. Since `Charset` > depends on `StaticProperty`, loading of `Charset` class should be delayed. I > basically moved

Re: RFR: 8300916: Re-examine the initialization of JNU Charset in StaticProperty [v8]

2023-01-25 Thread Naoto Sato
On Wed, 25 Jan 2023 23:58:41 GMT, Mandy Chung wrote: >> Naoto Sato has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Restored doPriv > > src/java.base/share/classes/java/nio/charset/Charset.java line 662: > >> 660: } else

Re: Math.clamp method?

2023-01-25 Thread John Rose
P.S Sorry, I botched a use case, saying x where I meant y: ``` long x = …, y = a*x*x + b*x + c; double xf = x, yf = a*xf*xf + b*xf + c; double yc = clamp(yf, Long.MIN_VALUE, Long.MAX_VALUE); boolean saturated = false; if (yc != yf) { // error processing saturated = true; /

Re: RFR: 8300916: Re-examine the initialization of JNU Charset in StaticProperty [v8]

2023-01-25 Thread Mandy Chung
On Wed, 25 Jan 2023 20:50:21 GMT, Naoto Sato wrote: >> This issue was found during the review of this PR: >> https://github.com/openjdk/jdk/pull/12132 where `Charset` class was >> loaded/initialized at the phase 1 of the startup process. Since `Charset` >> depends on `StaticProperty`, loading

Re: Math.clamp method?

2023-01-25 Thread John Rose
Dealing with numeric ranges is error-prone, so I welcome these. Another operation on ranges is membership. This is easy to derive from the clamp methods, I think: ``` checkRange(x,min,max) := clamp(x,min,max) == x ``` That idiom works even for NaNs, which are never in any range. I wonder abo

Re: RFR: JDK-8301092 - Add benchmark for CRC32 [v3]

2023-01-25 Thread Sandhya Viswanathan
On Wed, 25 Jan 2023 23:07:49 GMT, Scott Gibbons wrote: >> Adding a performance benchmark test for CRC32. This does exactly the same >> test as for CRC32C. > > Scott Gibbons has updated the pull request incrementally with one additional > commit since the last revision: > > Fix copyright Ma

Re: RFR: JDK-8301092 - Add benchmark for CRC32 [v3]

2023-01-25 Thread Scott Gibbons
On Wed, 25 Jan 2023 22:19:01 GMT, Sandhya Viswanathan wrote: >> Scott Gibbons has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Fix copyright > > test/micro/org/openjdk/bench/java/util/TestCRC32.java line 2: > >> 1: /* >> 2: * Copyright

Re: RFR: JDK-8301092 - Add benchmark for CRC32 [v3]

2023-01-25 Thread Scott Gibbons
> Adding a performance benchmark test for CRC32. This does exactly the same > test as for CRC32C. Scott Gibbons has updated the pull request incrementally with one additional commit since the last revision: Fix copyright - Changes: - all: https://git.openjdk.org/jdk/pull/1219

Re: Math.clamp method?

2023-01-25 Thread Raffaello Giulietti
What’s error-prone is not much the clamping logic proper, but the need to check that the [min, max] interval is not empty. IMO, this is what most people will likely forget. Thus, I vote for this addition. Greetings Raffaello From: core-libs-dev on behalf of Tagir Valeev Date: Wednesday, 25

Re: RFR: 8300235: Use VarHandle access in Image(Input | Output)Impl classes

2023-01-25 Thread Brian Burkhalter
On Wed, 25 Jan 2023 16:39:04 GMT, Per Minborg wrote: > This PR suggests improving performance by using the newly introduced class > `jdk.internal.util.ByteArray` to improve packing/unpacking operations. > > The PR also proposes adding a `ByteArrayLittleEndian` class for support for > little en

Re: [jdk20] RFR: 8300719: JDK 20 RDP2 L10n resource files update [v5]

2023-01-25 Thread Damon Nguyen
On Wed, 25 Jan 2023 22:38:38 GMT, Jonathan Gibbons wrote: >> It's not a noun. It's an adjective that I had to synthesize for extra >> clarity and closeness to Java Language Specification (JLS). The English >> version of that entry is as follows: >> >> doclet.throwsInheritDocUnsupported=@in

Re: [jdk20] RFR: 8300719: JDK 20 RDP2 L10n resource files update [v9]

2023-01-25 Thread Damon Nguyen
> Open l10n drop. Files have been updated with translated versions. Whitespace > tool has been ran on files. > All tests passed Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: Replace exception-type - Changes: - all:

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

2023-01-25 Thread Ian Graves
On Thu, 15 Dec 2022 07:22:49 GMT, Jaikiran Pai wrote: >> Ian Graves has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Swapping deprecations in properties > > src/jdk.jlink/share/classes/jdk/tools/jlink/internal/JlinkTask.java line 227: >

Re: RFR: JDK-8301092 - Add benchmark for CRC32 [v2]

2023-01-25 Thread Scott Gibbons
> Adding a performance benchmark test for CRC32. This does exactly the same > test as for CRC32C. Scott Gibbons 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

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

2023-01-25 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 argumen

Re: [jdk20] RFR: 8300719: JDK 20 RDP2 L10n resource files update [v5]

2023-01-25 Thread Jonathan Gibbons
On Wed, 25 Jan 2023 20:03:48 GMT, Pavel Rappo wrote: >> I'm not sure either. You can ask a javadoc expert whether this is a proper >> noun or just plain English. I noticed it's also not translated in the >> Japanese version but the German version has translated it. > > It's not a noun. It's an

Re: RFR: 8301120: Cleanup utility classes java.util.Arrays and java.util.Collections [v2]

2023-01-25 Thread Tagir F . Valeev
> number of minor cleanups could be done in Arrays and Collections utility > classes. > In Arrays: > - Redundant import jdk.internal.misc.Unsafe; > - C-style array declaration is used in public static boolean equals(short[] > a, short a2[]) (that's the only place in the whole file) > > In Collec

Re: RFR: JDK-8301092 - Add benchmark for CRC32

2023-01-25 Thread Sandhya Viswanathan
On Wed, 25 Jan 2023 15:03:05 GMT, Scott Gibbons wrote: > Adding a performance benchmark test for CRC32. This does exactly the same > test as for CRC32C. test/micro/org/openjdk/bench/java/util/TestCRC32.java line 2: > 1: /* > 2: * Copyright (c) 2021, 2022, 2023, Oracle and/or its affiliates.

Re: [jdk20] RFR: 8300719: JDK 20 RDP2 L10n resource files update [v2]

2023-01-25 Thread Damon Nguyen
On Wed, 25 Jan 2023 08:17:26 GMT, danielpeintner wrote: >> Damon Nguyen has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Change German help of jar command > > src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_de.properties line >

Re: [jdk20] RFR: 8300719: JDK 20 RDP2 L10n resource files update [v8]

2023-01-25 Thread Damon Nguyen
> Open l10n drop. Files have been updated with translated versions. Whitespace > tool has been ran on files. > All tests passed Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: Update German translation - Changes: - al

RFR: 8301120: Cleanup utility classes java.util.Arrays and java.util.Collections

2023-01-25 Thread Tagir F . Valeev
number of minor cleanups could be done in Arrays and Collections utility classes. In Arrays: - Redundant import jdk.internal.misc.Unsafe; - C-style array declaration is used in public static boolean equals(short[] a, short a2[]) (that's the only place in the whole file) - Redundant casts to Objec

Re: RFR: 8240567: MethodTooLargeException thrown while creating a jlink image [v6]

2023-01-25 Thread Christoph
On Tue, 3 Jan 2023 16:17:41 GMT, Alan Bateman wrote: >>> Would it be possible to paste in a summary on the VerifyError with the >>> previous iteration? >> >> Isn't this https://github.com/openjdk/jdk/pull/10704#issuecomment-1286106503? >> >> Type top (current frame, locals[15]) is not assi

Re: RFR: 8240567: MethodTooLargeException thrown while creating a jlink image [v12]

2023-01-25 Thread Oliver Kopp
> Fix for [JDK-8240567](https://bugs.openjdk.org/browse/JDK-8240567): > "MethodTooLargeException thrown while creating a jlink image". > > Java still has a 64kb limit: A method may not be longer than 64kb. The idea > of the fix is to split up the generated methods in several smaller methods Oli

Re: RFR: 8300916: Re-examine the initialization of JNU Charset in StaticProperty [v8]

2023-01-25 Thread Naoto Sato
> This issue was found during the review of this PR: > https://github.com/openjdk/jdk/pull/12132 where `Charset` class was > loaded/initialized at the phase 1 of the startup process. Since `Charset` > depends on `StaticProperty`, loading of `Charset` class should be delayed. I > basically moved

Re: RFR: 8300916: Re-examine the initialization of JNU Charset in StaticProperty [v7]

2023-01-25 Thread Naoto Sato
> This issue was found during the review of this PR: > https://github.com/openjdk/jdk/pull/12132 where `Charset` class was > loaded/initialized at the phase 1 of the startup process. Since `Charset` > depends on `StaticProperty`, loading of `Charset` class should be delayed. I > basically moved

Re: RFR: 8300916: Re-examine the initialization of JNU Charset in StaticProperty [v5]

2023-01-25 Thread Naoto Sato
On Wed, 25 Jan 2023 20:13:06 GMT, Alan Bateman wrote: >> Naoto Sato has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Use StaticProperty.fileEncoding() & make the field @Stable > > src/java.base/share/classes/java/nio/charset/Charset.java

Re: RFR: 8300916: Re-examine the initialization of JNU Charset in StaticProperty [v6]

2023-01-25 Thread Naoto Sato
> This issue was found during the review of this PR: > https://github.com/openjdk/jdk/pull/12132 where `Charset` class was > loaded/initialized at the phase 1 of the startup process. Since `Charset` > depends on `StaticProperty`, loading of `Charset` class should be delayed. I > basically moved

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

2023-01-25 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 argumen

Re: RFR: 8177418: NPE is not apparent for methods in java.util.TimeZone API docs [v8]

2023-01-25 Thread Justin Lu
> When their input is null, the following methods in java.util.TimeZone throw a > NullPointerException: > > _TimeZone.getTimeZone(String ID) > TimeZone.setID(String ID) > TimeZone.inDaylightTime(Date date)_ > > For example, > > > String someID = null; > TimeZone tz1 = TimeZone.getTimeZone(som

Re: RFR: 8300916: Re-examine the initialization of JNU Charset in StaticProperty [v5]

2023-01-25 Thread Alan Bateman
On Wed, 25 Jan 2023 19:35:18 GMT, Naoto Sato wrote: >> This issue was found during the review of this PR: >> https://github.com/openjdk/jdk/pull/12132 where `Charset` class was >> loaded/initialized at the phase 1 of the startup process. Since `Charset` >> depends on `StaticProperty`, loading

Re: RFR: 8240567: MethodTooLargeException thrown while creating a jlink image [v11]

2023-01-25 Thread Oliver Kopp
> Fix for [JDK-8240567](https://bugs.openjdk.org/browse/JDK-8240567): > "MethodTooLargeException thrown while creating a jlink image". > > Java still has a 64kb limit: A method may not be longer than 64kb. The idea > of the fix is to split up the generated methods in several smaller methods Oli

Re: [jdk20] RFR: 8300719: JDK 20 RDP2 L10n resource files update [v5]

2023-01-25 Thread Pavel Rappo
On Wed, 25 Jan 2023 18:00:33 GMT, Weijun Wang wrote: >> The translation tool didn't seem to translate this. Either because it >> couldn't or because it somehow missed it. I'm not sure which, but I'm open >> to replacing this with a translation suggestion you have. Or I can leave it >> as is. >

Re: RFR: 8177418: NPE is not apparent for methods in java.util.TimeZone API docs [v7]

2023-01-25 Thread Justin Lu
On Wed, 25 Jan 2023 19:55:09 GMT, Lance Andersen wrote: >> In the CSR, Joe brought up the point that since _Time Zone_ is a non final >> class, and these instance methods can be overridden, there exists the >> possibility of an external subclass that overrides the method and does >> **not** th

Re: RFR: 8177418: NPE is not apparent for methods in java.util.TimeZone API docs [v7]

2023-01-25 Thread Lance Andersen
On Wed, 25 Jan 2023 19:33:29 GMT, Justin Lu wrote: >> src/java.base/share/classes/java/util/TimeZone.java line 300: >> >>> 298: * @param ID the new time zone ID. >>> 299: * @throws NullPointerException This method may throw a >>> 300: * {@code NullPointerException} if {@code ID} i

Re: RFR: 8300916: Re-examine the initialization of JNU Charset in StaticProperty [v3]

2023-01-25 Thread Mandy Chung
On Wed, 25 Jan 2023 07:41:52 GMT, Alan Bateman wrote: > A simpler, and more reliable, would be to change Charset.defaultCharset to > use standardProvider.charsetForName with the value of "file.encoding", and > avoid the provider lookup completely. This is a good observation. The change looks

Re: RFR: 8177418: NPE is not apparent for methods in java.util.TimeZone API docs [v7]

2023-01-25 Thread Justin Lu
On Wed, 25 Jan 2023 19:15:45 GMT, Lance Andersen wrote: >> Justin Lu has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Adjust ImplSpec positioning and wording > > src/java.base/share/classes/java/util/TimeZone.java line 300: > >> 298:

Re: RFR: 8300916: Re-examine the initialization of JNU Charset in StaticProperty [v5]

2023-01-25 Thread Naoto Sato
> This issue was found during the review of this PR: > https://github.com/openjdk/jdk/pull/12132 where `Charset` class was > loaded/initialized at the phase 1 of the startup process. Since `Charset` > depends on `StaticProperty`, loading of `Charset` class should be delayed. I > basically moved

Re: RFR: 8300916: Re-examine the initialization of JNU Charset in StaticProperty [v4]

2023-01-25 Thread Naoto Sato
On Wed, 25 Jan 2023 18:45:04 GMT, Naoto Sato wrote: >> This issue was found during the review of this PR: >> https://github.com/openjdk/jdk/pull/12132 where `Charset` class was >> loaded/initialized at the phase 1 of the startup process. Since `Charset` >> depends on `StaticProperty`, loading

Re: RFR: 8177418: NPE is not apparent for methods in java.util.TimeZone API docs [v7]

2023-01-25 Thread Lance Andersen
On Wed, 25 Jan 2023 18:12:10 GMT, Justin Lu wrote: >> When their input is null, the following methods in java.util.TimeZone throw >> a NullPointerException: >> >> _TimeZone.getTimeZone(String ID) >> TimeZone.setID(String ID) >> TimeZone.inDaylightTime(Date date)_ >> >> For example, >> >> >>

Re: RFR: 8300235: Use VarHandle access in Image(Input | Output)Impl classes

2023-01-25 Thread Per Minborg
On Wed, 25 Jan 2023 16:39:04 GMT, Per Minborg wrote: > This PR suggests improving performance by using the newly introduced class > `jdk.internal.util.ByteArray` to improve packing/unpacking operations. src/java.base/share/classes/module-info.java line 275: > 273: exports jdk.internal.util

RFR: 8300235: Use VarHandle access in Image(Input | Output)Impl classes

2023-01-25 Thread Per Minborg
This PR suggests improving performance by using the newly introduced class `jdk.internal.util.ByteArray` to improve packing/unpacking operations. - Commit messages: - Remove comments - Add little endian performance improvements - Use jdk.internal.util.ByteArray for pack/unpack Ch

Re: RFR: 8300916: Re-examine the initialization of JNU Charset in StaticProperty [v4]

2023-01-25 Thread Alan Bateman
On Wed, 25 Jan 2023 18:45:41 GMT, Naoto Sato wrote: > `Charset.defaultCharset()` now uses > `standardProvider.charsetForName()` charset. I think this is the right thing to do. It can also be changed to use StaticProperty.fileEncoding() and maybe the field can be changed to be a `@Stable` fiel

Re: [jdk20] RFR: 8300719: JDK 20 RDP2 L10n resource files update [v7]

2023-01-25 Thread Weijun Wang
On Wed, 25 Jan 2023 17:51:20 GMT, Damon Nguyen wrote: >> Open l10n drop. Files have been updated with translated versions. Whitespace >> tool has been ran on files. >> All tests passed > > Damon Nguyen has updated the pull request incrementally with one additional > commit since the last revisi

Re: RFR: 8300916: Re-examine the initialization of JNU Charset in StaticProperty [v4]

2023-01-25 Thread Naoto Sato
On Wed, 25 Jan 2023 18:45:04 GMT, Naoto Sato wrote: >> This issue was found during the review of this PR: >> https://github.com/openjdk/jdk/pull/12132 where `Charset` class was >> loaded/initialized at the phase 1 of the startup process. Since `Charset` >> depends on `StaticProperty`, loading

Re: RFR: 8300916: Re-examine the initialization of JNU Charset in StaticProperty [v4]

2023-01-25 Thread Naoto Sato
> This issue was found during the review of this PR: > https://github.com/openjdk/jdk/pull/12132 where `Charset` class was > loaded/initialized at the phase 1 of the startup process. Since `Charset` > depends on `StaticProperty`, loading of `Charset` class should be delayed. I > basically moved

Re: [jdk20] RFR: 8300719: JDK 20 RDP2 L10n resource files update [v7]

2023-01-25 Thread Jonathan Gibbons
On Wed, 25 Jan 2023 17:51:20 GMT, Damon Nguyen wrote: >> Open l10n drop. Files have been updated with translated versions. Whitespace >> tool has been ran on files. >> All tests passed > > Damon Nguyen has updated the pull request incrementally with one additional > commit since the last revisi

Re: RFR: 8240567: MethodTooLargeException thrown while creating a jlink image [v10]

2023-01-25 Thread Oliver Kopp
> Fix for [JDK-8240567](https://bugs.openjdk.org/browse/JDK-8240567): > "MethodTooLargeException thrown while creating a jlink image". > > Java still has a 64kb limit: A method may not be longer than 64kb. The idea > of the fix is to split up the generated methods in several smaller methods Oli

Re: RFR: 8300236: Use VarHandle access in Data(Input | Output)Stream classes [v8]

2023-01-25 Thread altrisi
On Tue, 24 Jan 2023 12:44:17 GMT, Per Minborg wrote: >> This PR proposes using a performance optimization using a new supported API >> for operations similar to those found in `java.io.Bits` > > Per Minborg has updated the pull request incrementally with one additional > commit since the last r

Re: RFR: 8177418: NPE is not apparent for methods in java.util.TimeZone API docs [v6]

2023-01-25 Thread Justin Lu
On Wed, 25 Jan 2023 00:50:04 GMT, Naoto Sato wrote: >> Justin Lu has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Minor punctuation > > src/java.base/share/classes/java/util/TimeZone.java line 297: > >> 295: * the time zone object.

Re: RFR: 8177418: NPE is not apparent for methods in java.util.TimeZone API docs [v7]

2023-01-25 Thread Justin Lu
> When their input is null, the following methods in java.util.TimeZone throw a > NullPointerException: > > TimeZone.getTimeZone(String ID) > TimeZone.setID(String ID) > TimeZone.inDaylightTime(Date date) > > For example, > > > String someID = null; > TimeZone tz1 = TimeZone.getTimeZone(someI

Re: [jdk20] RFR: 8300719: JDK 20 RDP2 L10n resource files update [v5]

2023-01-25 Thread Weijun Wang
On Wed, 25 Jan 2023 17:56:15 GMT, Damon Nguyen wrote: >> src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/resources/doclets_zh_CN.properties >> line 113: >> >>> 111: >>> doclet.inheritDocWithinInappropriateTag=\u4E0D\u80FD\u5728\u6B64\u6807\u8BB0\u4E2D\u4F7F\u7528 >>> @inher

Re: [jdk20] RFR: 8300719: JDK 20 RDP2 L10n resource files update [v5]

2023-01-25 Thread Damon Nguyen
On Wed, 25 Jan 2023 17:49:59 GMT, Weijun Wang wrote: >> Damon Nguyen has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Revert culture attribute > > src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/resources/doclets_zh_CN.

Re: [jdk20] RFR: 8300719: JDK 20 RDP2 L10n resource files update [v5]

2023-01-25 Thread Weijun Wang
On Tue, 24 Jan 2023 23:56:23 GMT, Damon Nguyen wrote: >> Open l10n drop. Files have been updated with translated versions. Whitespace >> tool has been ran on files. >> All tests passed > > Damon Nguyen has updated the pull request incrementally with one additional > commit since the last revisi

Re: [jdk20] RFR: 8300719: JDK 20 RDP2 L10n resource files update [v7]

2023-01-25 Thread Damon Nguyen
> Open l10n drop. Files have been updated with translated versions. Whitespace > tool has been ran on files. > All tests passed Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: Revert one more punctuation - Changes: -

Re: [jdk20] RFR: 8300719: JDK 20 RDP2 L10n resource files update [v6]

2023-01-25 Thread Damon Nguyen
> Open l10n drop. Files have been updated with translated versions. Whitespace > tool has been ran on files. > All tests passed Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: Revert translated punctuation - Changes:

Re: [jdk20] RFR: 8300719: JDK 20 RDP2 L10n resource files update [v5]

2023-01-25 Thread Weijun Wang
On Tue, 24 Jan 2023 23:56:23 GMT, Damon Nguyen wrote: >> Open l10n drop. Files have been updated with translated versions. Whitespace >> tool has been ran on files. >> All tests passed > > Damon Nguyen has updated the pull request incrementally with one additional > commit since the last revisi

Re: [jdk20] RFR: 8300719: JDK 20 RDP2 L10n resource files update [v5]

2023-01-25 Thread Naoto Sato
On Tue, 24 Jan 2023 23:56:23 GMT, Damon Nguyen wrote: >> Open l10n drop. Files have been updated with translated versions. Whitespace >> tool has been ran on files. >> All tests passed > > Damon Nguyen has updated the pull request incrementally with one additional > commit since the last revisi

Re: RFR: JDK-8301092 - Add benchmark for CRC32

2023-01-25 Thread Eric Caspole
On Wed, 25 Jan 2023 15:03:05 GMT, Scott Gibbons wrote: > Adding a performance benchmark test for CRC32. This does exactly the same > test as for CRC32C. Looks good to me, thanks! - Marked as reviewed by ecaspole (Committer). PR: https://git.openjdk.org/jdk/pull/12199

RFR: JDK-8301092 - Add benchmark for CRC32

2023-01-25 Thread Scott Gibbons
Adding a performance benchmark test for CRC32. This does exactly the same test as for CRC32C. - Commit messages: - Updated copyright - Add benchmark for CRC32 Changes: https://git.openjdk.org/jdk/pull/12199/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=12199&range=00

Re: RFR: 8294982: Implementation of Classfile API [v8]

2023-01-25 Thread Magnus Ihse Bursie
On Wed, 25 Jan 2023 13:14:43 GMT, Adam Sotona wrote: >> This is root pull request with Classfile API implementation, tests and >> benchmarks initial drop into JDK. >> >> Following pull requests consolidating JDK class files parsing, generating, >> and transforming >> ([JDK-8294957](https://bu

Re: Integrated: 8301086: jdk/internal/util/ByteArray/ReadWriteValues.java fails with CompilationError

2023-01-25 Thread Daniel Fuchs
On Wed, 25 Jan 2023 14:02:14 GMT, Per Minborg wrote: > This PR suggests the removal of certain faulty tests. LGTM provided that the test passes with these changes. - Marked as reviewed by dfuchs (Reviewer). PR: https://git.openjdk.org/jdk/pull/12196

Integrated: 8301086: jdk/internal/util/ByteArray/ReadWriteValues.java fails with CompilationError

2023-01-25 Thread Per Minborg
On Wed, 25 Jan 2023 14:02:14 GMT, Per Minborg wrote: > This PR suggests the removal of certain faulty tests. This pull request has now been integrated. Changeset: a23ff63a Author:Per Minborg URL: https://git.openjdk.org/jdk/commit/a23ff63af147067e0704970a9f9e6d847df22dff Stats:

Integrated: 8301086: jdk/internal/util/ByteArray/ReadWriteValues.java fails with CompilationError

2023-01-25 Thread Per Minborg
This PR suggests the removal of certain faulty tests. - Commit messages: - Remove faulty tests Changes: https://git.openjdk.org/jdk/pull/12196/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=12196&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8301086 Stats: 142 lin

Re: Math.clamp method?

2023-01-25 Thread Remi Forax
- Original Message - > From: "Tagir Valeev" > To: "core-libs-dev" > Sent: Wednesday, January 25, 2023 2:41:41 PM > Subject: Math.clamp method? > Hello! > > Quite often it's necessary to clamp a numerical value to a given > range, using the algorithm like this: > int clampedValue = value

Re: RFR: 8299858: [Metrics] Swap memory limit reported incorrectly when too large [v3]

2023-01-25 Thread Severin Gehwolf
On Wed, 25 Jan 2023 13:14:22 GMT, Thomas Stuefe wrote: > Mostly good, small nits. Thanks for the review, @tstuefe! I've updated the patch. Please let me know if you want me to change anything else. - PR: https://git.openjdk.org/jdk/pull/12118

Re: RFR: 8299858: [Metrics] Swap memory limit reported incorrectly when too large [v3]

2023-01-25 Thread Thomas Stuefe
On Wed, 25 Jan 2023 13:22:45 GMT, Severin Gehwolf wrote: >> src/java.base/linux/native/libjava/CgroupMetrics.c line 45: >> >>> 43: jlong pages = sysconf(_SC_PHYS_PAGES); >>> 44: jlong page_size = sysconf(_SC_PAGESIZE); >>> 45: return pages * page_size; >> >> Preexisting, and theoret

Re: RFR: 8299858: [Metrics] Swap memory limit reported incorrectly when too large [v4]

2023-01-25 Thread Thomas Stuefe
On Wed, 25 Jan 2023 13:45:28 GMT, Severin Gehwolf wrote: >> Please review this fix to >> [JDK-8292541](https://bugs.openjdk.org/browse/JDK-8292541) which adds the >> same handling for swap values exceeding what's possible in the non-container >> case. I.e. treats it as unlimited and fixes the

Re: RFR: 8299858: [Metrics] Swap memory limit reported incorrectly when too large [v3]

2023-01-25 Thread Severin Gehwolf
On Wed, 25 Jan 2023 13:14:22 GMT, Thomas Stuefe wrote: > Mostly good, small nits. Thanks for the review, @tstuefe! I've updated the patch. Please let me know if you want me to change anything else. - PR: https://git.openjdk.org/jdk/pull/12118

Re: RFR: 8299858: [Metrics] Swap memory limit reported incorrectly when too large [v3]

2023-01-25 Thread Thomas Stuefe
On Wed, 25 Jan 2023 13:22:45 GMT, Severin Gehwolf wrote: >> src/java.base/linux/native/libjava/CgroupMetrics.c line 45: >> >>> 43: jlong pages = sysconf(_SC_PHYS_PAGES); >>> 44: jlong page_size = sysconf(_SC_PAGESIZE); >>> 45: return pages * page_size; >> >> Preexisting, and theoret

Re: RFR: 8299858: [Metrics] Swap memory limit reported incorrectly when too large [v4]

2023-01-25 Thread Thomas Stuefe
On Wed, 25 Jan 2023 13:45:28 GMT, Severin Gehwolf wrote: >> Please review this fix to >> [JDK-8292541](https://bugs.openjdk.org/browse/JDK-8292541) which adds the >> same handling for swap values exceeding what's possible in the non-container >> case. I.e. treats it as unlimited and fixes the

Re: [jdk20] RFR: 8300719: JDK 20 RDP2 L10n resource files update [v5]

2023-01-25 Thread Magnus Ihse Bursie
On Tue, 24 Jan 2023 23:56:23 GMT, Damon Nguyen wrote: >> Open l10n drop. Files have been updated with translated versions. Whitespace >> tool has been ran on files. >> All tests passed > > Damon Nguyen has updated the pull request incrementally with one additional > commit since the last revisi

Re: Math.clamp method?

2023-01-25 Thread Jim Laskey
+1 > On Jan 25, 2023, at 9:41 AM, Tagir Valeev wrote: > > Hello! > > Quite often it's necessary to clamp a numerical value to a given > range, using the algorithm like this: > int clampedValue = value > max ? max : value < min ? min : value; > or probably > int clampedValue = Math.max(min, Math

Re: RFR: 8299858: [Metrics] Swap memory limit reported incorrectly when too large [v4]

2023-01-25 Thread Severin Gehwolf
> Please review this fix to > [JDK-8292541](https://bugs.openjdk.org/browse/JDK-8292541) which adds the > same handling for swap values exceeding what's possible in the non-container > case. I.e. treats it as unlimited and fixes the reporting. This has been > handled on the hotspot side similar

Re: [jdk20] RFR: 8300719: JDK 20 RDP2 L10n resource files update [v5]

2023-01-25 Thread Lance Andersen
On Tue, 24 Jan 2023 23:56:23 GMT, Damon Nguyen wrote: >> Open l10n drop. Files have been updated with translated versions. Whitespace >> tool has been ran on files. >> All tests passed > > Damon Nguyen has updated the pull request incrementally with one additional > commit since the last revisi

Math.clamp method?

2023-01-25 Thread Tagir Valeev
Hello! Quite often it's necessary to clamp a numerical value to a given range, using the algorithm like this: int clampedValue = value > max ? max : value < min ? min : value; or probably int clampedValue = Math.max(min, Math.min(max, value)); Some examples in wild: [1] [2] These "algorithms" are

Re: RFR: 8299858: [Metrics] Swap memory limit reported incorrectly when too large [v3]

2023-01-25 Thread Severin Gehwolf
On Wed, 25 Jan 2023 13:08:28 GMT, Thomas Stuefe wrote: > (I know you do an assert in java, but that has to be switched on explicitly - > do we run tests with asserts enabled?) Yes. That's why `-esa` is being added here: https://github.com/openjdk/jdk/pull/12118/files#diff-597a72f91945acae784afe

Re: RFR: 8299858: [Metrics] Swap memory limit reported incorrectly when too large [v3]

2023-01-25 Thread Severin Gehwolf
On Wed, 25 Jan 2023 13:05:06 GMT, Thomas Stuefe wrote: >> Severin Gehwolf has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains one commit: >> >> 8299858: [Metrics] Swap memory limit reported incorrectly when too large > > src/java.ba

Re: RFR: 8299858: [Metrics] Swap memory limit reported incorrectly when too large [v3]

2023-01-25 Thread Thomas Stuefe
On Wed, 25 Jan 2023 11:24:55 GMT, Severin Gehwolf wrote: >> Please review this fix to >> [JDK-8292541](https://bugs.openjdk.org/browse/JDK-8292541) which adds the >> same handling for swap values exceeding what's possible in the non-container >> case. I.e. treats it as unlimited and fixes the

Re: RFR: 8294982: Implementation of Classfile API [v8]

2023-01-25 Thread Adam Sotona
> This is root pull request with Classfile API implementation, tests and > benchmarks initial drop into JDK. > > Following pull requests consolidating JDK class files parsing, generating, > and transforming ([JDK-8294957](https://bugs.openjdk.org/browse/JDK-8294957)) > will chain to this one. >

Re: RFR: 8294982: Implementation of Classfile API [v7]

2023-01-25 Thread Adam Sotona
On Thu, 12 Jan 2023 12:47:49 GMT, Magnus Ihse Bursie wrote: >> Adam Sotona has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - removal of Preview.java and TransPatterns.java patch >>and enabled preview for java.base >> - jdk.compiler

Integrated: 8300236: Use VarHandle access in Data(Input | Output)Stream classes

2023-01-25 Thread Per Minborg
On Wed, 18 Jan 2023 16:34:57 GMT, Per Minborg wrote: > This PR proposes using a performance optimization using a new supported API > for operations similar to those found in `java.io.Bits` This pull request has now been integrated. Changeset: 74e1a8bf Author:Per Minborg URL: https:

Re: RFR: 8300819: -Dfile.encoding=Cp943C option does not work as expected since jdk18 [v2]

2023-01-25 Thread Ichiroh Takiguchi
On Tue, 24 Jan 2023 12:51:31 GMT, Alan Bateman wrote: > Do you know if there is any configuration on AIX that would derive Cp943C as > the default charset? That is, are they running with -Dfile.encoding=Cp943C on > the AIX systems or is it chosen by default. This goes to the question as to > w

Re: RFR: 8299858: [Metrics] Swap memory limit reported incorrectly when too large [v3]

2023-01-25 Thread Severin Gehwolf
> Please review this fix to > [JDK-8292541](https://bugs.openjdk.org/browse/JDK-8292541) which adds the > same handling for swap values exceeding what's possible in the non-container > case. I.e. treats it as unlimited and fixes the reporting. This has been > handled on the hotspot side similar

Re: RFR: 8299858: [Metrics] Swap memory limit reported incorrectly when too large [v2]

2023-01-25 Thread Severin Gehwolf
> Please review this fix to > [JDK-8292541](https://bugs.openjdk.org/browse/JDK-8292541) which adds the > same handling for swap values exceeding what's possible in the non-container > case. I.e. treats it as unlimited and fixes the reporting. This has been > handled on the hotspot side similar

Re: [jdk20] RFR: 8300719: JDK 20 RDP2 L10n resource files update [v2]

2023-01-25 Thread danielpeintner
On Tue, 24 Jan 2023 22:12:26 GMT, Damon Nguyen wrote: >> Open l10n drop. Files have been updated with translated versions. Whitespace >> tool has been ran on files. >> All tests passed > > Damon Nguyen has updated the pull request incrementally with one additional > commit since the last revisi