RFR: 8351017: ChronoUnit.MONTHS.between() not giving correct result when date is in February

2025-03-06 Thread Naoto Sato
Clarifying the explanation for `TemporalUnit.between()`. There is already an example for the `HOURS` case where the minutes are not enough to make a full hour. Explaining how smaller units contribute to determining the whole number, along with an explicit `MONTHS` example, which was the case rep

Re: RFR: 8350811: [JMH] test foreign.StrLenTest failed with StringIndexOutOfBoundsException for size=451 [v2]

2025-03-06 Thread duke
On Tue, 4 Mar 2025 19:37:32 GMT, Vladimir Ivanov wrote: >> test setup was updated to generate data of requested size. > > Vladimir Ivanov has updated the pull request incrementally with one > additional commit since the last revision: > > JDK-8350811 [JMH] test foreign.StrLenTest failed with

Re: RFR: 8351322: Parameterize link option for pthreads

2025-03-06 Thread David Holmes
On Thu, 6 Mar 2025 15:47:58 GMT, Magnus Ihse Bursie wrote: >> What is the intended way of using this? Do you run make with >> `LIBPTHREAD=-pthread` or do you apply a patch on `libraries.m4` for the >> specific way of linking to pthread? > >> What is the intended way of using this? Do you run ma

Re: RFR: 8350811: [JMH] test foreign.StrLenTest failed with StringIndexOutOfBoundsException for size=451 [v2]

2025-03-06 Thread Vladimir Ivanov
On Tue, 4 Mar 2025 19:37:32 GMT, Vladimir Ivanov wrote: >> test setup was updated to generate data of requested size. > > Vladimir Ivanov has updated the pull request incrementally with one > additional commit since the last revision: > > JDK-8350811 [JMH] test foreign.StrLenTest failed with

Re: RFR: 8351017: ChronoUnit.MONTHS.between() not giving correct result when date is in February

2025-03-06 Thread Stephen Colebourne
On Thu, 6 Mar 2025 23:36:29 GMT, Naoto Sato wrote: > Clarifying the explanation for `TemporalUnit.between()`. There is already an > example for the `HOURS` case where the minutes are not enough to make a full > hour. Explaining how smaller units contribute to determining the whole > number, al

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

