RFR: 8336289: Obliterate most references to _snprintf in the Windows JDK

2024-07-11 Thread Julian Waters
snprintf has been available for all officially and unofficially supported compilers for Windows, Visual Studio since version 2015 and gcc since, well, forever. snprintf is conforming to C99 since the start when compiling using gcc, and 2015 when using Visual Studio. Since it conforms to C99 and

Re: RFR: 8336259: Wrong link to stylesheet.css in JavaDoc API documentation

2024-07-11 Thread duke
On Thu, 11 Jul 2024 20:55:29 GMT, Nizar Benalla wrote: > Can I please get a review for this small change, the relative link to the > stylesheet isn't needed as it wasn't used anyway in the generated HTML. The > correct link to the stylesheet is already in the generated HTML. > > This is the di

Re: RFR: 8336259: Wrong link to stylesheet.css in JavaDoc API documentation

2024-07-11 Thread Nizar Benalla
On Thu, 11 Jul 2024 20:55:29 GMT, Nizar Benalla wrote: > Can I please get a review for this small change, the relative link to the > stylesheet isn't needed as it wasn't used anyway in the generated HTML. The > correct link to the stylesheet is already in the generated HTML. > > This is the di

RFR: 8334758: Incorrect note in Javadoc for a few RandomGenerator methods

2024-07-11 Thread Raffaello Giulietti
Small corrections to @implSpec notes in a few methods in RandomGenerator. - Commit messages: - 8334758: Incorrect note in Javadoc for a few RandomGenerator methods Changes: https://git.openjdk.org/jdk/pull/20152/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=20152&range=00

Re: RFR: 8315884: New Object to ObjectMonitor mapping [v6]

2024-07-11 Thread Axel Boldt-Christmas
> When inflating a monitor the `ObjectMonitor*` is written directly over the > `markWord` and any overwritten data is displaced into a displaced `markWord`. > This is problematic for concurrent GCs which needs extra care or looser > semantics to use this displaced data. In Lilliput this data als

Re: RFR: 8336259: Wrong link to stylesheet.css in JavaDoc API documentation

2024-07-11 Thread Chen Liang
On Thu, 11 Jul 2024 20:55:29 GMT, Nizar Benalla wrote: > Can I please get a review for this small change, the relative link to the > stylesheet isn't needed as it wasn't used anyway in the generated HTML. The > correct link to the stylesheet is already in the generated HTML. > > This is the di

Re: RFR: 8336259: Wrong link to stylesheet.css in JavaDoc API documentation

2024-07-11 Thread Jonathan Gibbons
On Thu, 11 Jul 2024 20:55:29 GMT, Nizar Benalla wrote: > Can I please get a review for this small change, the relative link to the > stylesheet isn't needed as it wasn't used anyway in the generated HTML. The > correct link to the stylesheet is already in the generated HTML. > > This is the di

Re: RFR: 8307513: C2: intrinsify Math.max(long,long) and Math.min(long,long)

2024-07-11 Thread Joe Darcy
On Tue, 9 Jul 2024 12:07:37 GMT, Galder Zamarreño wrote: > This patch intrinsifies `Math.max(long, long)` and `Math.min(long, long)` in > order to help improve vectorization performance. > > Currently vectorization does not kick in for loops containing either of these > calls because of the fo

Re: RFR: 8331341: secondary_super_cache does not scale well: C1 and interpreter

2024-07-11 Thread Vladimir Ivanov
On Thu, 11 Jul 2024 23:17:10 GMT, Vladimir Ivanov wrote: >> This patch expands the use of a hash table for secondary superclasses >> to the interpreter, C1, and runtime. It also adds a C2 implementation >> of hashed lookup in cases where the superclass isn't known at compile >> time. >> >> HotSp

Re: RFR: 8331341: secondary_super_cache does not scale well: C1 and interpreter

2024-07-11 Thread Vladimir Ivanov
On Tue, 2 Jul 2024 14:52:09 GMT, Andrew Haley wrote: > This patch expands the use of a hash table for secondary superclasses > to the interpreter, C1, and runtime. It also adds a C2 implementation > of hashed lookup in cases where the superclass isn't known at compile > time. > > HotSpot shared

