Re: RFR: 8266571: Sequenced Collections [v8]

2023-04-19 Thread Stuart Marks
On Fri, 24 Mar 2023 22:16:54 GMT, Tagir F. Valeev wrote: >> Stuart Marks has updated the pull request incrementally with four additional >> commits since the last revision: >> >> - Add missing @throws and @since tags. >> - Convert code samples to snippets. >> - Various editorial changes. >>

Re: RFR: 8266571: Sequenced Collections [v8]

2023-04-19 Thread Stuart Marks
On Fri, 24 Mar 2023 22:13:29 GMT, Tagir F. Valeev wrote: >> Stuart Marks has updated the pull request incrementally with four additional >> commits since the last revision: >> >> - Add missing @throws and @since tags. >> - Convert code samples to snippets. >> - Various editorial changes. >>

Re: RFR: 8266571: Sequenced Collections [v8]

2023-04-19 Thread Stuart Marks
On Fri, 24 Mar 2023 22:01:11 GMT, Tagir F. Valeev wrote: >> Stuart Marks has updated the pull request incrementally with four additional >> commits since the last revision: >> >> - Add missing @throws and @since tags. >> - Convert code samples to snippets. >> - Various editorial changes. >>

Re: RFR: 8266571: Sequenced Collections [v8]

2023-04-19 Thread Stuart Marks
> PR for Sequenced Collections implementation. Stuart Marks has updated the pull request incrementally with four additional commits since the last revision: - Add missing @throws and @since tags. - Convert code samples to snippets. - Various editorial changes. - Fix up toArray(T[]) on

Re: RFR: 8266571: Sequenced Collections [v7]