2025-03-06 Thread Galder Zamarreño
On Tue, 17 Dec 2024 16:40:01 GMT, Galder Zamarreño wrote: >> test/hotspot/jtreg/compiler/intrinsics/math/TestMinMaxInlining.java line 80: >> >>> 78: @IR(phase = { CompilePhase.BEFORE_MACRO_EXPANSION }, counts = { >>> IRNode.MIN_L, "1" }) >>> 79: @IR(phase = { CompilePhase.AFTER_MACRO_EX

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

2025-03-06 Thread Galder Zamarreño
> 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 following error: > > > VLoop::check_preconditions: failed:

Re: RFR: 8350811: [JMH] test foreign.StrLenTest failed with StringIndexOutOfBoundsException for size=451 [v2]

2025-03-06 Thread Jatin Bhateja
On Tue, 4 Mar 2025 19:37:32 GMT, Vladimir Ivanov wrote: >> test setup was updated to generate data of requested size. > > Vladimir Ivanov has updated the pull request incrementally with one > additional commit since the last revision: > > JDK-8350811 [JMH] test foreign.StrLenTest failed with

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

2025-03-06 Thread Galder Zamarreño
On Thu, 6 Mar 2025 15:22:18 GMT, Emanuel Peter wrote: >> Also, I've started a [discussion on >> jmh-dev](https://mail.openjdk.org/pipermail/jmh-dev/2025-February/004094.html) >> to see if there's a way to minimise pollution of `Math.min(II)` >> compilation. As a follow to >> https://github.co

Re: RFR: 8343191: Cgroup v1 subsystem fails to set subsystem path [v17]

2025-03-06 Thread David Holmes
On Sun, 2 Mar 2025 21:17:04 GMT, Sergey Chernyshev wrote: >> OK for me now. `test_cgroupSubsystem_linux.cpp` needs a copyright update as >> well. > >> OK for me now. `test_cgroupSubsystem_linux.cpp` needs a copyright update as >> well. > > Thanks for your review @jerboaa ! I cheched the > te

Re: RFR: 8350909: [JMH] test ThreadOnSpinWaitShared failed for 2 threads config

2025-03-06 Thread Vladimir Ivanov
On Fri, 28 Feb 2025 01:20:44 GMT, Vladimir Ivanov wrote: > The scope was updated to support multithread configuration (jmh option '-t > 2') . No other changes needed. Thanks for your review! - PR Comment: https://git.openjdk.org/jdk/pull/23834#issuecomment-2704538159

Integrated: 8349358: [JMH] Cannot access class jdk.internal.vm.ContinuationScope

2025-03-06 Thread SendaoYan
On Tue, 4 Feb 2025 12:35:50 GMT, SendaoYan wrote: > Hi all, > > Several JMH tests fails "cannot access class > jdk.internal.vm.ContinuationScope (in module java.base) because module > java.base does not export jdk.internal.vm to unnamed module". This PR add VM > option `--add-exports=java.bas

RFR: 8348986: Improve coverage of enhanced exception messages

2025-03-06 Thread Michael McMahon
Hi, Enhanced exception messages are designed to hide sensitive information such as hostnames, IP addresses from exception message strings, unless the enhanced mode for the specific category has been explicitly enabled. Enhanced exceptions were first introduced in 8204233 in JDK 11 and update

Re: RFR: 8351344: Avoid explicit Objects.requireNonNull in String.join

2025-03-06 Thread Chen Liang
On Thu, 20 Feb 2025 09:30:02 GMT, Andrey Turbanov wrote: > We have helpful NPE messages now - they are more user-friendly. > And shorter methods are more likely to be inlined. Looks nice to me, thanks! src/java.base/share/classes/java/lang/String.java line 3650: > 3648: var delim = del

RFR: 8351322: Parameterize link option for pthreads

2025-03-06 Thread snake66
Replace hardcoded instances of `-lpthread` with `$(LIBPTHREAD)`, so that it's possible to parameterize this for platforms that use different flags for enabling posix threads. This work is a continuation of the work done by Greg Lewis in [1], but generalized for the full JDK, and set at the conf

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

2025-03-06 Thread Emanuel Peter
On Thu, 27 Feb 2025 16:38:30 GMT, Galder Zamarreño wrote: >> Galder Zamarreño 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 44 additional >> c

Re: RFR: 8341641: Make %APPDATA% and %LOCALAPPDATA% env variables available in *.cfg files [v3]

2025-03-06 Thread Alexey Semenyuk
> jpackage app laucnher will expand environment variables in .cfg files. > > Previously jpackage app launcher only replaced `$APPDIR`, `$BINDIR`, and > `$ROOTDIR` tokens with the corresponding path values. With this patch, any > environment variable can be expanded. The syntax is shell-like > `

Re: RFR: 8319447: Improve performance of delayed task handling [v6]

2025-03-06 Thread Alan Bateman
On Wed, 5 Mar 2025 23:55:52 GMT, Sunmisc Unsafe wrote: >> src/java.base/share/classes/java/util/concurrent/ForkJoinPool.java line 3741: >> >>> 3739: public ForkJoinTask submitWithTimeout(Callable callable, >>> 3740: long timeout, >>> TimeUni

Re: RFR: 8341641: Make %APPDATA% and %LOCALAPPDATA% env variables available in *.cfg files

2025-03-06 Thread Andrey Turbanov
On Wed, 5 Mar 2025 21:13:44 GMT, Alexey Semenyuk wrote: > jpackage app laucnher will expand environment variables in .cfg files. > > Previously jpackage app launcher only replaced `$APPDIR`, `$BINDIR`, and > `$ROOTDIR` tokens with the corresponding path values. With this patch, any > environme

Re: RFR: 8341641: Make %APPDATA% and %LOCALAPPDATA% env variables available in *.cfg files [v2]

2025-03-06 Thread Alexey Semenyuk
> jpackage app laucnher will expand environment variables in .cfg files. > > Previously jpackage app launcher only replaced `$APPDIR`, `$BINDIR`, and > `$ROOTDIR` tokens with the corresponding path values. With this patch, any > environment variable can be expanded. The syntax is shell-like > `

Re: RFR: 8351322: Parameterize link option for pthreads

2025-03-06 Thread snake66
On Thu, 6 Mar 2025 12:46:25 GMT, David Holmes wrote: > Abstracting this out seems reasonable to me, though I should say I thought we > already used `-pthread` rather than `-lpthread`. I noticed there were a few places that used `-pthread` by default. I left these alone in this PR. ---

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

2025-03-06 Thread Emanuel Peter
On Thu, 27 Feb 2025 16:38:30 GMT, Galder Zamarreño wrote: >> Galder Zamarreño 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 44 additional >> c

Re: RFR: 8348986: Improve coverage of enhanced exception messages [v2]

2025-03-06 Thread Michael McMahon
> Hi, > > Enhanced exception messages are designed to hide sensitive information such > as hostnames, IP > addresses from exception message strings, unless the enhanced mode for the > specific category > has been explicitly enabled. Enhanced exceptions were first introduced in > 8204233 in JD

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

2025-03-06 Thread Galder Zamarreño
> 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 following error: > > > VLoop::check_preconditions: failed:

Re: RFR: 8351322: Parameterize link option for pthreads

2025-03-06 Thread Antonio Vieiro
On Thu, 6 Mar 2025 10:39:27 GMT, snake66 wrote: > Replace hardcoded instances of `-lpthread` with `$(LIBPTHREAD)`, so that it's > possible to parameterize this for platforms that use different flags for > enabling posix threads. > > This work is a continuation of the work done by Greg Lewis in

Re: RFR: 8348986: Improve coverage of enhanced exception messages [v2]

2025-03-06 Thread Andrey Turbanov
On Thu, 6 Mar 2025 10:46:11 GMT, Michael McMahon wrote: >> Hi, >> >> Enhanced exception messages are designed to hide sensitive information such >> as hostnames, IP >> addresses from exception message strings, unless the enhanced mode for the >> specific category >> has been explicitly enabl

Re: RFR: 8348986: Improve coverage of enhanced exception messages [v3]

2025-03-06 Thread Michael McMahon
> Hi, > > Enhanced exception messages are designed to hide sensitive information such > as hostnames, IP > addresses from exception message strings, unless the enhanced mode for the > specific category > has been explicitly enabled. Enhanced exceptions were first introduced in > 8204233 in JD

Re: RFR: 8342382: Implementation of JEP G1: Improve Application Throughput with a More Efficient Write-Barrier [v11]

2025-03-06 Thread Thomas Schatzl
On Tue, 4 Mar 2025 15:33:29 GMT, Albert Mingkun Yang wrote: >> Thomas Schatzl has updated the pull request incrementally with one >> additional commit since the last revision: >> >> iwalulya review >> * comments for variables tracking to-collection-set and just dirtied >> cards after GC/

Re: RFR: 8351322: Parameterize link option for pthreads

2025-03-06 Thread Magnus Ihse Bursie
On Thu, 6 Mar 2025 14:21:08 GMT, Erik Joelsson wrote: > What is the intended way of using this? Do you run make with > LIBPTHREAD=-pthread or do you apply a patch on libraries.m4 for the specific > way of linking to pthread? This is in preparation of the upcoming BSD port, which uses `-pthread

Re: RFR: 8351322: Parameterize link option for pthreads

2025-03-06 Thread Magnus Ihse Bursie
On Thu, 6 Mar 2025 10:39:27 GMT, snake66 wrote: > Replace hardcoded instances of `-lpthread` with `$(LIBPTHREAD)`, so that it's > possible to parameterize this for platforms that use different flags for > enabling posix threads. > > This work is a continuation of the work done by Greg Lewis in

Re: RFR: 8351344: Avoid explicit Objects.requireNonNull in String.join

2025-03-06 Thread Andrey Turbanov
On Thu, 20 Feb 2025 09:30:02 GMT, Andrey Turbanov wrote: > We have helpful NPE messages now - they are more user-friendly. > And shorter methods are more likely to be inlined. While having prerequirements checks often is good, I think not having it in String.join can be a good thing. 1. String.

Re: RFR: 8351344: Avoid explicit Objects.requireNonNull in String.join

2025-03-06 Thread Roger Riggs
On Thu, 20 Feb 2025 09:30:02 GMT, Andrey Turbanov wrote: > We have helpful NPE messages now - they are more user-friendly. > And shorter methods are more likely to be inlined. To confirm your intuition, please show the before/after performance differences if any. - PR Comment: htt

Re: RFR: 8351344: Avoid explicit Objects.requireNonNull in String.join

2025-03-06 Thread Joe Darcy
On Thu, 6 Mar 2025 20:01:47 GMT, Andrey Turbanov wrote: >> src/java.base/share/classes/java/lang/String.java line 3649: >> >>> 3647: Iterable elements) { >>> 3648: Objects.requireNonNull(delimiter); >>> 3649: Objects.requireNonNull(elements); >> >> Hello Andrey, I ha

Re: RFR: 8341641: Make %APPDATA% and %LOCALAPPDATA% env variables available in *.cfg files [v3]

2025-03-06 Thread Alexander Matveev
On Thu, 6 Mar 2025 12:26:50 GMT, Alexey Semenyuk wrote: >> src/jdk.jpackage/share/classes/jdk/jpackage/internal/util/TokenReplace.java >> line 112: >> >>> 110: regexps = new ArrayList<>(); >>> 111: >>> 112: for(;;) { >> >> Suggestion: >> >> for (;;) { > >> If you do e

Re: RFR: 8341641: Make %APPDATA% and %LOCALAPPDATA% env variables available in *.cfg files [v3]

2025-03-06 Thread Alexey Semenyuk
On Thu, 6 Mar 2025 21:51:37 GMT, Alexander Matveev wrote: >>> If you do echo on macOS in terminal for unset variable it will be expanded >>> to empty string, so for "Unset variables are not expanded." should we have >>> Welcome ! instead of Welcome $USER!? >> >> This is true for any shell. It

Re: RFR: 8351322: Parameterize link option for pthreads

2025-03-06 Thread Magnus Ihse Bursie
On Thu, 6 Mar 2025 13:53:31 GMT, Antonio Vieiro wrote: >> Replace hardcoded instances of `-lpthread` with `$(LIBPTHREAD)`, so that >> it's possible to parameterize this for platforms that use different flags >> for enabling posix threads. >> >> This work is a continuation of the work done by G

Re: RFR: 8350909: [JMH] test ThreadOnSpinWaitShared failed for 2 threads config

2025-03-06 Thread Jatin Bhateja
On Fri, 28 Feb 2025 01:20:44 GMT, Vladimir Ivanov wrote: > The scope was updated to support multithread configuration (jmh option '-t > 2') . No other changes needed. LGTM. - Marked as reviewed by jbhateja (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/23834#pullrequestr

Re: RFR: 8346118: Improve whitespace normalization in preformatted text [v4]

2025-03-06 Thread Hannes Wallnöfer
> Please review an enhancement to make `DocCommentParser` normalize whitespace > inside `` elements. The normalization is conceptually simple and and > intended to be minimally invasive. Before parsing, `DocCommentParser` checks > whether the text is a traditional doc comment and whether every l

Re: RFR: 8346118: Improve whitespace normalization in preformatted text [v3]

2025-03-06 Thread Hannes Wallnöfer
> Please review an enhancement to make `DocCommentParser` normalize whitespace > inside `` elements. The normalization is conceptually simple and and > intended to be minimally invasive. Before parsing, `DocCommentParser` checks > whether the text is a traditional doc comment and whether every l

Re: RFR: 8351344: Avoid explicit Objects.requireNonNull in String.join

2025-03-06 Thread Raffaello Giulietti
On Thu, 20 Feb 2025 09:30:02 GMT, Andrey Turbanov wrote: > We have helpful NPE messages now - they are more user-friendly. > And shorter methods are more likely to be inlined. I second @jaikiran in that the `Objects.requireNonNull()` are there to clearly validate the arguments right at method e

Re: RFR: 8341641: Make %APPDATA% and %LOCALAPPDATA% env variables available in *.cfg files [v3]

2025-03-06 Thread Alexey Semenyuk
On Thu, 6 Mar 2025 15:25:13 GMT, Alexey Semenyuk wrote: >> jpackage app laucnher will expand environment variables in .cfg files. >> >> Previously jpackage app launcher only replaced `$APPDIR`, `$BINDIR`, and >> `$ROOTDIR` tokens with the corresponding path values. With this patch, any >> envi

Re: RFR: 8350909: [JMH] test ThreadOnSpinWaitShared failed for 2 threads config

2025-03-06 Thread duke
On Fri, 28 Feb 2025 01:20:44 GMT, Vladimir Ivanov wrote: > The scope was updated to support multithread configuration (jmh option '-t > 2') . No other changes needed. @IvaVladimir Your change (at version 2b70cd408597bbfd0a2f490714a7ebab8eceb1f6) is now ready to be sponsored by a Committer. -

Re: RFR: 8342382: Implementation of JEP G1: Improve Application Throughput with a More Efficient Write-Barrier [v13]

2025-03-06 Thread Thomas Schatzl
On Wed, 5 Mar 2025 10:41:02 GMT, Ivan Walulya wrote: >> Thomas Schatzl has updated the pull request incrementally with one >> additional commit since the last revision: >> >> * fix whitespace >> * additional whitespace between log tags >> * rename G1ConcurrentRefineWorkTask -> ...SweepTas

Re: RFR: 8351322: Parameterize link option for pthreads

2025-03-06 Thread Magnus Ihse Bursie
On Thu, 6 Mar 2025 17:28:10 GMT, snake66 wrote: >> make/autoconf/libraries.m4 line 142: >> >>> 140: # Threading library >>> 141: if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" >>> = xaix; then >>> 142: BASIC_JVM_LIBS="$BASIC_JVM_LIBS $(LIBPTHREAD)" >> >> If you sp

Re: RFR: 8351322: Parameterize link option for pthreads

2025-03-06 Thread snake66
On Thu, 6 Mar 2025 14:15:38 GMT, Erik Joelsson wrote: >> Replace hardcoded instances of `-lpthread` with `$(LIBPTHREAD)`, so that >> it's possible to parameterize this for platforms that use different flags >> for enabling posix threads. >> >> This work is a continuation of the work done by Gr

Re: RFR: 8350460: org.openjdk.bench.vm.floatingpoint.DremFrem JMH fails with -ea [v2]

2025-03-06 Thread Eric Caspole
> The normal SQE process runs all the repo JMH with -ea to get the last bit of > extra testing. This DremFrem JMH contained some asserts that would always > fire on the correct answer, disturbing this normal SQE process. I removed a > lot more asserts from this JMH which seemed to make it more

Re: RFR: 8350460: org.openjdk.bench.vm.floatingpoint.DremFrem JMH fails with -ea

2025-03-06 Thread Eric Caspole
On Wed, 5 Mar 2025 16:40:55 GMT, Chen Liang wrote: >> The normal SQE process runs all the repo JMH with -ea to get the last bit of >> extra testing. This DremFrem JMH contained some asserts that would always >> fire on the correct answer, disturbing this normal SQE process. I removed a >> lot

Withdrawn: 8345687: Improve the implementation of SegmentFactories::allocateSegment

2025-03-06 Thread duke
On Fri, 6 Dec 2024 16:30:47 GMT, Quan Anh Mai wrote: > Hi, > > This patch improves the performance of a typical `Arena::allocate` in several > ways: > > - Delay the creation of the NativeMemorySegmentImpl. This avoids the merge of > the instance with the one obtained from the call in the unco