Re: RFR: 8335182: Consolidate and streamline String concat code shapes [v3]

2024-07-11 Thread Chen Liang
On Tue, 9 Jul 2024 21:16:33 GMT, Claes Redestad wrote: >> This PR attains a speed-up on some microbenchmarks by simplifying how we >> build up the MH combinator tree shape >> (only use prependers with prefix, always add a suffix to the newArray >> combinator), then simplifying/inlining some of

Re: RFR: 8307513: C2: intrinsify Math.max(long,long) and Math.min(long,long)

2024-07-11 Thread Vladimir Ivanov
On Tue, 9 Jul 2024 12:07:37 GMT, Galder Zamarreño wrote: > This patch intrinsifies `Math.max(long, long)` and `Math.min(long, long)` in > order to help improve vectorization performance. > > Currently vectorization does not kick in for loops containing either of these > calls because of the fo

Re: RFR: 8336043: Add quality of implementation discussion to Object.{equals, toString, hashCode}

2024-07-11 Thread Joe Darcy
On Thu, 11 Jul 2024 20:31:07 GMT, Stuart Marks wrote: > Bloch's _Effective Java, 3/e,_ Items 10, 11, and 12 have some useful > background information on implementing equals, hashCode, and toString. Agreed; I reread over those items before posting the PR. The "typical" wording was meant to cove

Re: RFR: 8336043: Add quality of implementation discussion to Object.{equals, toString, hashCode}

2024-07-11 Thread Joe Darcy
On Thu, 11 Jul 2024 00:06:33 GMT, Stuart Marks wrote: > While it's not wrong, advising against "excessive" usage is so vague as not > to be actionable. Given some piece of code it's hard to say whether or not it > does anything excessive. Consider a List with a million elements; as a > practic

Integrated: 8325525: Create jtreg test case for JDK-8325203