2023-04-19 Thread Stuart Marks
On Wed, 19 Apr 2023 10:29:48 GMT, Pavel Rappo wrote: >> src/java.base/share/classes/java/util/concurrent/CopyOnWriteArrayList.java >> line 409: >> >>> 407: * {@inheritDoc} >>> 408: */ >>> 409: public E getFirst() { >> >> Javadoc will automatically copy the specification from the

Re: RFR: 8306431: The documentation of File.listRoots should be modifid after JDK-8208077 [v3]

2023-04-19 Thread Nagata-Haruhito
> I fixed File.listRoots description. > * remove "the insertion or ejection of removable media" > * change "available" to "existing" > > Please review this change. Nagata-Haruhito has refreshed the contents of this pull request, and previous commits have been removed. The incremental views will

Re: RFR: 8304031: Classfile API cannot encode Primitive Class as Condy [v3]

2023-04-19 Thread Chen Liang
On Wed, 22 Mar 2023 22:52:19 GMT, Chen Liang wrote: >> Without this patch, the Classfile API tries to encode PrimitiveClassDesc as >> CONSTANT_Class_info and error in `toInternalName`. > > Chen Liang has updated the pull request incrementally with one additional > commit since the last

Re: RFR: 8306431: The documentation of File.listRoots should be modifid after JDK-8208077 [v2]

2023-04-19 Thread Nagata-Haruhito
> I fixed File.listRoots description. > * remove "the insertion or ejection of removable media" > * change "available" to "existing" > > Please review this change. Nagata-Haruhito has updated the pull request incrementally with one additional commit since the last revision: 8306431: The

Re: RFR: 8306431: The documentation of File.listRoots should be modifid after JDK-8208077

2023-04-19 Thread Nagata-Haruhito
On Wed, 19 Apr 2023 07:34:30 GMT, Nagata-Haruhito wrote: > I fixed File.listRoots description. > * remove "the insertion or ejection of removable media" > * change "available" to "existing" > > Please review this change. Thanks for your comment. I added @implNote and moved descriptions.

Re: RFR: 8305092: Improve Thread.sleep(millis, nanos) for sub-millisecond granularity [v7]

2023-04-19 Thread David Holmes
On Wed, 19 Apr 2023 19:55:38 GMT, Aleksey Shipilev wrote: >> Java API has the `Thread.sleep(millis, nanos)` method exposed to users. The >> documentation for that method clearly says the precision and accuracy are >> dependent on the underlying system behavior. However, it always rounds up >>

Re: RFR: 8041676: remove the java.compiler system property [v2]

2023-04-19 Thread Jaikiran Pai
On Fri, 14 Apr 2023 14:34:39 GMT, Jaikiran Pai wrote: >> Can I please get a review of this change which removes the `java.compiler` >> system property? This addresses https://bugs.openjdk.org/browse/JDK-8041676. >> >> A CSR has been filed for this change and is available at >>

Integrated: 8041676: remove the java.compiler system property

2023-04-19 Thread Jaikiran Pai
On Fri, 14 Apr 2023 12:19:41 GMT, Jaikiran Pai wrote: > Can I please get a review of this change which removes the `java.compiler` > system property? This addresses https://bugs.openjdk.org/browse/JDK-8041676. > > A CSR has been filed for this change and is available at >

Re: RFR: 8303002: Reject packed structs from linker [v5]

2023-04-19 Thread Jorn Vernee
On Thu, 20 Apr 2023 00:40:44 GMT, Jorn Vernee wrote: >> Also, isn't it the case that, for structs, we want the size of the layout to >> be a multiple of its alignment constraint? > > The third item in the list is for group size needing to be a multiple of the > alignment constraint, the forth

Re: RFR: 8303002: Reject packed structs from linker [v6]

2023-04-19 Thread Jorn Vernee
> This patch adds checks in AbstractLinker to reject packed structs and structs > with excess padding (e.g. unnamed bitfields), since both of those are > currently not supported, and the ABI/spec seems too vague to base support on. Jorn Vernee has updated the pull request incrementally with

Re: RFR: 8303431: [JVMCI] libgraal annotation API [v9]

2023-04-19 Thread Vladimir Kozlov
On Wed, 19 Apr 2023 16:00:18 GMT, Doug Simon wrote: >> Doug Simon has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - added breadcrumb in AnnotationParser about considering JVMCI should new >> annotation element types be added >> -

Re: RFR: 8303002: Reject packed structs from linker [v5]

2023-04-19 Thread Jorn Vernee
On Tue, 18 Apr 2023 22:32:17 GMT, Maurizio Cimadamore wrote: >> Jorn Vernee 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 seven additional

Re: RFR: 8303002: Reject packed structs from linker [v5]

2023-04-19 Thread Jorn Vernee
On Tue, 18 Apr 2023 22:26:03 GMT, Maurizio Cimadamore wrote: >> src/java.base/share/classes/java/lang/foreign/Linker.java line 202: >> >>> 200: * Due to limited ABI specification coverage, all the native linker >>> implementations limit the function >>> 201: * descriptors that they support

Re: RFR: 8303002: Reject packed structs from linker [v5]

2023-04-19 Thread Jorn Vernee
On Tue, 18 Apr 2023 22:17:02 GMT, Maurizio Cimadamore wrote: >> Jorn Vernee 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 seven additional

Re: RFR: 8266571: Sequenced Collections [v7]

2023-04-19 Thread Stuart Marks
On Wed, 19 Apr 2023 14:41:59 GMT, Nir Lisker wrote: >> Stuart Marks has updated the pull request incrementally with three >> additional commits since the last revision: >> >> - Remove unnecessary 'final' from a couple places. >> - Clarify ordering of Collection.addAll and Map.putAll; add

Re: RFR: 8300543 Compiler Implementation for Pattern Matching for switch [v2]

2023-04-19 Thread Vicente Romero
On Tue, 18 Apr 2023 09:13:01 GMT, Jan Lahoda wrote: >> This is the first draft of a patch for JEP 440 and JEP 441. Changes included: >> >> - the pattern matching for switch and record patterns features are made >> final, together with updates to tests. >> - parenthesized patterns are

Re: RFR: 8306031: Update IANA Language Subtag Registry to Version 2023-04-13 [v2]

2023-04-19 Thread Naoto Sato
On Wed, 19 Apr 2023 20:07:32 GMT, Justin Lu wrote: >> Update the registry and accompanying tests with the **IANA 4/13/2022** >> update. >> >> This update introduces the case where an IANA entry can have a preferred >> value, but that preferred value has a preferred value as well. >> >> This

Re: RFR: 8306031: Update IANA Language Subtag Registry to Version 2023-04-13 [v2]

2023-04-19 Thread Justin Lu
> Update the registry and accompanying tests with the **IANA 4/13/2022** update. > > This update introduces the case where an IANA entry can have a preferred > value, but that preferred value has a preferred value as well. > > This causes unexpected failures in JDK tests because of how locale

RFR: 8306031: Update IANA Language Subtag Registry to Version 2023-04-13

2023-04-19 Thread Justin Lu
Update the registry and accompanying tests with the **IANA 4/13/2022** update. This update introduces the case where an IANA entry can have a preferred value, but that preferred value has a preferred value as well. This causes unexpected failures in JDK tests because of how locale

Re: RFR: 8305092: Improve Thread.sleep(millis, nanos) for sub-millisecond granularity [v5]

2023-04-19 Thread Aleksey Shipilev
On Wed, 19 Apr 2023 18:50:27 GMT, Alan Bateman wrote: >> Aleksey Shipilev has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Windows fixes: align(...) is only for power-of-two alignments > > test/jdk/java/lang/Thread/SleepSanity.java line

Re: RFR: 8305092: Improve Thread.sleep(millis, nanos) for sub-millisecond granularity [v7]

2023-04-19 Thread Aleksey Shipilev
> Java API has the `Thread.sleep(millis, nanos)` method exposed to users. The > documentation for that method clearly says the precision and accuracy are > dependent on the underlying system behavior. However, it always rounds up > `nanos` to 1ms when doing the actual sleep. This means users

Re: RFR: JDK-8077371: Binary files in JAXP test should be removed [v2]

2023-04-19 Thread Joe Wang
On Wed, 19 Apr 2023 17:32:49 GMT, Mahendra Chhipa wrote: >> Test is updated to create the binary files during test execution. > > Mahendra Chhipa has updated the pull request incrementally with one > additional commit since the last revision: > > closed file handlers. Looks good overall

Re: RFR: 8306461: ObjectInputStream::readObject() should handle negative array sizes without throwing NegativeArraySizeExceptions

2023-04-19 Thread Andrey Turbanov
On Wed, 19 Apr 2023 16:47:33 GMT, Volker Simonis wrote: > This issue was reported by: Yakov Shafranovich > ([yako...@amazon.com](mailto:yako...@amazon.com)) > > Currently, `ObjectInputStream::readObject()` doesn't explicitly checks for a > negative array length in the deserialization stream.

Re: RFR: 8305092: Improve Thread.sleep(millis, nanos) for sub-millisecond granularity [v5]

2023-04-19 Thread Alan Bateman
On Wed, 19 Apr 2023 16:02:08 GMT, Aleksey Shipilev wrote: >> Java API has the `Thread.sleep(millis, nanos)` method exposed to users. The >> documentation for that method clearly says the precision and accuracy are >> dependent on the underlying system behavior. However, it always rounds up >>

Re: RFR: 8305092: Improve Thread.sleep(millis, nanos) for sub-millisecond granularity [v6]

2023-04-19 Thread Aleksey Shipilev
> Java API has the `Thread.sleep(millis, nanos)` method exposed to users. The > documentation for that method clearly says the precision and accuracy are > dependent on the underlying system behavior. However, it always rounds up > `nanos` to 1ms when doing the actual sleep. This means users

Re: RFR: 8305092: Improve Thread.sleep(millis, nanos) for sub-millisecond granularity [v5]

2023-04-19 Thread Aleksey Shipilev
On Wed, 19 Apr 2023 16:32:05 GMT, ExE Boss wrote: >> Aleksey Shipilev has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Windows fixes: align(...) is only for power-of-two alignments > > src/java.base/share/classes/java/lang/Thread.java

Integrated: 8306452: Fix Amazon copyright in JDK-8305425 test

2023-04-19 Thread Aleksey Shipilev
On Wed, 19 Apr 2023 13:57:43 GMT, Aleksey Shipilev wrote: > Someone^W I did commit a test in the OpenJDK repo that has Amazon copyright > notice in the form that is not inline with the preferred one (intentionally > without copyright year): > > "Copyright Amazon.com Inc. or its affiliates.

Re: RFR: 8306452: Fix Amazon copyright in JDK-8305425 test

2023-04-19 Thread Aleksey Shipilev
On Wed, 19 Apr 2023 13:57:43 GMT, Aleksey Shipilev wrote: > Someone^W I did commit a test in the OpenJDK repo that has Amazon copyright > notice in the form that is not inline with the preferred one (intentionally > without copyright year): > > "Copyright Amazon.com Inc. or its affiliates.

Re: RFR: 8266571: Sequenced Collections [v7]

2023-04-19 Thread Stuart Marks
On Wed, 19 Apr 2023 12:27:41 GMT, Nir Lisker wrote: >> Stuart Marks has updated the pull request incrementally with three >> additional commits since the last revision: >> >> - Remove unnecessary 'final' from a couple places. >> - Clarify ordering of Collection.addAll and Map.putAll; add

Re: RFR: 8266571: Sequenced Collections [v7]

2023-04-19 Thread Stuart Marks
On Wed, 19 Apr 2023 14:19:01 GMT, Nir Lisker wrote: >> Stuart Marks has updated the pull request incrementally with three >> additional commits since the last revision: >> >> - Remove unnecessary 'final' from a couple places. >> - Clarify ordering of Collection.addAll and Map.putAll; add

Re: RFR: 8266571: Sequenced Collections [v7]

2023-04-19 Thread Stuart Marks
On Wed, 19 Apr 2023 10:06:38 GMT, Nir Lisker wrote: >> Stuart Marks has updated the pull request incrementally with three >> additional commits since the last revision: >> >> - Remove unnecessary 'final' from a couple places. >> - Clarify ordering of Collection.addAll and Map.putAll; add

Re: RFR: 8266571: Sequenced Collections [v7]

2023-04-19 Thread Stuart Marks
On Wed, 19 Apr 2023 09:43:44 GMT, Nir Lisker wrote: >> Stuart Marks has updated the pull request incrementally with three >> additional commits since the last revision: >> >> - Remove unnecessary 'final' from a couple places. >> - Clarify ordering of Collection.addAll and Map.putAll; add

Re: RFR: 8304915: Create jdk.internal.util.Architecture enum and apply [v16]

2023-04-19 Thread Roger Riggs
> Define an internal jdk.internal.util.Architecture enumeration and static > methods to replace uses of the system property `os.arch`. > The enumeration values are defined to match those used in the build. > The initial values are: `X64, X86, AARCH64, RISCV64, S390, PPC64` > Note that `amd64` and

Re: RFR: 8266571: Sequenced Collections [v7]

2023-04-19 Thread Stuart Marks
On Wed, 19 Apr 2023 05:51:11 GMT, Nir Lisker wrote: >> Stuart Marks has updated the pull request incrementally with three >> additional commits since the last revision: >> >> - Remove unnecessary 'final' from a couple places. >> - Clarify ordering of Collection.addAll and Map.putAll; add

Re: RFR: 8306461: ObjectInputStream::readObject() should handle negative array sizes without throwing NegativeArraySizeExceptions

2023-04-19 Thread Volker Simonis
On Wed, 19 Apr 2023 17:04:07 GMT, Joe Darcy wrote: >> This issue was reported by: Yakov Shafranovich >> ([yako...@amazon.com](mailto:yako...@amazon.com)) >> >> Currently, `ObjectInputStream::readObject()` doesn't explicitly checks for a >> negative array length in the deserialization stream.

Re: RFR: 8300818: Reduce complexity of padding with DateTimeFormatter [v5]

2023-04-19 Thread Roger Riggs
On Tue, 18 Apr 2023 18:49:54 GMT, Sergey Tsypanov wrote: >> Currently it's O(n) - we do `n` shifts of bytes within `StringBuilder`. This >> can be reduced to O(1) improving the code like: >> >> DateTimeFormatter dtf = new DateTimeFormatterBuilder() >> .appendLiteral("Date:") >>

Re: RFR: 8304148: Remapping a class with Invokedynamic constant loses static bootstrap arguments [v2]

2023-04-19 Thread Chen Liang
On Wed, 22 Mar 2023 11:59:30 GMT, Thiago Henrique Hüpner wrote: >> 8304148: Remapping a class with Invokedynamic constant loses static >> bootstrap arguments > > Thiago Henrique Hüpner has updated the pull request incrementally with one > additional commit since the last revision: > > Add

Re: RFR: JDK-8077371: Binary files in JAXP test should be removed [v2]

2023-04-19 Thread Mahendra Chhipa
> Test is updated to create the binary files during test execution. Mahendra Chhipa has updated the pull request incrementally with one additional commit since the last revision: closed file handlers. - Changes: - all: https://git.openjdk.org/jdk/pull/13537/files - new:

RFR: 8306457: Classfile API components implementations should not be exposed

2023-04-19 Thread Chen Liang
The jdk.internal.classfile.components package's interfaces have implementations in their nested classes, which are implicitly public and exported with the package. They are now moved to the impl package to avoid unwanted exposures. Fixed a few minor javadoc issues in the interfaces as well. In

Re: RFR: 8305990: Stripping debug info of ASM 9.5 fails [v3]

2023-04-19 Thread Chen Liang
On Wed, 19 Apr 2023 13:44:47 GMT, Adam Sotona wrote: >> Classfile API didn't handle transformations of class files version 50 and >> below correctly. >> >> Proposed fix have two parts: >> 1. Inflation of branch targets does not depend on StackMapTable attribute >> presence for class file

Re: RFR: 8306461: ObjectInputStream::readObject() should handle negative array sizes without throwing NegativeArraySizeExceptions

2023-04-19 Thread Joe Darcy
On Wed, 19 Apr 2023 16:47:33 GMT, Volker Simonis wrote: > This issue was reported by: Yakov Shafranovich > ([yako...@amazon.com](mailto:yako...@amazon.com)) > > Currently, `ObjectInputStream::readObject()` doesn't explicitly checks for a > negative array length in the deserialization stream.

Re: RFR: 8305990: Stripping debug info of ASM 9.5 fails [v3]

2023-04-19 Thread ExE Boss
On Wed, 19 Apr 2023 13:44:47 GMT, Adam Sotona wrote: >> Classfile API didn't handle transformations of class files version 50 and >> below correctly. >> >> Proposed fix have two parts: >> 1. Inflation of branch targets does not depend on StackMapTable attribute >> presence for class file

Re: RFR: 8305746: InitializeEncoding should cache Charset object instead of charset name [v3]

2023-04-19 Thread Naoto Sato
On Wed, 19 Apr 2023 07:08:53 GMT, Peter Hofer wrote: >> Store `Charset` object in `jnuEncoding` and use `String(byte[], Charset)` >> and `String.getBytes(Charset)` instead of passing the charset name. > > Peter Hofer has updated the pull request with a new target base due to a > merge or a

Re: RFR: 8305746: InitializeEncoding should cache Charset object instead of charset name [v2]

2023-04-19 Thread Naoto Sato
On Wed, 19 Apr 2023 06:50:45 GMT, Peter Hofer wrote: >> src/java.base/share/native/libjava/jni_util.c line 757: >> >>> 755: jnuEncoding = (*env)->NewGlobalRef(env, charset.l); >>> 756: (*env)->DeleteLocalRef(env, charset.l); >>> 757: break; >> >>

RFR: 8306461: ObjectInputStream::readObject() should handle negative array sizes without throwing NegativeArraySizeExceptions

2023-04-19 Thread Volker Simonis
This issue was reported by: Yakov Shafranovich ([yako...@amazon.com](mailto:yako...@amazon.com)) Currently, `ObjectInputStream::readObject()` doesn't explicitly checks for a negative array length in the deserialization stream. Instead it calls `j.l.r.Array::newInstance(..)` with the negative

Re: RFR: 8300543 Compiler Implementation for Pattern Matching for switch [v2]

2023-04-19 Thread Vicente Romero
On Tue, 18 Apr 2023 09:13:01 GMT, Jan Lahoda wrote: >> This is the first draft of a patch for JEP 440 and JEP 441. Changes included: >> >> - the pattern matching for switch and record patterns features are made >> final, together with updates to tests. >> - parenthesized patterns are

Re: RFR: 8305092: Improve Thread.sleep(millis, nanos) for sub-millisecond granularity [v5]

2023-04-19 Thread ExE Boss
On Wed, 19 Apr 2023 16:02:08 GMT, Aleksey Shipilev wrote: >> Java API has the `Thread.sleep(millis, nanos)` method exposed to users. The >> documentation for that method clearly says the precision and accuracy are >> dependent on the underlying system behavior. However, it always rounds up >>

Re: RFR: 8304915: Create jdk.internal.util.Architecture enum and apply [v15]

2023-04-19 Thread Amit Kumar
On Mon, 17 Apr 2023 20:59:06 GMT, Roger Riggs wrote: >> Define an internal jdk.internal.util.Architecture enumeration and static >> methods to replace uses of the system property `os.arch`. >> The enumeration values are defined to match those used in the build. >> The initial values are: `X64,

Re: RFR: 8304915: Create jdk.internal.util.Architecture enum and apply [v15]

2023-04-19 Thread Amit Kumar
On Wed, 19 Apr 2023 13:22:54 GMT, Martin Doerr wrote: >> Roger Riggs has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains 17 commits: >> >> - Merge branch 'master' into 8304915-arch-enum >> - ArchTest on Debian RISC-V 64 confirmed

Re: RFR: 8306452: Fix Amazon copyright in JDK-8305425 test

2023-04-19 Thread Volker Simonis
On Wed, 19 Apr 2023 13:57:43 GMT, Aleksey Shipilev wrote: > Someone^W I did commit a test in the OpenJDK repo that has Amazon copyright > notice in the form that is not inline with the preferred one (intentionally > without copyright year): > > "Copyright Amazon.com Inc. or its affiliates.

Integrated: 8306323: Update license files in CLDR v43

2023-04-19 Thread Naoto Sato
On Tue, 18 Apr 2023 18:40:03 GMT, Naoto Sato wrote: > The upgrade to CLDR v43 was missing the license-related file updates. Here > are the supplemental updates. This pull request has now been integrated. Changeset: 85de01e6 Author:Naoto Sato URL:

Re: RFR: 8305092: Improve Thread.sleep(millis, nanos) for sub-millisecond granularity [v5]

2023-04-19 Thread Aleksey Shipilev
> Java API has the `Thread.sleep(millis, nanos)` method exposed to users. The > documentation for that method clearly says the precision and accuracy are > dependent on the underlying system behavior. However, it always rounds up > `nanos` to 1ms when doing the actual sleep. This means users

Integrated: 8303431: [JVMCI] libgraal annotation API

2023-04-19 Thread Doug Simon
On Wed, 1 Mar 2023 18:07:34 GMT, Doug Simon wrote: > This PR extends JVMCI with new API (`jdk.vm.ci.meta.Annotated`) for accessing > annotations. The main differences from `java.lang.reflect.AnnotatedElement` > are: > * All methods in the `Annotated` interface explicitly specify requested >

Re: RFR: 8303431: [JVMCI] libgraal annotation API [v9]

2023-04-19 Thread Doug Simon
On Tue, 18 Apr 2023 07:27:47 GMT, Doug Simon wrote: >> This PR extends JVMCI with new API (`jdk.vm.ci.meta.Annotated`) for >> accessing annotations. The main differences from >> `java.lang.reflect.AnnotatedElement` are: >> * All methods in the `Annotated` interface explicitly specify requested

Integrated: 8306038: SystemModulesPlugin generates code that doesn't pop when return value not used

2023-04-19 Thread Oliver Kopp
On Wed, 12 Apr 2023 09:18:13 GMT, Oliver Kopp wrote: > This refs [8306038](https://bugs.openjdk.org/browse/JDK-8306038) > > (Before this referenced 8240567) > > Although this change is rather small, I think, it's good to have a "more > clean" SystemModulesPlugin available. This pull request

RFR: JDK-8077371: Binary files in JAXP test should be removed

2023-04-19 Thread Mahendra Chhipa
Test is updated to create the binary files during test execution. - Commit messages: - JDK-8077371: Binary files in JAXP test should be removed Changes: https://git.openjdk.org/jdk/pull/13537/files Webrev: https://webrevs.openjdk.org/?repo=jdk=13537=00 Issue:

Re: RFR: 8300543 Compiler Implementation for Pattern Matching for switch [v2]

2023-04-19 Thread Vicente Romero
On Tue, 18 Apr 2023 09:13:01 GMT, Jan Lahoda wrote: >> This is the first draft of a patch for JEP 440 and JEP 441. Changes included: >> >> - the pattern matching for switch and record patterns features are made >> final, together with updates to tests. >> - parenthesized patterns are

Re: RFR: 8306075: Micro-optimize Enum.hashCode [v6]

2023-04-19 Thread Pavel Rappo
On Wed, 19 Apr 2023 13:50:49 GMT, Aleksey Shipilev wrote: > @AlanBateman, @apangin, @ExE-Boss, @liach, @pavelrappo -- you had comments on > this PR, could you please see if those are still relevant or not addressed? > If you are good with the current version, can you please formally approve

Re: RFR: 8306452: Fix Amazon copyright in JDK-8305425 test

2023-04-19 Thread Aleksey Shipilev
On Wed, 19 Apr 2023 13:59:09 GMT, Volker Simonis wrote: > Looks good. > > Thanks for fixing! Thanks! Trivial, right? - PR Comment: https://git.openjdk.org/jdk/pull/13534#issuecomment-1514871013

Re: RFR: 8266571: Sequenced Collections [v7]

2023-04-19 Thread Nir Lisker
On Wed, 19 Apr 2023 03:37:05 GMT, Stuart Marks wrote: >> PR for Sequenced Collections implementation. > > Stuart Marks has updated the pull request incrementally with three additional > commits since the last revision: > > - Remove unnecessary 'final' from a couple places. > - Clarify

Re: RFR: 8306075: Micro-optimize Enum.hashCode [v6]

2023-04-19 Thread Andrei Pangin
On Mon, 17 Apr 2023 16:42:38 GMT, olivergillespie wrote: >> Improve the speed of Enum.hashCode by caching the identity hashcode on first >> use. I've seen an application where Enum.hashCode is a hot path, and this is >> fairly simple speedup. The memory overhead is low; in enums with no extra

RFR: 8306455: Wrong majorVersion for multiple attributes in Classfile API

2023-04-19 Thread Chen Liang
Spotted the typo for BootstrapMethods, and another review over the API exposed the typo on PermittedSubclasses. - Commit messages: - 8306455: Wrong majorVersion for multiple attributes in Classfile API Changes: https://git.openjdk.org/jdk/pull/13536/files Webrev:

Re: RFR: 8306075: Micro-optimize Enum.hashCode [v6]

2023-04-19 Thread Chen Liang
On Mon, 17 Apr 2023 16:42:38 GMT, olivergillespie wrote: >> Improve the speed of Enum.hashCode by caching the identity hashcode on first >> use. I've seen an application where Enum.hashCode is a hot path, and this is >> fairly simple speedup. The memory overhead is low; in enums with no extra

RFR: 8306452: Fix Amazon copyright in JDK-8305425 test

2023-04-19 Thread Aleksey Shipilev
Someone^W I did commit a test in the OpenJDK repo that has Amazon copyright notice in the form that is not inline with the preferred one (intentionally without copyright year): "Copyright Amazon.com Inc. or its affiliates. All Rights Reserved." These should be fixed. - Commit

Re: RFR: 8306452: Fix Amazon copyright in JDK-8305425 test

2023-04-19 Thread Volker Simonis
On Wed, 19 Apr 2023 13:57:43 GMT, Aleksey Shipilev wrote: > Someone^W I did commit a test in the OpenJDK repo that has Amazon copyright > notice in the form that is not inline with the preferred one (intentionally > without copyright year): > > "Copyright Amazon.com Inc. or its affiliates.

Re: RFR: 8306075: Micro-optimize Enum.hashCode [v6]

2023-04-19 Thread Aleksey Shipilev
On Mon, 17 Apr 2023 16:42:38 GMT, olivergillespie wrote: >> Improve the speed of Enum.hashCode by caching the identity hashcode on first >> use. I've seen an application where Enum.hashCode is a hot path, and this is >> fairly simple speedup. The memory overhead is low; in enums with no extra

Re: RFR: 8305990: Stripping debug info of ASM 9.5 fails [v3]

2023-04-19 Thread Adam Sotona
> Classfile API didn't handle transformations of class files version 50 and > below correctly. > > Proposed fix have two parts: > 1. Inflation of branch targets does not depend on StackMapTable attribute > presence for class file version 50 and below. Alternative fallback > implementation is

Re: RFR: 8305092: Improve Thread.sleep(millis, nanos) for sub-millisecond granularity [v4]

2023-04-19 Thread Aleksey Shipilev
On Wed, 19 Apr 2023 09:56:44 GMT, Aleksey Shipilev wrote: >> Java API has the `Thread.sleep(millis, nanos)` method exposed to users. The >> documentation for that method clearly says the precision and accuracy are >> dependent on the underlying system behavior. However, it always rounds up >>

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v24]

2023-04-19 Thread Per Minborg
> API changes for the FFM API (third preview) > > ### Specdiff > https://cr.openjdk.org/~pminborg/panama/21/v2/specdiff/overview-summary.html > > ### Javadoc > https://cr.openjdk.org/~pminborg/panama/21/v2/javadoc/api/java.base/java/lang/foreign/package-summary.html > > ### Tests > > - [X]

Re: RFR: 8305990: Stripping debug info of ASM 9.5 fails [v2]

2023-04-19 Thread Adam Sotona
On Wed, 19 Apr 2023 13:06:20 GMT, Adam Sotona wrote: >> Classfile API didn't handle transformations of class files version 50 and >> below correctly. >> >> Proposed fix have two parts: >> 1. Inflation of branch targets does not depend on StackMapTable attribute >> presence for class file

Re: RFR: 8305990: Stripping debug info of ASM 9.5 fails [v2]

2023-04-19 Thread Chen Liang
On Wed, 19 Apr 2023 13:06:20 GMT, Adam Sotona wrote: >> Classfile API didn't handle transformations of class files version 50 and >> below correctly. >> >> Proposed fix have two parts: >> 1. Inflation of branch targets does not depend on StackMapTable attribute >> presence for class file

Re: RFR: 8304915: Create jdk.internal.util.Architecture enum and apply [v15]

2023-04-19 Thread Martin Doerr
On Mon, 17 Apr 2023 20:59:06 GMT, Roger Riggs wrote: >> Define an internal jdk.internal.util.Architecture enumeration and static >> methods to replace uses of the system property `os.arch`. >> The enumeration values are defined to match those used in the build. >> The initial values are: `X64,

Withdrawn: 8299852: Modernize ConcurrentHashMap

2023-04-19 Thread Per Minborg
On Tue, 10 Jan 2023 10:32:34 GMT, Per Minborg wrote: > `java.util.concurrent.ConcurrentHashMap` is relatively old and has not been > updated to reflect the current state of Java and can be modernized: > > * Add `@Serial` annotations > * Seal classes and restrict subclassing for internal

Re: RFR: 8305092: Improve Thread.sleep(millis, nanos) for sub-millisecond granularity [v3]

2023-04-19 Thread David Holmes
On Wed, 19 Apr 2023 09:51:48 GMT, Aleksey Shipilev wrote: >> src/hotspot/os/posix/os_posix.cpp line 1545: >> >>> 1543: >>> 1544: int PlatformEvent::park_nanos(jlong nanos) { >>> 1545: assert(0 <= nanos, "nanos are in range"); >> >> `nanos` should never be zero else you call the untimed

Re: RFR: 8305092: Improve Thread.sleep(millis, nanos) for sub-millisecond granularity [v4]

2023-04-19 Thread David Holmes
On Wed, 19 Apr 2023 09:56:44 GMT, Aleksey Shipilev wrote: >> Java API has the `Thread.sleep(millis, nanos)` method exposed to users. The >> documentation for that method clearly says the precision and accuracy are >> dependent on the underlying system behavior. However, it always rounds up >>

Re: RFR: 8305990: Stripping debug info of ASM 9.5 fails [v2]

2023-04-19 Thread Adam Sotona
> Classfile API didn't handle transformations of class files version 50 and > below correctly. > > Proposed fix have two parts: > 1. Inflation of branch targets does not depend on StackMapTable attribute > presence for class file version 50 and below. Alternative fallback > implementation is

Re: RFR: 8304915: Create jdk.internal.util.Architecture enum and apply [v15]

2023-04-19 Thread Glavo
On Mon, 17 Apr 2023 20:59:06 GMT, Roger Riggs wrote: >> Define an internal jdk.internal.util.Architecture enumeration and static >> methods to replace uses of the system property `os.arch`. >> The enumeration values are defined to match those used in the build. >> The initial values are: `X64,

Re: RFR: 8301552: Use AtomicReferenceArray for caching instead of CHM in ZoneOffset [v8]

2023-04-19 Thread Chen Liang
On Tue, 21 Mar 2023 13:53:27 GMT, Chen Liang wrote: >> It is possible but this keeps the mapper more local and only accessible >> where it is supposed to be used. For testing purposed, it might be better to >> have the class as you propose. > > If we want it local, I suppose we can convert the

Re: RFR: 8301552: Use AtomicReferenceArray for caching instead of CHM in ZoneOffset [v8]

2023-04-19 Thread Chen Liang
On Thu, 9 Feb 2023 13:46:14 GMT, Per Minborg wrote: >> `ZoneOffset` instances are cached by the `ZoneOffset` class itself for >> values in the range [-18h, 18h] for each second that is on an even quarter >> of an hour (i.e. at most 2*18*4+1 = 145 values). >> >> Instead of using a

Re: RFR: 8306038: SystemModulesPlugin: Keep stack clean

2023-04-19 Thread Alan Bateman
On Tue, 18 Apr 2023 19:42:23 GMT, Mandy Chung wrote: > I ran tier1-tier3 tests with your patch and all passed. Good. @koppor You can edit the PR title to match the JBS issue, then enter "/integrate" and one of us will sponsor. - PR Comment:

Re: RFR: 8266571: Sequenced Collections [v7]

2023-04-19 Thread Pavel Rappo
On Wed, 19 Apr 2023 04:36:28 GMT, Chen Liang wrote: > Javadoc will automatically copy the specification from the overridden method, > so the javadoc block is not necessary and can be replaced by an `@Override` > to indicate inheritance. I guess, this PR has converged enough for us to discuss

Re: RFR: 8300543 Compiler Implementation for Pattern Matching for switch [v2]

2023-04-19 Thread Maurizio Cimadamore
On Tue, 18 Apr 2023 09:13:01 GMT, Jan Lahoda wrote: >> This is the first draft of a patch for JEP 440 and JEP 441. Changes included: >> >> - the pattern matching for switch and record patterns features are made >> final, together with updates to tests. >> - parenthesized patterns are

Re: RFR: 8305092: Improve Thread.sleep(millis, nanos) for sub-millisecond granularity [v3]

2023-04-19 Thread Aleksey Shipilev
On Wed, 19 Apr 2023 06:07:04 GMT, David Holmes wrote: > You seemed to have missed: > > ``` > ./cpu/x86/rdtsc_x86.cpp:JavaThread::current()->sleep(FT_SLEEP_MILLISECS); > ./share/compiler/compileBroker.cpp: sleep(DeoptimizeObjectsALotInterval); > ``` > > so not sure how this is building ???

Re: RFR: 8305092: Improve Thread.sleep(millis, nanos) for sub-millisecond granularity [v3]

2023-04-19 Thread Aleksey Shipilev
On Wed, 19 Apr 2023 09:27:49 GMT, Alan Bateman wrote: > You might need to check that > test/hotspot/jtreg/vmTestbase/nsk/jdwp/ThreadReference/OwnedMonitorsStackDepthInfo/ownedMonitorsStackDepthInfo001/ownedMonitorsStackDepthInfo001a.java > is passing. I haven't tried your changes but I

Re: RFR: 8305092: Improve Thread.sleep(millis, nanos) for sub-millisecond granularity [v4]

2023-04-19 Thread Aleksey Shipilev
> Java API has the `Thread.sleep(millis, nanos)` method exposed to users. The > documentation for that method clearly says the precision and accuracy are > dependent on the underlying system behavior. However, it always rounds up > `nanos` to 1ms when doing the actual sleep. This means users

Re: RFR: 8305092: Improve Thread.sleep(millis, nanos) for sub-millisecond granularity [v3]

2023-04-19 Thread Aleksey Shipilev
On Wed, 19 Apr 2023 06:14:37 GMT, David Holmes wrote: >> Aleksey Shipilev has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Fix gtests > > src/hotspot/os/posix/os_posix.cpp line 1545: > >> 1543: >> 1544: int

Re: RFR: 8305092: Improve Thread.sleep(millis, nanos) for sub-millisecond granularity [v3]

2023-04-19 Thread Aleksey Shipilev
On Wed, 19 Apr 2023 05:58:11 GMT, David Holmes wrote: >> Aleksey Shipilev has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Fix gtests > > src/hotspot/os/windows/os_windows.cpp line 5253: > >> 5251: >> 5252: int

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v23]

2023-04-19 Thread Andrey Turbanov
On Thu, 13 Apr 2023 06:36:51 GMT, Per Minborg wrote: >> API changes for the FFM API (third preview) >> >> ### Specdiff >> https://cr.openjdk.org/~pminborg/panama/21/v2/specdiff/overview-summary.html >> >> ### Javadoc >>

Re: RFR: 8305092: Improve Thread.sleep(millis, nanos) for sub-millisecond granularity [v3]

2023-04-19 Thread Aleksey Shipilev
On Wed, 19 Apr 2023 05:58:35 GMT, David Holmes wrote: >> Aleksey Shipilev has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Fix gtests > > src/hotspot/os/windows/os_windows.cpp line 5259: > >> 5257: // any positive requested nanos as a

Re: RFR: 8305092: Improve Thread.sleep(millis, nanos) for sub-millisecond granularity [v3]

2023-04-19 Thread Aleksey Shipilev
On Wed, 19 Apr 2023 06:12:02 GMT, David Holmes wrote: >> Hmmm I changed that comment ... > > My actual comment was changed to: >> I suggest extending the comment to add > > This is how Thread.sleep(millis, nanos) has always behaved with only > millisecond granularity. Reworded, added comment.

Re: RFR: 8305092: Improve Thread.sleep(millis, nanos) for sub-millisecond granularity [v3]

2023-04-19 Thread Alan Bateman
On Tue, 18 Apr 2023 19:38:12 GMT, Aleksey Shipilev wrote: >> Java API has the `Thread.sleep(millis, nanos)` method exposed to users. The >> documentation for that method clearly says the precision and accuracy are >> dependent on the underlying system behavior. However, it always rounds up >>

Re: RFR: 8305092: Improve Thread.sleep(millis, nanos) for sub-millisecond granularity [v3]

2023-04-19 Thread Aleksey Shipilev
On Wed, 19 Apr 2023 08:15:44 GMT, Alan Bateman wrote: >> src/java.base/share/classes/java/lang/Thread.java line 576: >> >>> 574: long millis = NANOSECONDS.toMillis(nanos); >>> 575: nanos -= MILLISECONDS.toNanos(millis); >>> 576: sleep(millis, (int)nanos); >> >> This

Re: RFR: 8305092: Improve Thread.sleep(millis, nanos) for sub-millisecond granularity [v3]

2023-04-19 Thread Aleksey Shipilev
On Wed, 19 Apr 2023 05:50:00 GMT, David Holmes wrote: >> Aleksey Shipilev has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Fix gtests > > test/jdk/java/lang/Thread/SleepSanity.java line 75: > >> 73: } >> 74: >> 75: private

Re: RFR: 8305092: Improve Thread.sleep(millis, nanos) for sub-millisecond granularity [v3]

2023-04-19 Thread Alan Bateman
On Wed, 19 Apr 2023 05:43:19 GMT, David Holmes wrote: >> Aleksey Shipilev has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Fix gtests > > src/java.base/share/classes/java/lang/Thread.java line 576: > >> 574: long millis =

Re: RFR: 8306431: The documentation of File.listRoots should be modifid after JDK-8208077

2023-04-19 Thread Alan Bateman
On Wed, 19 Apr 2023 07:34:30 GMT, Nagata-Haruhito wrote: > I fixed File.listRoots description. > * remove "the insertion or ejection of removable media" > * change "available" to "existing" > > Please review this change. The text you are proposing to change goes back a long way, it pre-dates

RFR: 8306431: The documentation of File.listRoots should be modifid after JDK-8208077

2023-04-19 Thread Nagata-Haruhito
I fixed File.listRoots description. * remove "the insertion or ejection of removable media" * change "available" to "existing" Please review this change. - Commit messages: - 8306431: The documentation of File.listRoots should be modifid after JDK-8208077 Changes:

  1   2   >