Re: RFR: 8311178: JMH tests don't scale well when sharing output buffers

2023-07-10 Thread Hamlin Li
On Mon, 10 Jul 2023 08:17:59 GMT, Hamlin Li wrote: >> @Hamlin-Li >> The PR is fully correct. >> Don't forget, every Java instance method has a specific argument which >> called "this". That is why @State annotation is working. > > @kuksenko @swati-sha Thanks for explanation. I can understand w

Re: RFR: 8311178: JMH tests don't scale well when sharing output buffers

2023-07-10 Thread Hamlin Li
On Sat, 1 Jul 2023 07:53:17 GMT, Swati Sharma wrote: > The below benchmark files have scaling issues due to cache contention and > leads to poor scaling when run on multiple threads. The patch sets the scope > from benchmark level to thread level to fix the issue: > - org/openjdk/bench/java/io/

Re: [EXTERNAL] Re: 4-letter patterns in Date Format Style no longer give full text style

2023-07-10 Thread Alan Bateman
On 10/07/2023 21:09, Naoto Sato wrote: : And isn't this the case of a breaking change more than just updating the time database used by default in JDK? You could specify the system property `java.locale.providers` to COMPAT to use the JDK8 locales (although this has been deprecated in

Re: RFR: 8311645: Memory leak in jspawnhelper spawnChild after JDK-8307990

2023-07-10 Thread Alan Bateman
On Sat, 8 Jul 2023 02:05:27 GMT, Jenny Shivayogi wrote: > Free-ing 'buf' before two conditional return statements introduced by > JDK-8307990 Marked as reviewed by alanb (Reviewer). - PR Review: https://git.openjdk.org/jdk/pull/14809#pullrequestreview-1523459114

[jdk21] RFR: 8311593: Minor doc issue in MemorySegment::copy

2023-07-10 Thread Maurizio Cimadamore
Clean backport of https://git.openjdk.org/jdk/pull/14813 (sorry for filing another one, I realized there was an issue with the JBS issues pointing the wrong way) - Commit messages: - Backport 6569b252b9e61e3eed77039c483529154feffbba Changes: https://git.openjdk.org/jdk21/pull/109/f

Re: RFR: 8308694: Clarify reversed() default methods' implementation requirements [v4]

2023-07-10 Thread Stuart Marks
On Fri, 7 Jul 2023 22:55:12 GMT, Stuart Marks wrote: >> Can I get a preliminary review of the wording for Deque.reversed()? If the >> text is good, I'll make corresponding changes to the implSpecs of the other >> reversed() default methods, namely those in List, SortedMap, and SortedSet >> and

Re: [jdk21] RFR: 8311593: Minor doc issue in MemorySegment::copy

2023-07-10 Thread Maurizio Cimadamore
On Mon, 10 Jul 2023 15:08:00 GMT, Maurizio Cimadamore wrote: > Clean backport of https://git.openjdk.org/jdk/pull/14813 Closing due to issue when creating backport. - PR Comment: https://git.openjdk.org/jdk21/pull/107#issuecomment-1629921468

[jdk21] Withdrawn: 8311593: Minor doc issue in MemorySegment::copy

2023-07-10 Thread Maurizio Cimadamore
On Mon, 10 Jul 2023 15:08:00 GMT, Maurizio Cimadamore wrote: > Clean backport of https://git.openjdk.org/jdk/pull/14813 This pull request has been closed without being integrated. - PR: https://git.openjdk.org/jdk21/pull/107

Re: RFR: 8310843: Reimplement ByteArray and ByteArrayLittleEndian with Unsafe [v9]

2023-07-10 Thread Glavo
On Tue, 27 Jun 2023 20:29:36 GMT, Glavo wrote: >> `ByteArray` and `ByteArrayLittleEndian` are very useful tool classes that >> can be used in many places to performance tuning. >> >> Currently they are implemented by `VarHandle`, so using them may have some >> impact on startup time. >> >> Th