2024-07-11 Thread Vanitha B P
On Tue, 4 Jun 2024 07:13:15 GMT, Vanitha B P wrote: > Created jtreg test case for > [JDK-8325203](https://bugs.openjdk.org/browse/JDK-8325203) issue. > > The JpackageTest created tests that the child process started from the app > launched by jpackage launcher is not automatically terminated w

Re: RFR: 8323707: Adjust Classfile API's type arg model to better represent the embodied type [v5]

2024-07-11 Thread duke
On Wed, 1 May 2024 22:39:05 GMT, Chen Liang wrote: >> API changes as discussed on the mailing list: >> https://mail.openjdk.org/pipermail/classfile-api-dev/2023-November/000419.html >> >> Additional questions: >> 1. Whether to rename `WildcardIndicator.DEFAULT` to `NONE` > > Chen Liang has upda

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

2024-07-11 Thread duke
On Wed, 29 May 2024 19:27:17 GMT, Chen Liang wrote: >> I propose to add type-checked ConstantPool.entryByIndex and >> ClassReader.readEntryOrNull taking an extra Class parameter, which throws >> ConstantPoolException instead of ClassCastException on type mismatch, which >> can happen to malfor

Re: RFR: 8332109: Convert remaining tests using com.sun.tools.classfile to ClassFile API

2024-07-11 Thread duke
On Sun, 12 May 2024 08:36:44 GMT, Chen Liang wrote: > Some tests are not migrated to the ClassFile API in previous migrations. > > - Some are simple oversights that didn't remove usages of > com.sun.tools.classfile; > - The CallerSensitive ones used an old utility, replaced by CF API-based ne

Re: RFR: 8331855: Convert jdk.jdeps jdeprscan and jdeps to use the Classfile API [v2]

2024-07-11 Thread duke
On Sun, 12 May 2024 02:42:32 GMT, Chen Liang wrote: >> Summary of the changes: >> - Moved `com.sun.tools.classfile.Dependency` and `Dependencies` to jdeps; >> they are exclusively used by jdeps in sources, and they are not used in any >> tests too. This will ease the removal of `com.sun.tools.

Re: RFR: 8327499: MethodHandleStatics.traceLambdaForm includes methods that cannot be generated [v2]

2024-07-11 Thread duke
On Fri, 10 May 2024 04:55:21 GMT, Chen Liang wrote: >> GenerateJLIClassesHelper has been making wrong assumptions about Invoker's >> LambdaForm method type parameters. Since they are distinct from those of >> Linkers, they are now tracked and generated separately. It seems that no >> proper in

Re: RFR: 8333749: Consolidate ConstantDesc conversion in java.base [v6]

2024-07-11 Thread duke
On Fri, 7 Jun 2024 13:56:24 GMT, Chen Liang wrote: >> In java.base, especially in bytecode generators, we have many different >> methods converting known valid Class and MethodType into ClassDesc and >> MethodTypeDesc. These conversions should be consolidated into the same >> utility method fo

RFR: 8336259: Wrong link to stylesheet.css in JavaDoc API documentation

2024-07-11 Thread Nizar Benalla
Can I please get a review for this small change, the relative link to the stylesheet isn't needed as it wasn't used anyway in the generated HTML. The correct link to the stylesheet is already in the generated HTML. This is the difference between the generated docs before and after this change,

[jdk23] Integrated: 8335935: Chained builders not sending transformed models to next transforms

2024-07-11 Thread Chen Liang
On Wed, 10 Jul 2024 22:10:50 GMT, Chen Liang wrote: > Please review this non-clean backport of the bugfix in #20100 to release 23, > where ClassFile API chained builders does not emit certain elements through > downstream transforms and returns wrong builder for chaining. This backport > inclu

Re: RFR: 8336043: Add quality of implementation discussion to Object.{equals, toString, hashCode}

2024-07-11 Thread Stuart Marks
On Wed, 10 Jul 2024 22:33:54 GMT, Joe Darcy wrote: > First pass at adding some quality of implementation discussions around the > overridable methods of Object. Bloch's _Effective Java, 3/e,_ Items 10, 11, and 12 have some useful background information on implementing equals, hashCode, and toS

Re: RFR: 8329597: C2: Intrinsify Reference.clear

2024-07-11 Thread Aleksey Shipilev
On Thu, 11 Jul 2024 15:28:37 GMT, Aleksey Shipilev wrote: > [JDK-8240696](https://bugs.openjdk.org/browse/JDK-8240696) added the native > method for `Reference.clear`. The original patch skipped intrinsification of > this method, because we thought `Reference.clear` is not on a performance > s

RFR: 8329597: C2: Intrinsify Reference.clear

2024-07-11 Thread Aleksey Shipilev
[JDK-8240696](https://bugs.openjdk.org/browse/JDK-8240696) added the native method for `Reference.clear`. The original patch skipped intrinsification of this method, because we thought `Reference.clear` is not on a performance sensitive path. However, it shows up prominently on simple benchmarks

Re: More useful structured concurrency stack traces

2024-07-11 Thread Louis Wasserman
Moved to loom-dev; core-libs-dev to bcc. On Tue, Jul 9, 2024 at 12:10 PM Alan Bateman wrote: > Probably best to bring this to loom-dev as there have been some > exploration into but where we decided not to expose any APIs at this time. > > -Alan > > On 09/07/2024 19:50, Louis Wasserman wrote: >

Integrated: 8335668: NumberFormat integer only parsing should throw exception for edge case

2024-07-11 Thread Justin Lu
On Tue, 9 Jul 2024 18:42:25 GMT, Justin Lu wrote: > Please review this PR which corrects a case in NumberFormat integer only > parsing. > > [JDK-8333755](https://bugs.openjdk.org/browse/JDK-8333755) fixed integer only > parsing when the value has a suffix, although it caused incorrect behavior

Integrated: 8336021: Doccheck: valign not allowed for HTML5 in java.xml

2024-07-11 Thread Joe Wang
On Wed, 10 Jul 2024 16:24:01 GMT, Joe Wang wrote: > Remove valign Attribute from the javadoc for org.w3c.dom.Attr. The table > looks good with the default setting. This pull request has now been integrated. Changeset: 58c98420 Author:Joe Wang URL: https://git.openjdk.org/jdk/commit

Re: [jdk23] RFR: 8334418: Update IANA Language Subtag Registry to Version 2024-06-14

2024-07-11 Thread Iris Clark
On Wed, 10 Jul 2024 21:46:36 GMT, Justin Lu wrote: > Please review this PR, which is a backport of commit > [861aefca](https://github.com/openjdk/jdk/commit/861aefcafacdc21459ef966307f52568e327fd49) > from the [openjdk/jdk](https://git.openjdk.org/jdk) repository. > > This updates the IANA sub

Re: [jdk23] RFR: 8334653: ISO 4217 Amendment 177 Update

2024-07-11 Thread Iris Clark
On Wed, 10 Jul 2024 22:08:47 GMT, Justin Lu wrote: > Please review this PR, which is a backport of commit > [86b0cf25](https://github.com/openjdk/jdk/commit/86b0cf259fb3cbe3a1973151148e5d36c6a99d91) > from the [openjdk/jdk](https://git.openjdk.org/jdk) repository. > > This change incorporates

Re: RFR: 8315034 : File.mkdirs() occasionally fails to create folders on Windows shared folder

2024-07-11 Thread Olivier Masseau
On Fri, 3 Nov 2023 18:11:10 GMT, Weibing Xiao wrote: > File.mkdirs() occasionally fails to create folders on Windows shared folders. > It turned out that Windows API FindFirstFileW created the error > ERROR_NO_MORE_FILES. In some of the cases with a valid file path, this error > still returns

Re: RFR: 8333446: Add tests for hierarchical container support [v4]

2024-07-11 Thread Severin Gehwolf
On Thu, 11 Jul 2024 16:46:13 GMT, Severin Gehwolf wrote: >> Please review this PR which adds test support for systemd slices so that >> bugs like [JDK-8217338](https://bugs.openjdk.org/browse/JDK-8217338) can be >> verified. The added test, `SystemdMemoryAwarenessTest` currently passes on >> c

Re: RFR: 8333446: Add tests for hierarchical container support [v4]

2024-07-11 Thread Severin Gehwolf
> Please review this PR which adds test support for systemd slices so that bugs > like [JDK-8217338](https://bugs.openjdk.org/browse/JDK-8217338) can be > verified. The added test, `SystemdMemoryAwarenessTest` currently passes on > cgroups v1 and fails on cgroups v2 due to the way how > [JDK-82

Re: RFR: 8334057: JLinkReproducibleTest.java support receive test.tool.vm.opts

2024-07-11 Thread SendaoYan
On Wed, 12 Jun 2024 02:00:41 GMT, SendaoYan wrote: > Hi all, > Currently, the testcase `test/jdk/tools/jlink/JLinkReproducibleTest.java` > doesn't receive jvm options from jtreg. > I think it's necessory to receive jvm options from jtreg. > Fix solution similar to > [JDK-8157850](https://bugs.o

Re: RFR: 8336043: Add quality of implementation discussion to Object.{equals, toString, hashCode}

2024-07-11 Thread Raffaello Giulietti
On Wed, 10 Jul 2024 22:33:54 GMT, Joe Darcy wrote: > First pass at adding some quality of implementation discussions around the > overridable methods of Object. Here's a classical example of a directed acyclic graph (DAG, no cycles) consisting of 100 `ArrayList`s, each of size 2. It takes some

Re: RFR: 8333446: Add tests for hierarchical container support [v3]

2024-07-11 Thread Severin Gehwolf
On Thu, 11 Jul 2024 14:26:23 GMT, Jan Kratochvil wrote: > > > ``` > > > * `CPUQuota` (changed it to `AllowedCPUs`) does not work for me - it > > > properly distributes the load but JDK still sees all available CPU cores > > > (4 of my VM). > > > ``` > > > > > > Could you elaborate on that? W

Re: RFR: 8333446: Add tests for hierarchical container support [v3]

2024-07-11 Thread Jan Kratochvil
On Thu, 11 Jul 2024 09:23:58 GMT, Severin Gehwolf wrote: > > ``` > > * `CPUQuota` (changed it to `AllowedCPUs`) does not work for me - it > > properly distributes the load but JDK still sees all available CPU cores (4 > > of my VM). > > ``` > > Could you elaborate on that? What does not work?

Re: [jdk23] RFR: 8334418: Update IANA Language Subtag Registry to Version 2024-06-14

2024-07-11 Thread Weibing Xiao
On Wed, 10 Jul 2024 21:46:36 GMT, Justin Lu wrote: > Please review this PR, which is a backport of commit > [861aefca](https://github.com/openjdk/jdk/commit/861aefcafacdc21459ef966307f52568e327fd49) > from the [openjdk/jdk](https://git.openjdk.org/jdk) repository. > > This updates the IANA sub

Re: RFR: 8315884: New Object to ObjectMonitor mapping [v3]

2024-07-11 Thread Coleen Phillimore
On Wed, 10 Jul 2024 09:41:37 GMT, Axel Boldt-Christmas wrote: >> src/hotspot/share/runtime/lightweightSynchronizer.cpp line 763: >> >>> 761: assert(mark.has_monitor(), "must be"); >>> 762: // The monitor exists >>> 763: ObjectMonitor* monitor = ObjectSynchronizer::read_monitor(current, >

Re: RFR: 8315034 : File.mkdirs() occasionally fails to create folders on Windows shared folder

2024-07-11 Thread duke
On Fri, 3 Nov 2023 18:11:10 GMT, Weibing Xiao wrote: > File.mkdirs() occasionally fails to create folders on Windows shared folders. > It turned out that Windows API FindFirstFileW created the error > ERROR_NO_MORE_FILES. In some of the cases with a valid file path, this error > still returns

Re: RFR: 8315884: New Object to ObjectMonitor mapping [v3]

2024-07-11 Thread Coleen Phillimore
On Wed, 10 Jul 2024 09:41:08 GMT, Axel Boldt-Christmas wrote: >> src/hotspot/share/runtime/arguments.cpp line 1830: >> >>> 1828: FLAG_SET_CMDLINE(LockingMode, LM_LIGHTWEIGHT); >>> 1829: warning("UseObjectMonitorTable requires LM_LIGHTWEIGHT"); >>> 1830: } >> >> Maybe we want this to

Re: RFR: 8322420: [Linux] cgroup v2: Limits in parent nested control groups are not detected [v12]

2024-07-11 Thread Severin Gehwolf
On Thu, 11 Jul 2024 06:54:27 GMT, Jan Kratochvil wrote: >> The testcase requires root permissions. >> >> Designed by Severin Gehwolf, implemented by Jan Kratochvil. > > Jan Kratochvil has updated the pull request with a new target base due to a > merge or a rebase. The pull request now contai

[jdk23] Integrated: 8333884: MemorySegment::reinterpret removes read-only property

2024-07-11 Thread Jorn Vernee
On Wed, 10 Jul 2024 17:01:00 GMT, Jorn Vernee wrote: > Hi all, > > This pull request contains a backport of commit > [6f7f0f1d](https://github.com/openjdk/jdk/commit/6f7f0f1de05fdc0f6a88ccd90b806e8a5c5074ef) > from the [openjdk/jdk](https://git.openjdk.org/jdk) repository. > > The commit bein

Re: RFR: 8315884: New Object to ObjectMonitor mapping [v5]

2024-07-11 Thread Axel Boldt-Christmas
On Thu, 11 Jul 2024 09:25:52 GMT, Yudi Zheng wrote: >> Axel Boldt-Christmas has updated the pull request incrementally with four >> additional commits since the last revision: >> >> - Add extra comments in LightweightSynchronizer::inflate_fast_locked_object >> - Fix typos >> - Remove unused

Integrated: 8336239: Fix javadoc markup in java.lang.Process

2024-07-11 Thread Pavel Rappo
On Thu, 11 Jul 2024 09:36:02 GMT, Pavel Rappo wrote: > Was reading Process' documentation the other day and spotted a markup typo. > Please review this utmost trivial fix. This pull request has now been integrated. Changeset: 6fcd49f9 Author:Pavel Rappo URL: https://git.openjdk.org

Re: RFR: 8332249: Micro-optimize Method.hashCode [v2]

2024-07-11 Thread Aleksey Shipilev
On Tue, 11 Jun 2024 08:58:34 GMT, Aleksey Shipilev wrote: >> Sean Gwizdak 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 six additional >> comm

Re: RFR: 8336239: Fix javadoc markup in java.lang.Process

2024-07-11 Thread Jaikiran Pai
On Thu, 11 Jul 2024 09:36:02 GMT, Pavel Rappo wrote: > Was reading Process' documentation the other day and spotted a markup typo. > Please review this utmost trivial fix. Marked as reviewed by jpai (Reviewer). - PR Review: https://git.openjdk.org/jdk/pull/20133#pullrequestreview-

RFR: 8336239: Fix javadoc markup in java.lang.Process

2024-07-11 Thread Pavel Rappo
Was reading Process' documentation the other day and spotted a markup typo. Please review this utmost trivial fix. - Commit messages: - Initial commit Changes: https://git.openjdk.org/jdk/pull/20133/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=20133&range=00 Issue: ht

Re: RFR: 8315884: New Object to ObjectMonitor mapping [v5]

2024-07-11 Thread Yudi Zheng
On Wed, 10 Jul 2024 20:10:07 GMT, Axel Boldt-Christmas wrote: >> When inflating a monitor the `ObjectMonitor*` is written directly over the >> `markWord` and any overwritten data is displaced into a displaced >> `markWord`. This is problematic for concurrent GCs which needs extra care or >> l

Re: RFR: 8333446: Add tests for hierarchical container support [v3]

2024-07-11 Thread Severin Gehwolf
On Thu, 11 Jul 2024 03:42:27 GMT, Jan Kratochvil wrote: > [test.patch.txt](https://github.com/user-attachments/files/16171122/test.patch.txt) > > * `CPUQuota` (changed it to `AllowedCPUs`) does not work for me - it > properly distributes the load but JDK still sees all available CPU cores

Re: RFR: 8333446: Add tests for hierarchical container support [v3]

2024-07-11 Thread Severin Gehwolf
On Thu, 11 Jul 2024 03:39:37 GMT, Jan Kratochvil wrote: >> Severin Gehwolf 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 four additional >> c

Integrated: 8335553: [Graal] Compiler thread calls into jdk.internal.vm.VMSupport.decodeAndThrowThrowable and crashes in OOM situation

2024-07-11 Thread Doug Simon
On Mon, 8 Jul 2024 19:01:05 GMT, Doug Simon wrote: > This PR addresses intermittent failures in jtreg GC stress tests. The > failures occur under these conditions: > 1. Using a libgraal build with assertions enabled as the top tier JIT > compiler. Such a libgraal build will cause a VM exit if a

Re: RFR: 8335553: [Graal] Compiler thread calls into jdk.internal.vm.VMSupport.decodeAndThrowThrowable and crashes in OOM situation [v2]

2024-07-11 Thread Doug Simon
On Tue, 9 Jul 2024 13:46:46 GMT, Doug Simon wrote: >> This PR addresses intermittent failures in jtreg GC stress tests. The >> failures occur under these conditions: >> 1. Using a libgraal build with assertions enabled as the top tier JIT >> compiler. Such a libgraal build will cause a VM exit

Re: [jdk23] RFR: 8335935: Chained builders not sending transformed models to next transforms

2024-07-11 Thread Adam Sotona
On Wed, 10 Jul 2024 22:10:50 GMT, Chen Liang wrote: > Please review this non-clean backport of the bugfix in #20100 to release 23, > where ClassFile API chained builders does not emit certain elements through > downstream transforms and returns wrong builder for chaining. This backport > inclu