Integrated: 8306946: jdk/test/lib/process/ProcessToolsStartProcessTest.java fails with "wrong number of lines in OutputAnalyzer output"

2023-05-03 Thread Leonid Mesnik
On Thu, 27 Apr 2023 01:06:23 GMT, Leonid Mesnik wrote: > The ProcessTools.startProcess (...) has been updated to completely read > streams after process has been completed. > The test was updated to run 5 times with different number of lines and line > sizes. This pull request has now been

Re: RFR: 8306946: jdk/test/lib/process/ProcessToolsStartProcessTest.java fails with "wrong number of lines in OutputAnalyzer output" [v4]

2023-05-03 Thread Leonid Mesnik
> The ProcessTools.startProcess (...) has been updated to completely read > streams after process has been completed. > The test was updated to run 5 times with different number of lines and line > sizes. Leonid Mesnik has updated the pull request incrementally with one additional commit since

Re: RFR: 8306946: jdk/test/lib/process/ProcessToolsStartProcessTest.java fails with "wrong number of lines in OutputAnalyzer output" [v3]

2023-05-03 Thread David Holmes
On Thu, 27 Apr 2023 16:35:59 GMT, Leonid Mesnik wrote: >> The ProcessTools.startProcess (...) has been updated to completely read >> streams after process has been completed. >> The test was updated to run 5 times with different number of lines and line >> sizes. > > Leonid Mesnik has updated

Re: RFR: 8307194: Enhance static-libs-image [v5]

2023-05-03 Thread Jiangli Zhou
On Wed, 3 May 2023 18:51:54 GMT, Severin Gehwolf wrote: >>> Could we decouple `hotspot-static-libs` from `static-libs-image` somehow, >>> please? `static-libs-image` is used by the `graal-builder-image` target and >>> it would be good if it didn't include hotspot static libs as they are not

Re: Time difference calculation bug

2023-05-03 Thread Stephen Colebourne
This looks like a bug from the description below, although it is surprising that it isn't caught by tests. Stephen On Wed, 3 May 2023, 21:47 SHARPE, Stuart (Commercial & Institutional CDIO), wrote: > Hi Roger, > > Thanks for the reply. > > I must admit I am struggling to understand your

RE: Time difference calculation bug

2023-05-03 Thread SHARPE, Stuart (Commercial & Institutional CDIO)
Hi Roger, Thanks for the reply. I must admit I am struggling to understand your explanation. I can't see how the choice of internal representation would affect the result in this way. I also don't see anything in the JavaDoc that describes values being truncated prior to the calculation, and

Re: RFR: 8159337: Introduce a method in Locale class to return the language tags as per RFC 5646 convention [v4]

2023-05-03 Thread Justin Lu
On Wed, 3 May 2023 19:13:58 GMT, Roger Riggs wrote: >> Justin Lu has updated the pull request incrementally with four additional >> commits since the last revision: >> >> - Review comment: Replace wellFormed with parseSts to pass errorMsg to >> exception >> - Review comment: Adjust method

Re: RFR: 8159337: Introduce a method in Locale class to return the language tags as per RFC 5646 convention [v6]

