Re: RFR: 8321938: java/foreign/critical/TestCriticalUpcall.java does not need a core file

2024-01-17 Thread David Holmes
On Thu, 18 Jan 2024 00:58:49 GMT, Daniel D. Daugherty wrote: > A trivial fix to disable core file generation in > java/foreign/critical/TestCriticalUpcall.java. Good and trivial. Copyright year needs updating. Thanks - Marked as reviewed by dholmes (Reviewer). PR Review: https

Re: RFR: 8322149: ConcurrentHashMap smarter presizing for copy constructor and putAll [v3]

2024-01-17 Thread ExE Boss
On Thu, 18 Jan 2024 05:32:26 GMT, jmehrens wrote: >> Joshua Cao has updated the pull request incrementally with one additional >> commit since the last revision: >> >> putAll presize based on sum on both map sizes > > src/java.base/share/classes/java/util/concurrent/ConcurrentHashMap.java lin

Re: RFR: 8322149: ConcurrentHashMap smarter presizing for copy constructor and putAll [v3]

2024-01-17 Thread jmehrens
On Wed, 17 Jan 2024 21:16:02 GMT, Joshua Cao wrote: >> ConcurrentHashMap's copy constructor calls `putAll()` -> `tryPresize()` -> >> `transfer()`. When coming from the copy constructor, the Map is empty, so >> there is nothing to transfer. But `transfer()` will still copy all the empty >> node

RFR: 8321938: java/foreign/critical/TestCriticalUpcall.java does not need a core file

2024-01-17 Thread Daniel D . Daugherty
A trivial fix to disable core file generation in java/foreign/critical/TestCriticalUpcall.java. - Commit messages: - 8321938: java/foreign/critical/TestCriticalUpcall.java does not need a core file Changes: https://git.openjdk.org/jdk/pull/17476/files Webrev: https://webrevs.open

Re: RFR: 8324053: Use the blessed modifier order for sealed in java.base

2024-01-17 Thread Joe Darcy
On Wed, 17 Jan 2024 21:22:07 GMT, Pavel Rappo wrote: > Please review this trivial PR to reorder the `sealed` class or interface > modifier. For context of this change see: > https://github.com/openjdk/jdk/pull/17242#issuecomment-1887338396. Marked as reviewed by darcy (Reviewer).

[jdk22] Integrated: 8322799: Test JPKG003-013: ServiceTest fails because the user cannot uninstall the "servicetest" package on OEL 9.2 x64 and OEL 9.2 64-bit Arm (aarch64)

2024-01-17 Thread Alexey Semenyuk
On Wed, 17 Jan 2024 18:33:27 GMT, Alexey Semenyuk wrote: > Clean backport This pull request has now been integrated. Changeset: b5ed8cca Author:Alexey Semenyuk URL: https://git.openjdk.org/jdk22/commit/b5ed8cca77ab3d4303dde691d6ccb113f3ce0a65 Stats: 2 lines in 1 file changed: 1

Re: RFR: 8324053: Use the blessed modifier order for sealed in java.base

2024-01-17 Thread Naoto Sato
On Wed, 17 Jan 2024 21:22:07 GMT, Pavel Rappo wrote: > Please review this trivial PR to reorder the `sealed` class or interface > modifier. For context of this change see: > https://github.com/openjdk/jdk/pull/17242#issuecomment-1887338396. Marked as reviewed by naoto (Reviewer).

Re: RFR: 8311864: Add ArraysSupport.hashCode(int[] a, fromIndex, length, initialValue) [v4]

2024-01-17 Thread Pavel Rappo
On Tue, 2 Jan 2024 14:37:16 GMT, Pavel Rappo wrote: >> This PR adds an internal method to calculate hash code from the provided >> integer array, offset and length into that array, and the initial hash code >> value. >> >> Current options for calculating a hash code for int[] are inflexible. I

Re: RFR: 8323699: MessageFormat.toPattern() generates non-equivalent MessageFormat pattern [v2]

2024-01-17 Thread Archie Cobbs
> Please consider this fix to ensure that going from `MessageFormat` to pattern > string via `toPattern()` and then back via `new MessageFormat()` results in a > format that is equivalent to the original. > > The quoting and escaping rules for `MessageFormat` pattern strings are really > tricky

Re: RFR: 8323699: MessageFormat.toPattern() generates non-equivalent MessageFormat pattern