Withdrawn: 8302204: Optimize BigDecimal.divide

2023-07-10 Thread duke
On Fri, 10 Feb 2023 10:00:05 GMT, Xiaowei Lu wrote: > [JDK-8269667](https://bugs.openjdk.org/browse/JDK-8269667) has uncovered the > poor performance of BigDecimal.divide under certain circumstance. > > We confront similar situations when benchmarking Spark3 on TPC-DS test kit. > According to

Re: RFR: 8311178: JMH tests don't scale well when sharing output buffers

2023-07-10 Thread Sandhya Viswanathan
On Sat, 1 Jul 2023 07:53:17 GMT, Swati Sharma wrote: > The below benchmark files have scaling issues due to cache contention and > leads to poor scaling when run on multiple threads. The patch sets the scope > from benchmark level to thread level to fix the issue: > - org/openjdk/bench/java/io/

Re: RFR: JDK-6361826: (reflect) provide method for mapping strings to class object for primitive types

2023-07-10 Thread Joe Darcy
On Fri, 30 Jun 2023 23:46:48 GMT, Chen Liang wrote: > The main downside of throwing an exception is that exception stack trace > filling is very costly. If this API is used to process unsanitized strings > like users inputs, throwing might impose performance costs for handling bad > inputs. F

Re: RFR: JDK-6361826: (reflect) provide method for mapping strings to class object for primitive types [v2]

2023-07-10 Thread Joe Darcy
> Going over some old issues and found this RFE, posting without any tests or a > CSR first to get some feedback on the overall API. Joe Darcy 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

Re: [EXTERNAL] Re: 4-letter patterns in Date Format Style no longer give full text style

2023-07-10 Thread Naoto Sato
On 7/10/23 12:49 PM, Bruno Borges wrote: Given that "en_US" is well known and commonly a user input data, what is then the ideal way to create a Locale object for such string input? Then use Locale.forLanguageTag(). It will accept BCP 47 Langauge tag. You will need to replace `_` with `-`.

Re: [EXTERNAL] Re: 4-letter patterns in Date Format Style no longer give full text style

2023-07-10 Thread Bruno Borges
Given that "en_US" is well known and commonly a user input data, what is then the ideal way to create a Locale object for such string input? And isn't this the case of a breaking change more than just updating the time database used by default in JDK? Perhaps in other words, shouldn't Locale(St

Re: 4-letter patterns in Date Format Style no longer give full text style

2023-07-10 Thread Naoto Sato
Hi, In your test case, ``` new Locale("en_US"); ``` This will fall back to ROOT locale texts with CLDR (default since JDK9) where it differs from US English. Probably you may want to `new Locale("en", "US)` or preferably use `Locale.US` constant. Naoto On 7/10/23 12:08 PM, Bruno Borges wro

Re: RFR: JDK-6361826: (reflect) provide method for mapping strings to class object for primitive types

2023-07-10 Thread Joe Darcy
On Sat, 1 Jul 2023 01:32:48 GMT, Mandy Chung wrote: > The descriptor string "I", "J", etc possible but not for "int", "long", > "byte" etc which are keywords and can't be used as identifiers to name a > class. For users, I think it is reasonable for there to be an API accepting the source-lev

Re: 4-letter patterns in Date Format Style no longer give full text style

2023-07-10 Thread Joseph D. Darcy
Perhaps JEP 252 (https://openjdk.org/jeps/252) as mentioned in the JDK 9 release notes. -Joe On 7/10/2023 12:08 PM, Bruno Borges wrote: Hi all, Was there any change to Date Time Formatter API that made the "" and the "" (and other 4-letter patterns) change from Java 8 to 11+ ? In

4-letter patterns in Date Format Style no longer give full text style

2023-07-10 Thread Bruno Borges
Hi all, Was there any change to Date Time Formatter API that made the "" and the "" (and other 4-letter patterns) change from Java 8 to 11+ ? In Java 8, "" with locale en_US correctly gives the FULL day of week, e.g., "Monday". In Java 11 and 17 (two I've tested), the same input wi

Re: RFR: 8311645: Memory leak in jspawnhelper spawnChild after JDK-8307990

2023-07-10 Thread Volker Simonis
On Mon, 10 Jul 2023 18:38:11 GMT, Aleksey Shipilev wrote: > Hold on a sec, let's make sure the GitHub Actions complete with all green. We > can techinically wait after `/integrate` is said for sponsored changeset, but > it is cleaner process-wise to wait for GHA all-clear/all-green. Sure thing

Re: RFR: 8311645: Memory leak in jspawnhelper spawnChild after JDK-8307990

2023-07-10 Thread Aleksey Shipilev
On Sat, 8 Jul 2023 02:05:27 GMT, Jenny Shivayogi wrote: > Free-ing 'buf' before two conditional return statements introduced by > JDK-8307990 Hold on a sec, let's make sure the GitHub Actions complete with all green. We can techinically wait after `/integrate` is said for sponsored changeset,

Re: RFR: 8311645: Memory leak in jspawnhelper spawnChild after JDK-8307990

2023-07-10 Thread Jenny Shivayogi
On Mon, 10 Jul 2023 16:38:26 GMT, Volker Simonis wrote: >> Free-ing 'buf' before two conditional return statements introduced by >> JDK-8307990 > > Hi @kspeeyu , > > Thanks for fixing this issue. The fix looks good except the whitespace issue > already mentioned before. > > Notice that we don

Re: RFR: 8311645: Memory leak in jspawnhelper spawnChild after JDK-8307990

2023-07-10 Thread Volker Simonis
On Sat, 8 Jul 2023 02:05:27 GMT, Jenny Shivayogi wrote: > Free-ing 'buf' before two conditional return statements introduced by > JDK-8307990 Thanks, looks good now. I can sponsor your change once you `/integrate`. - Marked as reviewed by simonis (Reviewer). PR Review: https://g

Re: RFR: 8311645: Memory leak in jspawnhelper spawnChild after JDK-8307990

2023-07-10 Thread Aleksey Shipilev
On Sat, 8 Jul 2023 02:05:27 GMT, Jenny Shivayogi wrote: > Free-ing 'buf' before two conditional return statements introduced by > JDK-8307990 Looks good! - Marked as reviewed by shade (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/14809#pullrequestreview-1522691783

Re: RFR: 8310813: Simplify and modernize equals, hashCode, and compareTo for BigInteger [v2]

2023-07-10 Thread Pavel Rappo
On Mon, 10 Jul 2023 17:07:28 GMT, Joe Darcy wrote: > I would be in favor of keeping the current hash behavior for now, even if it > is updated in subsequent work. Users have had more than two decades to > become, accidentally, reliant on the hash algorithms. Fair enough; then I suggest we intr

Re: RFR: 8311645: Memory leak in jspawnhelper spawnChild after JDK-8307990

2023-07-10 Thread Jenny Shivayogi
On Mon, 10 Jul 2023 11:12:36 GMT, Aleksey Shipilev wrote: >> Free-ing 'buf' before two conditional return statements introduced by >> JDK-8307990 > > src/java.base/unix/native/libjava/ProcessImpl_md.c line 575: > >> 573: writeFully(c->childenv[1], buf, bufsize) != bufsize) { >> 574:

Re: RFR: 8311645: Memory leak in jspawnhelper spawnChild after JDK-8307990

2023-07-10 Thread Volker Simonis
On Sat, 8 Jul 2023 02:05:27 GMT, Jenny Shivayogi wrote: > Free-ing 'buf' before two conditional return statements introduced by > JDK-8307990 Hi @kspeeyu , Thanks for fixing this issue. The fix looks good except the whitespace issue already mentioned before. Notice that we don't use TABs for

Re: RFR: 8311645: Memory leak in jspawnhelper spawnChild after JDK-8307990

2023-07-10 Thread Aleksey Shipilev
On Sat, 8 Jul 2023 02:05:27 GMT, Jenny Shivayogi wrote: > Free-ing 'buf' before two conditional return statements introduced by > JDK-8307990 Looks okay, but need to fix two whitespace errors for jcheck to be happy. Also, attention @simonis, whose patch introduced this little problem, I think.

RFR: 8311645: Memory leak in jspawnhelper spawnChild after JDK-8307990

2023-07-10 Thread Jenny Shivayogi
Free-ing 'buf' before two conditional return statements introduced by JDK-8307990 - Commit messages: - removing tab space and resolving merge conflict - Merge branch 'openjdk:master' into JDK-8311645 - removing tab space - freeing the buf before return - removing tab space Chan

Re: RFR: 6983726: Reimplement MethodHandleProxies.asInterfaceInstance [v22]

2023-07-10 Thread Mandy Chung
On Fri, 7 Jul 2023 06:45:46 GMT, Chen Liang wrote: >> As John Rose has pointed out in this issue, the current j.l.r.Proxy based >> implementation of MethodHandleProxies.asInterface has a few issues: >> 1. Exposes too much information via Proxy supertype (and WrapperInstance >> interface) >> 2.

Re: RFR: 8066869: Add Closeable::closeUnchecked that is the equivalent of close but throws UncheckedIOException [v2]

2023-07-10 Thread Glavo
On Fri, 7 Jul 2023 15:56:13 GMT, Brian Burkhalter wrote: >> Add a default method `java.io.Closeable::closeUnchecked` which is equivalent >> to `Closeable::close` except that it instead throws >> `java.io.UncheckedIOException`. > > Brian Burkhalter has updated the pull request incrementally with

Re: RFR: 8066869: Add Closeable::closeUnchecked that is the equivalent of close but throws UncheckedIOException [v2]

2023-07-10 Thread Alan Bateman
On Fri, 7 Jul 2023 15:56:13 GMT, Brian Burkhalter wrote: >> Add a default method `java.io.Closeable::closeUnchecked` which is equivalent >> to `Closeable::close` except that it instead throws >> `java.io.UncheckedIOException`. > > Brian Burkhalter has updated the pull request incrementally with

Re: [jdk21] RFR: 8311593: Minor doc issue in MemorySegment::copy

2023-07-10 Thread Jorn Vernee
On Mon, 10 Jul 2023 15:08:00 GMT, Maurizio Cimadamore wrote: > Clean backport of https://git.openjdk.org/jdk/pull/14813 Marked as reviewed by jvernee (Reviewer). - PR Review: https://git.openjdk.org/jdk21/pull/107#pullrequestreview-1522609664

Re: RFR: 8066869: Add Closeable::closeUnchecked that is the equivalent of close but throws UncheckedIOException [v2]

2023-07-10 Thread Joe Darcy
On Fri, 7 Jul 2023 15:56:13 GMT, Brian Burkhalter wrote: >> Add a default method `java.io.Closeable::closeUnchecked` which is equivalent >> to `Closeable::close` except that it instead throws >> `java.io.UncheckedIOException`. > > Brian Burkhalter has updated the pull request incrementally with

Re: RFR: 8310813: Simplify and modernize equals, hashCode, and compareTo for BigInteger [v2]

2023-07-10 Thread Joe Darcy
On Thu, 29 Jun 2023 15:50:33 GMT, Roger Riggs wrote: >> Pavel Rappo has updated the pull request with a new target base due to a >> merge or a rebase. The incremental webrev excludes the unrelated changes >> brought in by the merge/rebase. The pull request contains five additional >> commits s

Integrated: 8311528: Remove IDE specific SuppressWarnings

2023-07-10 Thread Naoto Sato
On Thu, 6 Jul 2023 21:03:29 GMT, Naoto Sato wrote: > Removing the IDE specific `@SuppressWarnings` attached to > `java.util.Calendar#equals()`. `equals()` implementation now checks the type > of the other instance for this. This pull request has now been integrated. Changeset: 63f32fbe Author

Re: RFR: 8155902: DataOutputStream writeInt creates 2 packets instead of 1 [v2]

2023-07-10 Thread Brian Burkhalter
On Fri, 7 Jul 2023 18:14:16 GMT, Roger Riggs wrote: >>> I would not want to give any assurances about whether the bytes of an >>> encoded primitive were written individually or as a group. >> >> Would it be helpful to add further verbiage? >> >> For example, the sequence of bytes comprising th

Re: RFR: 8311630: [s390] Implementation of Foreign Function & Memory API (Preview) [v3]

2023-07-10 Thread Jorn Vernee
On Sat, 8 Jul 2023 10:48:15 GMT, sid8606 wrote: >> Implementation of "Foreign Function & Memory API" for s390x (Big Endian). > > sid8606 has updated the pull request incrementally with one additional commit > since the last revision: > > Address suggestions from Jorn Vernee Tests came back g

Re: RFR: 8311630: [s390] Implementation of Foreign Function & Memory API (Preview) [v2]

2023-07-10 Thread sid8606
On Fri, 7 Jul 2023 12:24:10 GMT, Jorn Vernee wrote: >> sid8606 has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Address Amit's review comments > > src/hotspot/cpu/s390/upcallLinker_s390.cpp line 243: > >> 241: case T_CHAR: >> 242

Re: RFR: 8311178: JMH tests don't scale well when sharing output buffers

2023-07-10 Thread John Jiang
On Sat, 1 Jul 2023 07:53:17 GMT, Swati Sharma wrote: > The below benchmark files have scaling issues due to cache contention and > leads to poor scaling when run on multiple threads. The patch sets the scope > from benchmark level to thread level to fix the issue: > - org/openjdk/bench/java/io/

Re: RFR: 8310813: Simplify and modernize equals, hashCode, and compareTo for BigInteger [v2]

2023-07-10 Thread Raffaello Giulietti
On Mon, 10 Jul 2023 14:39:51 GMT, Raffaello Giulietti wrote: >> Back to your two suggestions, Raffaello. On the one hand, I think it's hard >> to beat the readability of `?:`. On the other hand, such comparison is >> performance-sensitive and is a pattern in BigInteger. So we might as well >>

Re: RFR: 8310813: Simplify and modernize equals, hashCode, and compareTo for BigInteger [v2]

2023-07-10 Thread Raffaello Giulietti
On Mon, 10 Jul 2023 14:39:51 GMT, Raffaello Giulietti wrote: >> Back to your two suggestions, Raffaello. On the one hand, I think it's hard >> to beat the readability of `?:`. On the other hand, such comparison is >> performance-sensitive and is a pattern in BigInteger. So we might as well >>

[jdk21] RFR: 8311593: Minor doc issue in MemorySegment::copy

2023-07-10 Thread Maurizio Cimadamore
Clean backport of https://git.openjdk.org/jdk/pull/14813 - Commit messages: - Backport 6569b252b9e61e3eed77039c483529154feffbba Changes: https://git.openjdk.org/jdk21/pull/107/files Webrev: https://webrevs.openjdk.org/?repo=jdk21&pr=107&range=00 Issue: https://bugs.openjdk.org/br

Integrated: 8311593: Minor doc issue in MemorySegment::copy

2023-07-10 Thread Maurizio Cimadamore
On Mon, 10 Jul 2023 11:00:54 GMT, Maurizio Cimadamore wrote: > This simple PR fixes an issue where `this segment` was used in the javadoc of > two static methods. This pull request has now been integrated. Changeset: 6569b252 Author:Maurizio Cimadamore URL: https://git.openjdk.org

Re: RFR: 8281658: Add a security category to the java -XshowSettings option [v10]

2023-07-10 Thread Sean Mullan
On Fri, 7 Jul 2023 19:42:18 GMT, Sean Coffey wrote: >> New functionality in the -XshowSettings menu to display relevant information >> about JDK security configuration > > Sean Coffey has updated the pull request incrementally with two additional > commits since the last revision: > > - Harde

Re: RFR: 8310813: Simplify and modernize equals, hashCode, and compareTo for BigInteger [v2]

2023-07-10 Thread Raffaello Giulietti
On Mon, 10 Jul 2023 13:48:34 GMT, Pavel Rappo wrote: >> Yep, you're right. > > Back to your two suggestions, Raffaello. On the one hand, I think it's hard > to beat the readability of `?:`. On the other hand, such comparison is > performance-sensitive and is a pattern in BigInteger. So we might

Re: RFR: 8311593: Minor doc issue in MemorySegment::copy

2023-07-10 Thread Jorn Vernee
On Mon, 10 Jul 2023 11:00:54 GMT, Maurizio Cimadamore wrote: > This simple PR fixes an issue where `this segment` was used in the javadoc of > two static methods. Marked as reviewed by jvernee (Reviewer). - PR Review: https://git.openjdk.org/jdk/pull/14813#pullrequestreview-15222

Re: RFR: 8311178: JMH tests don't scale well when sharing output buffers

2023-07-10 Thread Sergey Kuksenko
On Mon, 10 Jul 2023 08:17:59 GMT, Hamlin Li wrote: >> @Hamlin-Li >> The PR is fully correct. >> Don't forget, every Java instance method has a specific argument which >> called "this". That is why @State annotation is working. > > @kuksenko @swati-sha Thanks for explanation. I can understand w

Re: RFR: 8310813: Simplify and modernize equals, hashCode, and compareTo for BigInteger [v2]

2023-07-10 Thread Pavel Rappo
On Mon, 26 Jun 2023 14:42:11 GMT, Raffaello Giulietti wrote: >> Thanks for looking at this. My reply to both of your comments, is that there >> are further improvements possible, and I'd be happy to explore such >> possibilities later. Right now I'm more concerned with `hashCode` and >> possi

Integrated: 8310892: ScopedValue throwing StructureViolationException should be clearer

2023-07-10 Thread Alan Bateman
On Tue, 27 Jun 2023 15:34:58 GMT, Alan Bateman wrote: > Docs only update to add a missing `@throws StructureViolationException` and > make it clearer when the exception is thrown. In the future we might re-visit > this so that the description is in one place rather than in each method. This pu

Re: RFR: 8310892: ScopedValue throwing StructureViolationException should be clearer [v3]

2023-07-10 Thread Daniel Fuchs
On Mon, 10 Jul 2023 05:05:13 GMT, Alan Bateman wrote: >> Docs only update to add a missing `@throws StructureViolationException` and >> make it clearer when the exception is thrown. In the future we might >> re-visit this so that the description is in one place rather than in each >> method. >

RFR: 8311593: Minor doc issue in MemorySegment::copy

2023-07-10 Thread Maurizio Cimadamore
This simple PR fixes an issue where `this segment` was used in the javadoc of two static methods. - Commit messages: - Initial push Changes: https://git.openjdk.org/jdk/pull/14813/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=14813&range=00 Issue: https://bugs.openjdk.o

Re: RFR: 8311178: JMH tests don't scale well when sharing output buffers

2023-07-10 Thread Hamlin Li
On Fri, 7 Jul 2023 16:02:57 GMT, Sergey Kuksenko wrote: >> Hi, >> I'm not sure if I understand this improvement correctly. >> I'm not quite familiar with JMH and it's annotations, but seems to me, the >> change from `@State(Scope.Benchmark)` to `@State(Scope.Thread)` should not >> improve the p