2023-05-03 Thread Justin Lu
> Please review this PR which adds the method `caseFoldLanguageTag(String > languageTag)` to java.util.Locale. > > This method case folds a language tag to adhere to _[section 2.1.1. > Formatting of Language Tags of > RFC5646](https://www.rfc-editor.org/rfc/rfc5646.html#section-2.1)_. This >

Re: RFR: 8159337: Introduce a method in Locale class to return the language tags as per RFC 5646 convention [v5]

2023-05-03 Thread Justin Lu
On Wed, 3 May 2023 19:37:25 GMT, Justin Lu wrote: >> Please review this PR which adds the method `caseFoldLanguageTag(String >> languageTag)` to java.util.Locale. >> >> This method case folds a language tag to adhere to _[section 2.1.1. >> Formatting of Language Tags of >>

Re: RFR: 8307194: Enhance static-libs-image [v2]

2023-05-03 Thread Jiangli Zhou
On Wed, 3 May 2023 18:31:56 GMT, Erik Joelsson wrote: >> Jiangli Zhou has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Update based on @erikj79 review comments and suggestions: >> - Change to copy libjvm.a for $(JVM_VARIANT_MAIN) only

Re: RFR: 8307194: Enhance static-libs-image [v5]

2023-05-03 Thread Jiangli Zhou
> This PR is branched from the makefile changes for > https://bugs.openjdk.org/browse/JDK-8303796 and contains the following for > handling the JDK/VM static libraries: > > - Create libjvm.a together with other JDK static libraries when building > 'static-libs-image' (or 'static-libs-bundles')

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

2023-05-03 Thread Chen Liang
On Tue, 2 May 2023 21:22:16 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.

RFR: 8304913: Use OperatingSystem, Architecture, and Version in jlink

2023-05-03 Thread Roger Riggs
Refactor the Platform class of jlink to use jdk.internal.util OperatingSystem and Architecture instead of os.name and os.arch. They are direct replacements for the Platform enums except for UNKNOWN; its use is refactored to report errors via exceptions. Neither os.name nor os.arch should be

Re: Time difference calculation bug

2023-05-03 Thread Roger Riggs
Hi, The seconds and nano-seconds are computed separately. The representation of Instant holds seconds and nanoseconds separately. The computation is performed on the nano-seconds of the Instant and truncated to milliseconds. The value of 0.000999 becomes 0 when truncated to MILLIS. Regards,

Re: RFR: 8159337: Introduce a method in Locale class to return the language tags as per RFC 5646 convention [v5]

2023-05-03 Thread Justin Lu
> Please review this PR which adds the method `caseFoldLanguageTag(String > languageTag)` to java.util.Locale. > > This method case folds a language tag to adhere to _[section 2.1.1. > Formatting of Language Tags of > RFC5646](https://www.rfc-editor.org/rfc/rfc5646.html#section-2.1)_. This >

Re: RFR: 8159337: Introduce a method in Locale class to return the language tags as per RFC 5646 convention [v4]

2023-05-03 Thread Roger Riggs
On Tue, 2 May 2023 21:42:09 GMT, Justin Lu wrote: >> Please review this PR which adds the method `caseFoldLanguageTag(String >> languageTag)` to java.util.Locale. >> >> This method case folds a language tag to adhere to _[section 2.1.1. >> Formatting of Language Tags of >>

Re: RFR: 8307194: Enhance static-libs-image [v4]

2023-05-03 Thread Jiangli Zhou
> This PR is branched from the makefile changes for > https://bugs.openjdk.org/browse/JDK-8303796 and contains the following for > handling the JDK/VM static libraries: > > - Create libjvm.a together with other JDK static libraries when building > 'static-libs-image' (or 'static-libs-bundles')

Re: RFR: 8307194: Enhance static-libs-image [v3]

2023-05-03 Thread Jiangli Zhou
> This PR is branched from the makefile changes for > https://bugs.openjdk.org/browse/JDK-8303796 and contains the following for > handling the JDK/VM static libraries: > > - Create libjvm.a together with other JDK static libraries when building > 'static-libs-image' (or 'static-libs-bundles')

Re: RFR: 8307194: Enhance static-libs-image [v2]

2023-05-03 Thread Severin Gehwolf
On Wed, 3 May 2023 18:40:52 GMT, Jiangli Zhou wrote: >> I'm hoping to get input from the graal team on the impact of this change. >> The exact usage of the new libjvm.a file is still under discussion so I >> share you concern about changing things for the current static libs usecase >> before

Re: RFR: 8307194: Enhance static-libs-image [v2]

2023-05-03 Thread Jiangli Zhou
On Wed, 3 May 2023 18:33:56 GMT, Erik Joelsson wrote: >> make/Main.gmk line 1060: >> >>> 1058: symbols-image: $(LIBS_TARGETS) $(LAUNCHER_TARGETS) >>> 1059: >>> 1060: static-libs-image: hotspot-static-libs $(STATIC_LIBS_TARGETS) >> >> Could we decouple `hotspot-static-libs` from

Re: RFR: 8307194: Enhance static-libs-image [v2]

2023-05-03 Thread Erik Joelsson
On Wed, 3 May 2023 17:05:29 GMT, Severin Gehwolf wrote: >> Jiangli Zhou has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Update based on @erikj79 review comments and suggestions: >> - Change to copy libjvm.a for $(JVM_VARIANT_MAIN)

Re: RFR: 8307194: Enhance static-libs-image [v2]

2023-05-03 Thread Erik Joelsson
On Wed, 3 May 2023 17:58:25 GMT, Jiangli Zhou wrote: >> This PR is branched from the makefile changes for >> https://bugs.openjdk.org/browse/JDK-8303796 and contains the following for >> handling the JDK/VM static libraries: >> >> - Create libjvm.a together with other JDK static libraries

Re: RFR: 8307194: Enhance static-libs-image

2023-05-03 Thread Jiangli Zhou
On Wed, 3 May 2023 16:57:04 GMT, Severin Gehwolf wrote: > @jianglizhou How does the produced image look like after this patch? I.e. > what's the contents of `build/*/images/static-libs`? With the changes in this patch, `build/*/images/static-libs` will contain the `libjvm.a` in addition to

Re: RFR: 8307194: Enhance static-libs-image [v2]

2023-05-03 Thread Jiangli Zhou
On Wed, 3 May 2023 13:42:03 GMT, Erik Joelsson wrote: >> Jiangli Zhou has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Update based on @erikj79 review comments and suggestions: >> - Change to copy libjvm.a for $(JVM_VARIANT_MAIN) only

Re: RFR: 8307194: Enhance static-libs-image [v2]

2023-05-03 Thread Jiangli Zhou
> This PR is branched from the makefile changes for > https://bugs.openjdk.org/browse/JDK-8303796 and contains the following for > handling the JDK/VM static libraries: > > - Create libjvm.a together with other JDK static libraries when building > 'static-libs-image' (or 'static-libs-bundles')

Re: RFR: 8307181: MemoryLayout.structLayout uses undocumented strict alignment constraints [v2]

2023-05-03 Thread Maurizio Cimadamore
> This patch adds documentation for the behavior of the > `MemoryLayout::structLayout` factory. > > This factory throws an `IllegalArgumentException` if one of the member > layouts passed to it occurs at an offset within the struct that is not > aligned. > > As part of this patch, I've also

RFR: 8307375: Alignment check on layouts used as sequence element is not correct

2023-05-03 Thread Maurizio Cimadamore
This patch fixes `Utils::checkElementAlignment` to do the right thing for _all_ layouts. The current implementation is broken, as it only works correctly when the input layout is a value layout. Since value layouts have a size that is a power of two (and size all layouts have alignment that is

Re: RFR: 8159337: Introduce a method in Locale class to return the language tags as per RFC 5646 convention [v3]

2023-05-03 Thread Naoto Sato
On Tue, 2 May 2023 21:36:57 GMT, Justin Lu wrote: >> test/jdk/java/util/Locale/CaseFoldLanguageTagTest.java line 56: >> >>> 54: @MethodSource("wellFormedTags") >>> 55: public void TestWellFormedTags(String tag, String foldedTag) { >>> 56: assertEquals(foldedTag,

Re: RFR: 8159337: Introduce a method in Locale class to return the language tags as per RFC 5646 convention [v4]

2023-05-03 Thread Naoto Sato
On Tue, 2 May 2023 21:42:09 GMT, Justin Lu wrote: >> Please review this PR which adds the method `caseFoldLanguageTag(String >> languageTag)` to java.util.Locale. >> >> This method case folds a language tag to adhere to _[section 2.1.1. >> Formatting of Language Tags of >>

Re: RFR: 8307194: Enhance static-libs-image

2023-05-03 Thread Severin Gehwolf
On Wed, 3 May 2023 02:09:22 GMT, Jiangli Zhou wrote: > This PR is branched from the makefile changes for > https://bugs.openjdk.org/browse/JDK-8303796 and contains the following for > handling the JDK/VM static libraries: > > - Create libjvm.a together with other JDK static libraries when

Re: RFR: 8307194: Enhance static-libs-image

2023-05-03 Thread Severin Gehwolf
On Wed, 3 May 2023 02:09:22 GMT, Jiangli Zhou wrote: > This PR is branched from the makefile changes for > https://bugs.openjdk.org/browse/JDK-8303796 and contains the following for > handling the JDK/VM static libraries: > > - Create libjvm.a together with other JDK static libraries when

Time difference calculation bug

2023-05-03 Thread SHARPE, Stuart (Commercial & Institutional CDIO)
Hello, I believe I have discovered a bug in java.time. I've searched Jira and couldn't find any existing similar issue. Consider the following code: var t1 = Instant.parse("2023-05-03T10:00:00.000999Z"); var t2 = Instant.parse("2023-05-03T10:00:01.000Z"); var t3 =

Re: RFR: 8307181: MemoryLayout.structLayout uses undocumented strict alignment constraints

2023-05-03 Thread Maurizio Cimadamore
On Wed, 3 May 2023 14:54:26 GMT, Maurizio Cimadamore wrote: > Actually, now that I look at it, it seems that the exception we raise is not > correct. I think we need to throw if the element size is not a multiple of > the alignment. That is, the size determines the stride, so that has to be a

Re: RFR: 8307181: MemoryLayout.structLayout uses undocumented strict alignment constraints

2023-05-03 Thread Maurizio Cimadamore
On Wed, 3 May 2023 14:26:03 GMT, Jorn Vernee wrote: > > Actually, now that I look at it, it seems that the exception we raise is > > not correct. I think we need to throw if the element size is not a multiple > > of the alignment. That is, the size determines the stride, so that has to > > be

Re: RFR: 8307181: MemoryLayout.structLayout uses undocumented strict alignment constraints

2023-05-03 Thread Jorn Vernee
On Wed, 3 May 2023 14:20:22 GMT, Maurizio Cimadamore wrote: > Actually, now that I look at it, it seems that the exception we raise is not > correct. I think we need to throw if the element size is not a multiple of > the alignment. That is, the size determines the stride, so that has to be a

Re: RFR: 8307181: MemoryLayout.structLayout uses undocumented strict alignment constraints

2023-05-03 Thread Maurizio Cimadamore
On Wed, 3 May 2023 14:17:02 GMT, Maurizio Cimadamore wrote: > > Isn't this true also for sequence layouts where, for example, the second > > element might be misaligned for `sequenceLayout(2, structLayout(JAVA_INT, > > JAVA_SHORT))`? Or, is this already covered? > > That case already has

Re: RFR: 8307181: MemoryLayout.structLayout uses undocumented strict alignment constraints

2023-05-03 Thread Jorn Vernee
On Wed, 3 May 2023 08:31:34 GMT, Maurizio Cimadamore wrote: > This patch adds documentation for the behavior of the > `MemoryLayout::structLayout` factory. > > This factory throws an `IllegalArgumentException` if one of the member > layouts passed to it occurs at an offset within the struct

Re: RFR: 8307181: MemoryLayout.structLayout uses undocumented strict alignment constraints

2023-05-03 Thread Maurizio Cimadamore
On Wed, 3 May 2023 13:48:11 GMT, Per Minborg wrote: > Isn't this true also for sequence layouts where, for example, the second > element might be misaligned for `sequenceLayout(2, structLayout(JAVA_INT, > JAVA_SHORT))`? Or, is this already covered? That case already has some javadoc text:

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

2023-05-03 Thread Mahendra Chhipa
On Tue, 2 May 2023 16:27:25 GMT, Lance Andersen wrote: >> This is added in setup method to create the serialized data with current JDK >> version (JDK under test). In addition to serialized data generated with old >> JDK version. > > Sorry, I still disagree with this. Your comment in the test

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

2023-05-03 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: Move the pseudo code generation part from setup() to seperate methods. - Changes: - all:

Re: RFR: 8307194: Enhance static-libs-image

2023-05-03 Thread Doug Simon
On Wed, 3 May 2023 13:34:12 GMT, Erik Joelsson wrote: > The current target user of the .a libraries is GraalVM, so we should check > with them that the changes to the contents of the `.a` files isn't impacting > them in a bad way. @dougxc what do you think? Thanks for the heads up - I've

Re: RFR: 8307181: MemoryLayout.structLayout uses undocumented strict alignment constraints

2023-05-03 Thread Per Minborg
On Wed, 3 May 2023 08:31:34 GMT, Maurizio Cimadamore wrote: > This patch adds documentation for the behavior of the > `MemoryLayout::structLayout` factory. > > This factory throws an `IllegalArgumentException` if one of the member > layouts passed to it occurs at an offset within the struct

Re: RFR: 8307194: Enhance static-libs-image

2023-05-03 Thread Erik Joelsson
On Wed, 3 May 2023 02:09:22 GMT, Jiangli Zhou wrote: > This PR is branched from the makefile changes for > https://bugs.openjdk.org/browse/JDK-8303796 and contains the following for > handling the JDK/VM static libraries: > > - Create libjvm.a together with other JDK static libraries when

Re: RFR: 8307194: Enhance static-libs-image

2023-05-03 Thread Erik Joelsson
On Wed, 3 May 2023 02:09:22 GMT, Jiangli Zhou wrote: > This PR is branched from the makefile changes for > https://bugs.openjdk.org/browse/JDK-8303796 and contains the following for > handling the JDK/VM static libraries: > > - Create libjvm.a together with other JDK static libraries when

Re: The introduction of Sequenced collections is not a source compatible change

2023-05-03 Thread forax
Another example sent to me by a fellow French guy, final Deque nestedDequeue = new ArrayDeque<>(); nestedDequeue.addFirst("C"); nestedDequeue.addFirst("B"); nestedDequeue.addFirst("A"); final List nestedList = new ArrayList<>(); nestedList.add("D");

RFR: 8303669: SelectVersion indexes past the end of the argv array

2023-05-03 Thread Adam Sotona
libjli/java.c's SelectVersion method receives argc and argv but ignores argc in some circumstances an instead checks if *argv == 0 in its while loop, which results in a segmentation fault if the provided array is not NULL terminated. This patch counts down argc in the while loops instead of

Re: RFR: 8307163: JLONG_FORMAT_SPECIFIER should be updated on Windows

2023-05-03 Thread Julian Waters
On Wed, 3 May 2023 07:27:23 GMT, David Holmes wrote: > > Is the globalDefinitions declaration what you're referring to? > > Yes. I'm not clear on the background to all these PRI* format modifiers - all > seems rather convoluted. Ah, I see. PRId64 (the 64 bit signed format specifier) used to

Integrated: 8305092: Improve Thread.sleep(millis, nanos) for sub-millisecond granularity

2023-05-03 Thread Aleksey Shipilev
On Wed, 29 Mar 2023 11:28:53 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 [v12]

2023-05-03 Thread Aleksey Shipilev
On Thu, 27 Apr 2023 09:40:46 GMT, Aleksey Shipilev wrote: >> Aleksey Shipilev has updated the pull request with a new target base due to >> a merge or a rebase. The pull request now contains 26 commits: >> >> - Merge branch 'master' into JDK-83050920-thread-sleep-subms >> - Merge branch

RFR: 8307181: MemoryLayout.structLayout uses undocumented strict alignment constraints

2023-05-03 Thread Maurizio Cimadamore
This patch adds documentation for the behavior of the `MemoryLayout::structLayout` factory. This factory throws an `IllegalArgumentException` if one of the member layouts passed to it occurs at an offset within the struct that is not aligned. As part of this patch, I've also added some api

Re: RFR: 8307163: JLONG_FORMAT_SPECIFIER should be updated on Windows [v2]

2023-05-03 Thread David Holmes
On Tue, 2 May 2023 12:23:23 GMT, Julian Waters wrote: >> Windows no longer uses I64d anywhere in their newer compilers, instead using >> the conforming lld specifiers. Minor cleanup here in JLI code to reflect that > > Julian Waters has updated the pull request incrementally with one additional

Re: RFR: 8307163: JLONG_FORMAT_SPECIFIER should be updated on Windows

2023-05-03 Thread David Holmes
On Tue, 2 May 2023 12:21:01 GMT, Julian Waters wrote: > Is the globalDefinitions declaration what you're referring to? Yes. I'm not clear on the background to all these PRI* format modifiers - all seems rather convoluted. - PR Comment:

Integrated: 8306729: Add nominal descriptors of modules and packages to Constants API

2023-05-03 Thread Adam Sotona
On Mon, 24 Apr 2023 11:59:03 GMT, Adam Sotona wrote: > Constants API already provides models for all loadable constants to help > programs manipulating class files and modelling bytecode instructions. > However no models of module and package constants are provided by Constants > API. Every

Re: RFR: 8304006: jlink should create the jimage file in the native endian for the target platform [v17]

2023-05-03 Thread Jaikiran Pai
On Wed, 29 Mar 2023 01:40:36 GMT, Jaikiran Pai wrote: >> Can I please get a review for this change which proposes to fix the issue >> reported in https://bugs.openjdk.org/browse/JDK-8206890? >> >> The `jlink` command allows a `--endian` option to specify the byte order in >> the generated