2024-01-17 Thread Archie Cobbs
On Tue, 16 Jan 2024 22:05:03 GMT, Justin Lu wrote: >> Please consider this fix to ensure that going from `MessageFormat` to >> pattern string via `toPattern()` and then back via `new MessageFormat()` >> results in a format that is equivalent to the original. >> >> The quoting and escaping rule

RFR: 8324053: Use the blessed modifier order for sealed in java.base

2024-01-17 Thread Pavel Rappo
Please review this trivial PR to reorder the `sealed` class or interface modifier. For context of this change see: https://github.com/openjdk/jdk/pull/17242#issuecomment-1887338396. - Commit messages: - Initial commit Changes: https://git.openjdk.org/jdk/pull/17468/files Webrev:

Re: RFR: 8323782: Race: Thread::interrupt vs. AbstractInterruptibleChannel.begin [v2]

2024-01-17 Thread Christoph Langer
On Wed, 17 Jan 2024 15:38:22 GMT, Richard Reingruber wrote: >> Set `interrupted` in `Thread::interrupt` before reading `nioBlocker` for >> correct (Dekker scheme) synchronization with concurrent execution of >> [`AbstractInterruptibleChannel::begin`](https://github.com/openjdk/jdk/blob/59062402

Re: RFR: 8322149: ConcurrentHashMap copy constructor should not transfer from old table on presizing [v2]

2024-01-17 Thread Joshua Cao
On Fri, 12 Jan 2024 08:51:16 GMT, Volker Simonis wrote: >>> tryPresize(int size) is doing and if its size argument is supposed to >>> contain the additional number of elements which will be inserted into the >>> hash map or if it is a hint for the new total size of the hash map >> >> Argument

Re: RFR: 8322149: ConcurrentHashMap copy constructor should not transfer from old table on presizing [v3]

2024-01-17 Thread Joshua Cao
> ConcurrentHashMap's copy constructor calls `putAll()` -> `tryPresize()` -> > `transfer()`. When coming from the copy constructor, the Map is empty, so > there is nothing to transfer. But `transfer()` will still copy all the empty > nodes from the old table to the new table. > > This patch avo

Re: [jdk22] RFR: 8322799: Test JPKG003-013: ServiceTest fails because the user cannot uninstall the "servicetest" package on OEL 9.2 x64 and OEL 9.2 64-bit Arm (aarch64)

2024-01-17 Thread Alexander Matveev
On Wed, 17 Jan 2024 18:33:27 GMT, Alexey Semenyuk wrote: > Clean backport Looks good. I verified that it is a clean backport. - Marked as reviewed by almatvee (Reviewer). PR Review: https://git.openjdk.org/jdk22/pull/88#pullrequestreview-1828180526

RFR: 8159927: Add a test to verify JMOD files created in the images do not have debug symbols

2024-01-17 Thread Mandy Chung
The build excludes the native debug symbols in JMOD files created for JDK modules (see make/CreateJmods.gmk). This PR adds a test to verify that native debug symbols are excluded as expected. - Commit messages: - 8159927: Add a test to verify JMOD files created in the images do n

Re: Seing a Collector as a Gatherer

2024-01-17 Thread forax
> From: "Viktor Klang" > To: "Remi Forax" > Sent: Wednesday, January 17, 2024 6:01:38 PM > Subject: Re: Seing a Collector as a Gatherer > Hi Rémi, > Yes, this was something I was hoping to get into the preview, but I wasn't > sure > where that conversion should end up. > There are a few diffe

[jdk22] Integrated: 8322512: StringBuffer.repeat does not work correctly after toString() was called

2024-01-17 Thread Jim Laskey
On Wed, 17 Jan 2024 14:21:22 GMT, Jim Laskey wrote: > The new repeat methods were not clearing the toStringCache. This pull request has now been integrated. Changeset: 60c68a13 Author:Jim Laskey URL: https://git.openjdk.org/jdk22/commit/60c68a13639fe79cc2510d551b8c1c7d7e1a02f3 Stats

Re: Gatherer API : wildcards complaint

2024-01-17 Thread Viktor Klang
Ah, now I see what you mean! Thank you 👍 The reason for the signature of `Gatherer.of` was to mirror as much as possible of `Collector.of`[1] so I would argue that if we tweak the variance of one then we should consider tweaking it for both. 1:https://github.com/openjdk/jdk/blob/master/src/java

Re: Gatherer API : wildcards complaint

2024-01-17 Thread forax
> From: "Viktor Klang" > To: "Remi Forax" , "core-libs-dev" > > Sent: Wednesday, January 17, 2024 5:49:01 PM > Subject: Re: Gatherer API : wildcards complaint > Hi RĂ©mi, > Thank you for the feedback—examples would be much appreciated! Here is an example with an interface and a class, interfa

Re: Gatherer: spliterator characteristics are not propagated

2024-01-17 Thread Viktor Klang
Hi Rémi, You can find some of my benches here: https://github.com/openjdk/jdk/tree/master/test/micro/org/openjdk/bench/java/util/stream/ops/ref Initially I had Characteristics such as ORDERED etc on Gatherer but it just didn't end up worth it when looking at the bench results over a wide array

Re: [jdk22] RFR: 8322799: Test JPKG003-013: ServiceTest fails because the user cannot uninstall the "servicetest" package on OEL 9.2 x64 and OEL 9.2 64-bit Arm (aarch64)

2024-01-17 Thread Alexey Semenyuk
On Wed, 17 Jan 2024 18:33:27 GMT, Alexey Semenyuk wrote: > Clean backport @alexeysemenyukoracle please review - PR Comment: https://git.openjdk.org/jdk22/pull/88#issuecomment-1896427625

[jdk22] RFR: 8322799: Test JPKG003-013: ServiceTest fails because the user cannot uninstall the "servicetest" package on OEL 9.2 x64 and OEL 9.2 64-bit Arm (aarch64)

2024-01-17 Thread Alexey Semenyuk
Clean backport - Commit messages: - Backport 8e12053e0352a26ecd7f2b9bc298ddb8fb4bb61b Changes: https://git.openjdk.org/jdk22/pull/88/files Webrev: https://webrevs.openjdk.org/?repo=jdk22&pr=88&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8322799 Stats: 2 lines in 1 file

Re: RFR: 8291027: Some of TimeZone methods marked 'synchronized' unnecessarily

2024-01-17 Thread Naoto Sato
On Tue, 16 Jan 2024 11:12:44 GMT, Andrey Turbanov wrote: >> 8291027: Some of TimeZone methods marked 'synchronized' unnecessarily > > src/java.base/share/classes/java/util/TimeZone.java line 629: > >> 627: */ >> 628: public static String[] getAvailableIDs(int rawOffset) { >> 629:

Re: RFR: 8323515: Create test alias "all" for all test roots [v3]

2024-01-17 Thread Joe Wang
On Tue, 16 Jan 2024 09:01:35 GMT, Aleksey Shipilev wrote: >> Since recent work to improve `tier4` performance, we actually test >> `tier{1,2,3,4}` often, which includes all the tests in current tree. It >> would be more convenient to just have the `all` test group/alias, so that we >> can do `

Re: [jdk22] RFR: 8322512: StringBuffer.repeat does not work correctly after toString() was called [v2]

2024-01-17 Thread Claes Redestad
On Wed, 17 Jan 2024 15:01:07 GMT, Jim Laskey wrote: >> The new repeat methods were not clearing the toStringCache. > > Jim Laskey 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/reb

Re: Improving the Gatherer public API

2024-01-17 Thread Viktor Klang
Hi Rémi, Thanks for your thoughts! Improving the documentation of Gatherer / Gatherers is definitely something I am intending to have inspired by feedback received as people try it out, so your thoughts here are most welcome. For the longest time Gatherer had Characteristics (just like Collect

Re: Seing a Collector as a Gatherer

2024-01-17 Thread Viktor Klang
Hi Rémi, Yes, this was something I was hoping to get into the preview, but I wasn't sure where that conversion should end up. There are a few different places where it might go: Gatherer.of(Collector) Gatherers.collect(Collector) Collector.asGatherer() Collectors.gather(Collector) I wasn't rea

Re: Gatherer API : wildcards complaint

2024-01-17 Thread Viktor Klang
Hi RĂ©mi, Thank you for the feedback―examples would be much appreciated! Cheers, √ Viktor Klang Software Architect, Java Platform Group Oracle From: core-libs-dev on behalf of Remi Forax Sent: Wednesday, 17 January 2024 16:55 To: core-libs-dev Subject: Gather

Seing a Collector as a Gatherer

2024-01-17 Thread Remi Forax
Hello, I may have overlook that, but it seems there is no method to see a Collector as a Gatherer. A Gatherer is more general than a Collector and a Gatherer with a greedy integrator that does not call Downstream.push in the intergator and only once is the finisher is basicaly a Collector. In

RFR: 8323835: Updating ASM to 9.6 for JDK 23

2024-01-17 Thread Vicente Romero
Updating ASM to version 9.6, Thanks in advance for the reviews, Vicente - Commit messages: - some additional minor changes - more changes - additional changes - 8323835: Updating ASM to 9.6 for JDK 23 Changes: https://git.openjdk.org/jdk/pull/17453/files Webrev: https://webrevs

Gatherer API : wildcards complaint

2024-01-17 Thread Remi Forax
Hello, this is a minor complaint but I do not see a raison to not getting this right. Currently the Gatherer API does not use the wildcard correctly, which is not fully an issue because there is "enough" wildcards that if you rely on the inference, it will work. The problem is that when you wri

Gatherer: spliterator characteristics are not propagated

2024-01-17 Thread Remi Forax
While doing some benchmarking of the Gatherer API, i've found that the characteristics of the spliterator was not propagated by the method Stream.gather() making the stream slower than it should. As an example, there is no way when reimplementing map() using a Gatherer to say that this intermed

Re: RFR: 8323782: Race: Thread::interrupt vs. AbstractInterruptibleChannel.begin [v2]

2024-01-17 Thread Richard Reingruber
On Wed, 17 Jan 2024 15:38:22 GMT, Richard Reingruber wrote: >> Set `interrupted` in `Thread::interrupt` before reading `nioBlocker` for >> correct (Dekker scheme) synchronization with concurrent execution of >> [`AbstractInterruptibleChannel::begin`](https://github.com/openjdk/jdk/blob/59062402

Integrated: 8323794: Remove unused jimage compressor plugin configuration

2024-01-17 Thread Claes Redestad
On Tue, 16 Jan 2024 10:55:07 GMT, Claes Redestad wrote: > There's an unused concept of a pluginConfig that is passed into the jlink > compress plugins, however we always pass null here and the code seems broken > (the pluginConfig wouldn't have been stored properly). This seem to be a > left-o

Re: RFR: 8323782: Race: Thread::interrupt vs. AbstractInterruptibleChannel.begin [v2]

2024-01-17 Thread Alan Bateman
On Wed, 17 Jan 2024 15:38:22 GMT, Richard Reingruber wrote: >> Set `interrupted` in `Thread::interrupt` before reading `nioBlocker` for >> correct (Dekker scheme) synchronization with concurrent execution of >> [`AbstractInterruptibleChannel::begin`](https://github.com/openjdk/jdk/blob/59062402

Improving the Gatherer public API

2024-01-17 Thread Remi Forax
Hello, i've played quite a lot with the Gatherer API and overall, i quite like how things work conceptually. But i think the public API can be improved. First, the documentation is not fully clear that a Gatherer has 3 characteristics, 1/ Is it sequential or parallelizable (can be parallel is a

Re: RFR: 8323782: Race: Thread::interrupt vs. AbstractInterruptibleChannel.begin [v2]

2024-01-17 Thread Richard Reingruber
> Set `interrupted` in `Thread::interrupt` before reading `nioBlocker` for > correct (Dekker scheme) synchronization with concurrent execution of > [`AbstractInterruptibleChannel::begin`](https://github.com/openjdk/jdk/blob/59062402b9c5ed5612a13c1c40eb22cf1b97c41a/src/java.base/share/classes/java

Re: RFR: 8323782: Race: Thread::interrupt vs. AbstractInterruptibleChannel.begin

2024-01-17 Thread Alan Bateman
On Tue, 16 Jan 2024 10:57:46 GMT, Richard Reingruber wrote: > Set `interrupted` in `Thread::interrupt` before reading `nioBlocker` for > correct (Dekker scheme) synchronization with concurrent execution of > [`AbstractInterruptibleChannel::begin`](https://github.com/openjdk/jdk/blob/59062402b9c

Re: [jdk22] RFR: 8322512: StringBuffer.repeat does not work correctly after toString() was called [v2]

2024-01-17 Thread Jim Laskey
> The new repeat methods were not clearing the toStringCache. Jim Laskey has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains two additional commits since th

Re: [jdk22] RFR: 8322512: StringBuffer.repeat does not work correctly after toString() was called

2024-01-17 Thread Pavel Rappo
On Wed, 17 Jan 2024 14:21:22 GMT, Jim Laskey wrote: > The new repeat methods were not clearing the toStringCache. Jim, note that the bot said this: > At the time when this comment was updated there had been 64 new commits > pushed to the master branch: I'm not sure why there's such a big dive

Re: [jdk22] RFR: 8322512: StringBuffer.repeat does not work correctly after toString() was called

2024-01-17 Thread Pavel Rappo
On Wed, 17 Jan 2024 14:21:22 GMT, Jim Laskey wrote: > The new repeat methods were not clearing the toStringCache. Seems like a clean backport of a P3 bug from mainline to jdk 22, just in time before RDP 2. - Marked as reviewed by prappo (Reviewer). PR Review: https://git.openjdk.

[jdk22] RFR: 8322512: StringBuffer.repeat does not work correctly after toString() was called

2024-01-17 Thread Jim Laskey
The new repeat methods were not clearing the toStringCache. - Commit messages: - Backport df22fb322e6c4c9931a770bd0abf4c43b83c4e4a Changes: https://git.openjdk.org/jdk22/pull/87/files Webrev: https://webrevs.openjdk.org/?repo=jdk22&pr=87&range=00 Issue: https://bugs.openjdk.org/b

Re: RFR: 8310837: Use ByteArrayLittleEndian in java.util.zip [v6]

2024-01-17 Thread Glavo
On Tue, 16 Jan 2024 15:16:45 GMT, Jaikiran Pai wrote: >> Glavo 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 commits since >> t

Re: RFR: 8323515: Create test alias "all" for all test roots [v3]

2024-01-17 Thread Aleksey Shipilev
On Tue, 16 Jan 2024 09:01:35 GMT, Aleksey Shipilev wrote: >> Since recent work to improve `tier4` performance, we actually test >> `tier{1,2,3,4}` often, which includes all the tests in current tree. It >> would be more convenient to just have the `all` test group/alias, so that we >> can do `

Re: RFR: 8275338: Add JFR events for notable serialization situations [v15]

2024-01-17 Thread Raffaello Giulietti
On Mon, 15 Jan 2024 14:17:40 GMT, Raffaello Giulietti wrote: >> Adds serialization misdeclaration events to JFR. > > Raffaello Giulietti has updated the pull request incrementally with one > additional commit since the last revision: > > Removed useless event settings in test. I plan to int

Re: RFR: 8323794: Remove unused jimage compressor plugin configuration [v5]

2024-01-17 Thread Claes Redestad
On Wed, 17 Jan 2024 10:41:07 GMT, Claes Redestad wrote: >> There's an unused concept of a pluginConfig that is passed into the jlink >> compress plugins, however we always pass null here and the code seems broken >> (the pluginConfig wouldn't have been stored properly). This seem to be a >> le

Re: RFR: 8323794: Remove unused jimage compressor plugin configuration [v5]

2024-01-17 Thread Claes Redestad
> There's an unused concept of a pluginConfig that is passed into the jlink > compress plugins, however we always pass null here and the code seems broken > (the pluginConfig wouldn't have been stored properly). This seem to be a > left-over from a more generic plugin design that never came to f

[jdk22] Integrated: 8323159: Consider adding some text re. memory zeroing in Arena::allocate

2024-01-17 Thread Per Minborg
On Mon, 15 Jan 2024 16:14:15 GMT, Per Minborg wrote: > 8323159: Consider adding some text re. memory zeroing in Arena::allocate This pull request has now been integrated. Changeset: 887a93b7 Author:Per Minborg URL: https://git.openjdk.org/jdk22/commit/887a93b7c949308b83d4feba714682e

RFR: 8323782: Race: Thread::interrupt vs. AbstractInterruptibleChannel.begin

2024-01-17 Thread Richard Reingruber
Set `interrupted` in `Thread::interrupt` before reading `nioBlocker` for correct (Dekker scheme) synchronization with concurrent execution of [`AbstractInterruptibleChannel::begin`](https://github.com/openjdk/jdk/blob/59062402b9c5ed5612a13c1c40eb22cf1b97c41a/src/java.base/share/classes/java/nio/c

Re: RFR: 8323782: Race: Thread::interrupt vs. AbstractInterruptibleChannel.begin

2024-01-17 Thread Richard Reingruber
On Tue, 16 Jan 2024 10:57:46 GMT, Richard Reingruber wrote: > Set `interrupted` in `Thread::interrupt` before reading `nioBlocker` for > correct (Dekker scheme) synchronization with concurrent execution of > [`AbstractInterruptibleChannel::begin`](https://github.com/openjdk/jdk/blob/59062402b9c

Re: RFR: 8294977: Convert test/jdk/java tests from ASM library to Classfile API [v11]

2024-01-17 Thread Adam Sotona
On Sun, 17 Dec 2023 23:11:10 GMT, Chen Liang wrote: >> Summaries: >> 1. A few recommendations about updating the constant API is made at >> https://mail.openjdk.org/pipermail/classfile-api-dev/2023-March/000233.html >> and I may update this patch shall the API changes be integrated before >> 2.