Re: RFR: 8316493: Make immutable maps @ValueBased [v2]

2023-09-19 Thread Per Minborg
> This PR outlines a solution for making immutable maps `@ValueBased` by > removing cacheing of certain values in `AbstractMap`. > > By removing these caching fields in `AbstractMap`, we can make the immutable > maps `@ValueBased` and at the same time, performance is likely improved > because t

Re: RFR: 8311085: Remove implementation detail writeTo from LocalVariable(Type) [v4]

2023-09-19 Thread Chen Liang
> `LocalVariable` and `LocalVariableType` includes `writeTo(BufWriter)`, which > should be implementation details. > > See > https://mail.openjdk.org/pipermail/classfile-api-dev/2023-June/000381.html > for context. > > This patch moves the implementation to `DirectCodeBuilder`'s original use

Re: RFR: 8316540: StoreReproducibilityTest fails on some locales

2023-09-19 Thread Jaikiran Pai
On Tue, 19 Sep 2023 22:49:36 GMT, Naoto Sato wrote: > Fixing a test case that fails in some time zones. Making sure the test is run > in `UTC` zone will fix the issue. Confirmed the fix by manually setting > machine's time zone to Europe/Dublin. Hello Naoto, the use of `UTC` looks good to me.

Re: RFR: 8315960: test/jdk/java/io/File/TempDirDoesNotExist.java leaves test files behind [v7]

2023-09-19 Thread Daniel Jeliński
On Tue, 19 Sep 2023 21:45:13 GMT, Brian Burkhalter wrote: >> Add a `finally` block to delete the created files. > > Brian Burkhalter has updated the pull request incrementally with one > additional commit since the last revision: > > 8315960: Fix indentation test/jdk/java/io/File/TempDirDoes

Re: RFR: 8316421: libjava should load shell32.dll eagerly [v2]

2023-09-19 Thread Julian Waters
On Mon, 18 Sep 2023 18:10:12 GMT, Daniel Jeliński wrote: >> Please review this patch that makes java.dll load shell32.dll earlier. >> Delay-loading requires some additional code (delayimp.lib), and offers no >> benefits since we always load shell32 during JVM startup. >> >> Other than removing

Re: RFR: 8310837: Use ByteArrayLittleEndian in java.util.zip

2023-09-19 Thread Chen Liang
On Mon, 26 Jun 2023 14:14:54 GMT, Lance Andersen wrote: > @LanceAndersen This one is going to require checking that startup isn't > impacted. Now that `ByteArrayLittleEndian` is used in Integer toString, don't think this patch will affect the startup class loading sequence. - PR

Re: RFR: 8287843: File::getCanonicalFile doesn't work for \?\C:\ style paths DOS device paths [v2]

2023-09-19 Thread Brian Burkhalter
On Mon, 11 Sep 2023 16:24:32 GMT, Brian Burkhalter wrote: > These also fail with "Bad pathname" with the master but give the erroneous > results `C:\\\foo` and `C:`, respectively, with the patch. This > needs to be fixed. The problem here might be that `File.getCanonicalPath` resolves the path

Re: RFR: 8316493: Make immutable maps @ValueBased

2023-09-19 Thread Chen Liang
On Tue, 19 Sep 2023 18:38:06 GMT, ExE Boss wrote: >> This PR outlines a solution for making immutable maps `@ValueBased` by >> removing cacheing of certain values in `AbstractMap`. >> >> By removing these caching fields in `AbstractMap`, we can make the immutable >> maps `@ValueBased` and at t

Re: RFR: 8316493: Make immutable maps @ValueBased

2023-09-19 Thread Chen Liang
On Thu, 7 Sep 2023 11:13:44 GMT, Per Minborg wrote: > This PR outlines a solution for making immutable maps `@ValueBased` by > removing cacheing of certain values in `AbstractMap`. > > By removing these caching fields in `AbstractMap`, we can make the immutable > maps `@ValueBased` and at the

Re: RFR: JDK-8316435: sun.util.calendar.CalendarSystem subclassing should be restricted [v4]

2023-09-19 Thread Naoto Sato
On Tue, 19 Sep 2023 21:10:18 GMT, Justin Lu wrote: >> src/java.base/share/classes/sun/util/calendar/CalendarUtils.java line 132: >> >>> 130: * Mimics sprintf(buf, "%0*d", decaimal, width). >>> 131: */ >>> 132: public static StringBuilder sprintf0d(StringBuilder sb, int value, >>>

RFR: 8316540: StoreReproducibilityTest fails on some locales

2023-09-19 Thread Naoto Sato
Fixing a test case that fails in some time zones. Making sure the test is run in `UTC` zone will fix the issue. Confirmed the fix by manually setting machine's time zone to Europe/Dublin. - Commit messages: - initial commit Changes: https://git.openjdk.org/jdk/pull/15829/files We

Re: RFR: 8316000: File.setExecutable silently fails if file does not exist [v3]

2023-09-19 Thread Brian Burkhalter
> On Windows, do not return `true` from the `java.io.File` methods > `setReadable(boolean, boolean)` and `setExecutable(boolean, boolean)` if the > file does not exist. Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision: 8316000: Ad

Re: RFR: 8316000: File.setExecutable silently fails if file does not exist [v2]

2023-09-19 Thread Brian Burkhalter
On Fri, 15 Sep 2023 14:35:43 GMT, Alan Bateman wrote: >> If this code does not interact with ACL-based security, then it's not clear >> to me that there's anything to be done here. > >> If this code does not interact with ACL-based security, then it's not clear >> to me that there's anything to

Re: RFR: 8316000: File.setExecutable silently fails if file does not exist [v2]

2023-09-19 Thread Brian Burkhalter
> On Windows, do not return `true` from the `java.io.File` methods > `setReadable(boolean, boolean)` and `setExecutable(boolean, boolean)` if the > file does not exist. Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision: 8316000: Re

Re: RFR: 8274122: java/io/File/createTempFile/SpecialTempFile.java fails in Windows 11 [v2]

2023-09-19 Thread Brian Burkhalter
> Windows 11 does not reserve as many names as prior versions of Windows so do > not expect exceptions for COM7 and LPT1. Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision: 8274122: Make value of exceptionExpected more robust to Win

Re: RFR: 8309130: x86_64 AVX512 intrinsics for Arrays.sort methods (int, long, float and double arrays) [v39]

2023-09-19 Thread iaroslavski
On Tue, 19 Sep 2023 01:57:44 GMT, Srinivas Vamsi Parasa wrote: >> The goal is to develop faster sort routines for x86_64 CPUs by taking >> advantage of AVX512 instructions. This enhancement provides an order of >> magnitude speedup for Arrays.sort() using int, long, float and double arrays. >>

Integrated: 8316547: Use JUnit.dir jtreg property with jpackage JUnit tests

2023-09-19 Thread Alexey Semenyuk
On Tue, 19 Sep 2023 20:15:20 GMT, Alexey Semenyuk wrote: > Strip > > /* > * @test > * @modules jdk.jpackage > * @compile --patch-module jdk.jpackage=${test.src} --add-reads > jdk.jpackage=ALL-UNNAMED --add-exports > jdk.jpackage/jdk.jpackage.internal=ALL-UNNAMED AppImageFileTest.java > * @

Re: RFR: 8315960: test/jdk/java/io/File/TempDirDoesNotExist.java leaves test files behind [v7]

2023-09-19 Thread Brian Burkhalter
> Add a `finally` block to delete the created files. Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision: 8315960: Fix indentation - Changes: - all: https://git.openjdk.org/jdk/pull/15757/files - new: https://git.open

Re: RFR: 8315960: test/jdk/java/io/File/TempDirDoesNotExist.java leaves test files behind [v6]

2023-09-19 Thread Brian Burkhalter
> Add a `finally` block to delete the created files. Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision: 8315960: Rename MethodSources; use Stream.toList; check value returned by file deletion - Changes: - all: https:

Re: RFR: 8315960: test/jdk/java/io/File/TempDirDoesNotExist.java leaves test files behind [v5]

2023-09-19 Thread Brian Burkhalter
On Tue, 19 Sep 2023 21:23:40 GMT, Brian Burkhalter wrote: >> That definitely sounds more reasonable. Unfortunate nomenclature on my part. > > I think maybe instead "tempDirSource' and "noTempDirSource." So changed in 50411b85aeefb2576a149ae126b7d55aad6e2be0. - PR Review Comment: ht

Re: RFR: 8315960: test/jdk/java/io/File/TempDirDoesNotExist.java leaves test files behind [v4]

2023-09-19 Thread Brian Burkhalter
On Tue, 19 Sep 2023 20:55:00 GMT, Naoto Sato wrote: >> Brian Burkhalter has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 8315960: Remove vestigial unused import > > test/jdk/java/io/File/TempDirDoesNotExist.java line 192: > >> 190:

Re: RFR: 8315960: test/jdk/java/io/File/TempDirDoesNotExist.java leaves test files behind [v5]

2023-09-19 Thread Brian Burkhalter
On Tue, 19 Sep 2023 21:17:02 GMT, Brian Burkhalter wrote: >> test/jdk/java/io/File/TempDirDoesNotExist.java line 118: >> >>> 116: } >>> 117: >>> 118: public static Stream nonexistentProvider() { >> >> The `nonexistentProvider` seems like an odd name. The only provider here is >> the j

Re: RFR: JDK-8316435: sun.util.calendar.CalendarSystem subclassing should be restricted [v4]

2023-09-19 Thread Justin Lu
> Please review this PR which restricts sub-classing of the internal calendar > system in sun.util.calendar to only the existing implementations. Drive by > cleanup included. > > As the implementation is long-standing and complete with no intent for future > sub-classing, the CalendarSystem sho

Re: RFR: 8315960: test/jdk/java/io/File/TempDirDoesNotExist.java leaves test files behind [v5]

2023-09-19 Thread Roger Riggs
On Tue, 19 Sep 2023 20:53:44 GMT, Brian Burkhalter wrote: >> Add a `finally` block to delete the created files. > > Brian Burkhalter has updated the pull request incrementally with one > additional commit since the last revision: > > 8315960: Improve test as suggested by Reviewer test/jdk/ja

Re: RFR: 8315960: test/jdk/java/io/File/TempDirDoesNotExist.java leaves test files behind [v5]

2023-09-19 Thread Brian Burkhalter
On Tue, 19 Sep 2023 21:15:36 GMT, Roger Riggs wrote: >> Brian Burkhalter has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 8315960: Improve test as suggested by Reviewer > > test/jdk/java/io/File/TempDirDoesNotExist.java line 118: > >> 11

RFR: 8316383: NullPointerException in AbstractSAXParser after JDK-8306632

2023-09-19 Thread Joe Wang
Fix a NPE. The DTD patch (JDK-8306632) moved initialization to factories, for example, for SAXParser, the SecurityManagers are created in the SAXParserFactory impl and passed on to instances of SAXParsers. The (deprecated) XMLReaderFactory however, instantiates SAXParsers directly, thus without

Re: RFR: JDK-8316435: sun.util.calendar.CalendarSystem subclassing should be restricted [v3]

2023-09-19 Thread Justin Lu
> Please review this PR which restricts sub-classing of the internal calendar > system in sun.util.calendar to only the existing implementations. Drive by > cleanup included. > > As the implementation is long-standing and complete with no intent for future > sub-classing, the CalendarSystem sho

Re: RFR: JDK-8316435: sun.util.calendar.CalendarSystem subclassing should be restricted [v3]

2023-09-19 Thread Justin Lu
On Tue, 19 Sep 2023 16:48:54 GMT, Naoto Sato wrote: >> Justin Lu has updated the pull request with a new target base due to a merge >> or a rebase. The pull request now contains 15 commits: >> >> - Re-import Locale after merge for Formatter >> - Merge master >> - Replace sprintf0d with Forma

Re: RFR: 8316547: Use JUnit.dir jtreg property with jpackage JUnit tests

2023-09-19 Thread Alexander Matveev
On Tue, 19 Sep 2023 20:15:20 GMT, Alexey Semenyuk wrote: > Strip > > /* > * @test > * @modules jdk.jpackage > * @compile --patch-module jdk.jpackage=${test.src} --add-reads > jdk.jpackage=ALL-UNNAMED --add-exports > jdk.jpackage/jdk.jpackage.internal=ALL-UNNAMED AppImageFileTest.java > * @

Re: RFR: 8315960: test/jdk/java/io/File/TempDirDoesNotExist.java leaves test files behind [v4]

2023-09-19 Thread Brian Burkhalter
On Tue, 19 Sep 2023 20:15:18 GMT, Roger Riggs wrote: >> Brian Burkhalter has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 8315960: Remove vestigial unused import > > test/jdk/java/io/File/TempDirDoesNotExist.java line 53: > >> 51: pr

Re: RFR: 8315960: test/jdk/java/io/File/TempDirDoesNotExist.java leaves test files behind [v4]

2023-09-19 Thread Naoto Sato
On Fri, 15 Sep 2023 21:51:22 GMT, Brian Burkhalter wrote: >> Add a `finally` block to delete the created files. > > Brian Burkhalter has updated the pull request incrementally with one > additional commit since the last revision: > > 8315960: Remove vestigial unused import test/jdk/java/io/F

Re: RFR: 8308995: Update Network IO JFR events to be static mirror events [v6]

2023-09-19 Thread Tim Prinzing
On Tue, 19 Sep 2023 15:35:11 GMT, Tim Prinzing wrote: >> The socket read/write JFR events currently use instrumentation of java.base >> code using templates in the jdk.jfr modules. This results in some java.base >> code residing in the jdk.jfr module which is undesirable. >> >> JDK19 added sta

Re: RFR: 8315960: test/jdk/java/io/File/TempDirDoesNotExist.java leaves test files behind [v5]

2023-09-19 Thread Brian Burkhalter
> Add a `finally` block to delete the created files. Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision: 8315960: Improve test as suggested by Reviewer - Changes: - all: https://git.openjdk.org/jdk/pull/15757/files -

Re: RFR: JDK-8316435: sun.util.calendar.CalendarSystem subclassing should be restricted [v2]

2023-09-19 Thread Justin Lu
> Please review this PR which restricts sub-classing of the internal calendar > system in sun.util.calendar to only the existing implementations. Drive by > cleanup included. > > As the implementation is long-standing and complete with no intent for future > sub-classing, the CalendarSystem sho

Re: RFR: 8296246: Update Unicode Data Files to Version 15.1.0 [v5]

2023-09-19 Thread Joe Wang
On Tue, 19 Sep 2023 18:55:28 GMT, Naoto Sato wrote: >> This PR is to incorporate the latest Unicode 15.1, which was released >> yesterday. Besides the usual character data update, an upgraded >> implementation of RegEx which reflects the Indic Conjunct Break specified in >> the latest [Unicode

Re: RFR: 8296246: Update Unicode Data Files to Version 15.1.0 [v5]

2023-09-19 Thread Joe Wang
On Tue, 19 Sep 2023 18:55:28 GMT, Naoto Sato wrote: >> This PR is to incorporate the latest Unicode 15.1, which was released >> yesterday. Besides the usual character data update, an upgraded >> implementation of RegEx which reflects the Indic Conjunct Break specified in >> the latest [Unicode

Re: RFR: 8315960: test/jdk/java/io/File/TempDirDoesNotExist.java leaves test files behind [v4]

2023-09-19 Thread Roger Riggs
On Fri, 15 Sep 2023 21:51:22 GMT, Brian Burkhalter wrote: >> Add a `finally` block to delete the created files. > > Brian Burkhalter has updated the pull request incrementally with one > additional commit since the last revision: > > 8315960: Remove vestigial unused import test/jdk/java/io/F

RFR: 8316547: Use JUnit.dir jtreg property with jpackage JUnit tests

2023-09-19 Thread Alexey Semenyuk
Strip /* * @test * @modules jdk.jpackage * @compile --patch-module jdk.jpackage=${test.src} --add-reads jdk.jpackage=ALL-UNNAMED --add-exports jdk.jpackage/jdk.jpackage.internal=ALL-UNNAMED AppImageFileTest.java * @run junit/othervm --patch-module jdk.jpackage=${test.classes} --add-reads jd

Re: RFR: 8316557: Make fields final in 'sun.util' package

2023-09-19 Thread Chen Liang
On Thu, 14 Sep 2023 08:58:56 GMT, Andrey Turbanov wrote: > A few classes in `sun.util` package have non-final fields which could easily > be marked `final`. src/java.base/share/classes/sun/util/PropertyResourceBundleCharset.java line 71: > 69: private final class PropertiesFileDecoder exte

RFR: 8316557: Make fields final in 'sun.util' package

2023-09-19 Thread Andrey Turbanov
A few classes in `sun.util` package have non-final fields which could easily be marked `final`. - Commit messages: - [PATCH] Make fields final in 'sun.util' package Changes: https://git.openjdk.org/jdk/pull/15736/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=15736&range=0

Re: RFR: 8310631: test/jdk/sun/nio/cs/TestCharsetMapping.java is spuriously passing [v2]

2023-09-19 Thread Naoto Sato
> Fixed the failing (well, false-positive) test case. Made the following > changes to the test: > > - Corrected the path to the mapping files directory > - Made sure to fail if the directory path is incorrect > - Took care of `GB18030` alias, which is dynamically derived at runtime > - Provided `

Re: RFR: 8310631: test/jdk/sun/nio/cs/TestCharsetMapping.java is spuriously passing [v2]

2023-09-19 Thread Naoto Sato
On Tue, 19 Sep 2023 18:15:54 GMT, Justin Lu wrote: >> Naoto Sato has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Included the failed directory location in the exception message > > test/jdk/sun/nio/cs/TestCharsetMapping.java line 574: >

Re: RFR: 8296246: Update Unicode Data Files to Version 15.1.0 [v3]

2023-09-19 Thread Steven Loomis
On Tue, 19 Sep 2023 18:53:30 GMT, Naoto Sato wrote: >> look at https://www.unicode.org/Public/UCD/latest/ for example, it points >> you only to license.txt. > > We are checking on it and will update it if necessary. it was unnecessary to mention copyright.html or terms of use in the source lic

Re: RFR: 8296246: Update Unicode Data Files to Version 15.1.0 [v3]

2023-09-19 Thread Naoto Sato
On Tue, 19 Sep 2023 17:00:39 GMT, Steven Loomis wrote: >> src/java.base/share/legal/unicode.md line 49: >> >>> 47: -- >>> 48: >>> 49: Unicode® Copyright and Terms of Use >> >> You shouldn't need to pull in all of this — the entire license file is at >> https://www.unicode.org/

Re: RFR: 8296246: Update Unicode Data Files to Version 15.1.0 [v3]

2023-09-19 Thread Naoto Sato
On Tue, 19 Sep 2023 17:54:52 GMT, Roger Riggs wrote: >> Naoto Sato 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 10 additional >> commits sinc

Re: RFR: 8296246: Update Unicode Data Files to Version 15.1.0 [v3]

2023-09-19 Thread Naoto Sato
On Tue, 19 Sep 2023 16:18:18 GMT, Joe Wang wrote: >> Naoto Sato 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 10 additional >> commits since t

Re: RFR: 8296246: Update Unicode Data Files to Version 15.1.0 [v5]

2023-09-19 Thread Steven Loomis
On Tue, 19 Sep 2023 18:55:28 GMT, Naoto Sato wrote: >> This PR is to incorporate the latest Unicode 15.1, which was released >> yesterday. Besides the usual character data update, an upgraded >> implementation of RegEx which reflects the Indic Conjunct Break specified in >> the latest [Unicode

Re: RFR: 8296246: Update Unicode Data Files to Version 15.1.0 [v5]

2023-09-19 Thread Naoto Sato
> This PR is to incorporate the latest Unicode 15.1, which was released > yesterday. Besides the usual character data update, an upgraded > implementation of RegEx which reflects the Indic Conjunct Break specified in > the latest [Unicode Annex #29 ("Unicode Text > Segmentation")](https://unico

Re: RFR: 8316493: Make immutable maps @ValueBased

2023-09-19 Thread ExE Boss
On Thu, 7 Sep 2023 11:13:44 GMT, Per Minborg wrote: > This PR outlines a solution for making immutable maps `@ValueBased` by > removing cacheing of certain values in `AbstractMap`. > > By removing these caching fields in `AbstractMap`, we can make the immutable > maps `@ValueBased` and at the

Re: RFR: 8296246: Update Unicode Data Files to Version 15.1.0 [v4]

2023-09-19 Thread Naoto Sato
> This PR is to incorporate the latest Unicode 15.1, which was released > yesterday. Besides the usual character data update, an upgraded > implementation of RegEx which reflects the Indic Conjunct Break specified in > the latest [Unicode Annex #29 ("Unicode Text > Segmentation")](https://unico

Re: RFR: 8313612: Use JUnit in lib-test/jdk tests [v4]

2023-09-19 Thread Qing Xiao
> Modified all tests under lib-test/jdk to use JUnit Qing Xiao has updated the pull request incrementally with three additional commits since the last revision: - Update test/lib-test/jdk/test/lib/hexdump/ObjectStreamPrinterTest.java Co-authored-by: liach <7806504+li...@users.noreply.git

Re: RFR: 8310631: test/jdk/sun/nio/cs/TestCharsetMapping.java is spuriously passing

2023-09-19 Thread Justin Lu
On Tue, 19 Sep 2023 01:01:14 GMT, Naoto Sato wrote: > Fixed the failing (well, false-positive) test case. Made the following > changes to the test: > > - Corrected the path to the mapping files directory > - Made sure to fail if the directory path is incorrect > - Took care of `GB18030` alias,

Re: RFR: 8296246: Update Unicode Data Files to Version 15.1.0 [v3]

2023-09-19 Thread Roger Riggs
On Mon, 18 Sep 2023 18:33:20 GMT, Naoto Sato wrote: >> This PR is to incorporate the latest Unicode 15.1, which was released >> yesterday. Besides the usual character data update, an upgraded >> implementation of RegEx which reflects the Indic Conjunct Break specified in >> the latest [Unicode

Re: RFR: 8311302: Allow for jlinking a custom runtime without packaged modules being present [v3]

2023-09-19 Thread Alan Bateman
On Thu, 10 Aug 2023 17:21:31 GMT, Severin Gehwolf wrote: >> Please review this patch which adds a "jmodless" jlink mode to the JDK. >> Fundamentally this patch adds an option to use `jlink` even though your JDK >> install might not come with the packaged modules (directory `jmods`). This >> is

RFR: 8316445: Mark com/sun/management/HotSpotDiagnosticMXBean/CheckOrigin.java as vm.flagless

2023-09-19 Thread Leonid Mesnik
Test com/sun/management/HotSpotDiagnosticMXBean/CheckOrigin.java check how beans work with VM flags and ignore external flags. It doesn't make sense to run it with external options so just mark it as flagless. Tested with running tier1 and test with/without additional options. - Comm

Re: RFR: JDK-8316435: sun.util.calendar.CalendarSystem subclassing should be restricted

2023-09-19 Thread Steven Loomis
On Mon, 18 Sep 2023 22:42:09 GMT, Justin Lu wrote: > Please review this PR which restricts sub-classing of the internal calendar > system in sun.util.calendar to only the existing implementations. > > As the implementation is long-standing and complete with no intent for future > sub-classing,

Re: RFR: 8296246: Update Unicode Data Files to Version 15.1.0 [v3]

2023-09-19 Thread Steven Loomis
On Tue, 19 Sep 2023 16:57:57 GMT, Steven Loomis wrote: >> Naoto Sato 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 10 additional >> commits si

Re: RFR: 8296246: Update Unicode Data Files to Version 15.1.0 [v3]

2023-09-19 Thread Steven Loomis
On Mon, 18 Sep 2023 18:33:20 GMT, Naoto Sato wrote: >> This PR is to incorporate the latest Unicode 15.1, which was released >> yesterday. Besides the usual character data update, an upgraded >> implementation of RegEx which reflects the Indic Conjunct Break specified in >> the latest [Unicode

Re: RFR: JDK-8316435: sun.util.calendar.CalendarSystem subclassing should be restricted

2023-09-19 Thread Naoto Sato
On Mon, 18 Sep 2023 22:42:09 GMT, Justin Lu wrote: > Please review this PR which restricts sub-classing of the internal calendar > system in sun.util.calendar to only the existing implementations. > > As the implementation is long-standing and complete with no intent for future > sub-classing,

Re: Should we build jrt-fs.jar again with the "Build JDK" ?

2023-09-19 Thread Alan Bateman
On 18/09/2023 14:51, Andrew Leonard wrote: Thanks for the clarification Alan. To ensure the reproducibility of the whole JDK image regardless of the specific bootjdk used, would it make sense once the "Build JDK" has been built, we re-build jrt-fs.jar again using the "Build JDK" ? Thus jrt-fs

Re: RFR: 8296246: Update Unicode Data Files to Version 15.1.0 [v3]

2023-09-19 Thread Joe Wang
On Mon, 18 Sep 2023 18:33:20 GMT, Naoto Sato wrote: >> This PR is to incorporate the latest Unicode 15.1, which was released >> yesterday. Besides the usual character data update, an upgraded >> implementation of RegEx which reflects the Indic Conjunct Break specified in >> the latest [Unicode

Re: RFR: 8315999: Improve Date toString performance [v13]

2023-09-19 Thread Roger Riggs
On Wed, 13 Sep 2023 14:22:35 GMT, 温绍锦 wrote: >> improve date toString performance, includes: >> >> java.util.Date.toString >> java.util.Date.toGMTString >> java.time.Instant.toString >> java.time.LocalDate.toString >> java.time.LocalDateTime.toString >> java.time.LocalTime.toString > > 温绍锦 has u

Re: RFR: 8316150: Refactor get chars and string size [v4]

2023-09-19 Thread Roger Riggs
On Wed, 13 Sep 2023 14:08:15 GMT, 温绍锦 wrote: >> 1. Reduce duplicate stringSize code >> 2. Move java.lang.StringLatin1.getChars to >> jdk.internal.util.DecimalDigits::getCharLatin1,not only java.lang, other >> packages also need to use this method > > 温绍锦 has updated the pull request incremental

Re: RFR: 8308995: Update Network IO JFR events to be static mirror events [v6]

2023-09-19 Thread Tim Prinzing
> The socket read/write JFR events currently use instrumentation of java.base > code using templates in the jdk.jfr modules. This results in some java.base > code residing in the jdk.jfr module which is undesirable. > > JDK19 added static support for event classes. The old instrumentor classes

Re: RFR: 8308995: Update Network IO JFR events to be static mirror events [v3]

2023-09-19 Thread Daniel Fuchs
On Thu, 7 Sep 2023 21:54:44 GMT, Tim Prinzing wrote: > No. I think it's a relic from the distant past though. I think the timeout > field should be removed. It's not used on SocketChannel at all, and it > doesn't seem useful on Socket. Should we log an RFE to that effect? - PR Re

Re: RFR: 8308995: Update Network IO JFR events to be static mirror events [v5]

2023-09-19 Thread Daniel Fuchs
On Thu, 7 Sep 2023 21:50:17 GMT, Tim Prinzing wrote: >> The socket read/write JFR events currently use instrumentation of java.base >> code using templates in the jdk.jfr modules. This results in some java.base >> code residing in the jdk.jfr module which is undesirable. >> >> JDK19 added stat

Re: RFR: 8316426: Optimization for HexFormat.formatHex [v7]

2023-09-19 Thread 温绍锦
> In the improvement of @cl4es PR #15591, the advantages of non-lookup-table > were discussed. > > But if the input is byte[], using lookup table can improve performance. > > For HexFormat#formatHex(Appendable, byte[]) and HexFormat#formatHex(byte[]), > If the length of byte[] is larger, the pe

Re: RFR: 8316426: Optimization for HexFormat.formatHex [v6]

2023-09-19 Thread Roger Riggs
On Tue, 19 Sep 2023 10:41:51 GMT, 温绍锦 wrote: >> In the improvement of @cl4es PR #15591, the advantages of non-lookup-table >> were discussed. >> >> But if the input is byte[], using lookup table can improve performance. >> >> For HexFormat#formatHex(Appendable, byte[]) and HexFormat#formatHex(

Re: RFR: 8316426: Optimization for HexFormat.formatHex [v6]

2023-09-19 Thread Roger Riggs
On Tue, 19 Sep 2023 01:35:49 GMT, 温绍锦 wrote: >> The original (and current) is coded to avoid a condition inside the loop. > > I also think that the way of writing for_0 combined with if > 0 is easier to > understand, The operation overhead of if > 0 is very small, and it will not > affect perfo

Re: RFR: 8315585: Optimization for decimal to string [v15]

2023-09-19 Thread 温绍锦
On Thu, 14 Sep 2023 11:19:08 GMT, 温绍锦 wrote: >> BigDecimal is a commonly used class in business development, It is often >> necessary to perform toString or toPlainString operations on BigDecimal. >> >> The current version uses StringBuilder resulting in multiple memory >> allocations, I made

Integrated: 8312498: Thread::getState and JVM TI GetThreadState should return TIMED_WAITING virtual thread is timed parked

2023-09-19 Thread Alan Bateman
On Fri, 21 Jul 2023 18:01:45 GMT, Alan Bateman wrote: > Thread::getState is an API for monitoring and management purposes to report > the thread state. If a virtual thread is parked with LockSupport.parkNanos, > its state is reported as WAITING when it should be TIMED_WAITING. JVM TI > GetThr

Re: RFR: 8312498: Thread::getState and JVM TI GetThreadState should return TIMED_WAITING virtual thread is timed parked [v4]

2023-09-19 Thread Ron Pressler
On Tue, 19 Sep 2023 10:35:33 GMT, Alan Bateman wrote: >> Thread::getState is an API for monitoring and management purposes to report >> the thread state. If a virtual thread is parked with LockSupport.parkNanos, >> its state is reported as WAITING when it should be TIMED_WAITING. JVM TI >> Ge

Re: RFR: 8316426: Optimization for HexFormat.formatHex [v4]

2023-09-19 Thread 温绍锦
On Tue, 19 Sep 2023 10:26:50 GMT, 温绍锦 wrote: >> If we changed DIGITS to be encoded with the uppercase digits then the >> expression could be simplified to >> ```return ucase ? v : (short) (v | 0b0010__0010_); // or 0x2020``` > > Some performance-focused scenarios, such as UUID.toString,

Re: RFR: 8316426: Optimization for HexFormat.formatHex [v6]

2023-09-19 Thread 温绍锦
> In the improvement of @cl4es PR #15591, the advantages of non-lookup-table > were discussed. > > But if the input is byte[], using lookup table can improve performance. > > For HexFormat#formatHex(Appendable, byte[]) and HexFormat#formatHex(byte[]), > If the length of byte[] is larger, the pe

Re: RFR: 8316426: Optimization for HexFormat.formatHex [v5]

2023-09-19 Thread 温绍锦
> In the improvement of @cl4es PR #15591, the advantages of non-lookup-table > were discussed. > > But if the input is byte[], using lookup table can improve performance. > > For HexFormat#formatHex(Appendable, byte[]) and HexFormat#formatHex(byte[]), > If the length of byte[] is larger, the pe

Re: RFR: 8308995: Update Network IO JFR events to be static mirror events [v4]

2023-09-19 Thread Alan Bateman
On Wed, 6 Sep 2023 15:55:21 GMT, Tim Prinzing wrote: >>> https://bugs.openjdk.org/browse/JDK-8310979 - better exception handling >>> https://bugs.openjdk.org/browse/JDK-8310978 - missing code paths for event >>> generation https://bugs.openjdk.org/browse/JDK-8310994 - non-blocking, >>> event f

Re: RFR: 8312498: Thread::getState and JVM TI GetThreadState should return TIMED_WAITING virtual thread is timed parked [v4]

2023-09-19 Thread Alan Bateman
> Thread::getState is an API for monitoring and management purposes to report > the thread state. If a virtual thread is parked with LockSupport.parkNanos, > its state is reported as WAITING when it should be TIMED_WAITING. JVM TI > GetThreadState has the same issue in that it returns > JVMTI_

Re: RFR: 8316426: Optimization for HexFormat.formatHex [v4]

2023-09-19 Thread 温绍锦
On Tue, 19 Sep 2023 09:34:56 GMT, Claes Redestad wrote: >> src/java.base/share/classes/jdk/internal/util/HexDigits.java line 103: >> >>> 101: short v = DIGITS[i & 0xff]; >>> 102: return ucase >>> 103: ? (short) (v - ((v & 0b0100__0100_) >> 1)) // >>> real

Re: RFR: 8313612: Use JUnit in lib-test/jdk tests [v3]

2023-09-19 Thread Christian Stein
On Thu, 7 Sep 2023 07:15:06 GMT, Qing Xiao wrote: >> Modified all tests under lib-test/jdk to use JUnit > > Qing Xiao has updated the pull request incrementally with one additional > commit since the last revision: > > Change test static method to instance method test/lib-test/jdk/test/lib/f

Re: RFR: 8313612: Use JUnit in lib-test/jdk tests [v3]

2023-09-19 Thread Chen Liang
On Thu, 7 Sep 2023 07:15:06 GMT, Qing Xiao wrote: >> Modified all tests under lib-test/jdk to use JUnit > > Qing Xiao has updated the pull request incrementally with one additional > commit since the last revision: > > Change test static method to instance method test/lib-test/jdk/test/lib/h

Re: RFR: 8313612: Use JUnit in lib-test/jdk tests [v3]

2023-09-19 Thread Christian Stein
On Tue, 15 Aug 2023 08:07:09 GMT, Christian Stein wrote: >> test/lib-test/jdk/test/lib/format/ArrayDiffTest.java line 2: >> >>> 1: /* >>> 2: * Copyright (c) 2020, 2021, 2023, Oracle and/or its affiliates. All >>> rights reserved. >> >> Should it just modify the second year, here is `2021`, to

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

2023-09-19 Thread Pavel Rappo
> Please review this PR to use modern APIs and language features to simplify > equals, hashCode, and compareTo for BigInteger. If you have any performance > concerns, please raise them. > > This PR is cherry-picked from a bigger, not-yet-published PR, to test the > waters. That latter PR will b

Re: RFR: 8316426: Optimization for HexFormat.formatHex [v4]

2023-09-19 Thread Claes Redestad
On Tue, 19 Sep 2023 09:25:36 GMT, Chen Liang wrote: >> 温绍锦 has updated the pull request incrementally with one additional commit >> since the last revision: >> >> "-" -> "& ~" > > src/java.base/share/classes/jdk/internal/util/HexDigits.java line 103: > >> 101: short v = DIGITS[i & 0x

Re: RFR: 8316426: Optimization for HexFormat.formatHex [v4]

2023-09-19 Thread Chen Liang
On Tue, 19 Sep 2023 09:03:35 GMT, 温绍锦 wrote: >> In the improvement of @cl4es PR #15591, the advantages of non-lookup-table >> were discussed. >> >> But if the input is byte[], using lookup table can improve performance. >> >> For HexFormat#formatHex(Appendable, byte[]) and HexFormat#formatHex(

Re: RFR: 8316426: Optimization for HexFormat.formatHex [v4]

2023-09-19 Thread 温绍锦
> In the improvement of @cl4es PR #15591, the advantages of non-lookup-table > were discussed. > > But if the input is byte[], using lookup table can improve performance. > > For HexFormat#formatHex(Appendable, byte[]) and HexFormat#formatHex(byte[]), > If the length of byte[] is larger, the pe

Re: RFR: 8316493: Make immutable maps @ValueBased

2023-09-19 Thread Chen Liang
On Thu, 7 Sep 2023 11:13:44 GMT, Per Minborg wrote: > This PR outlines a solution for making immutable maps `@ValueBased` by > removing cacheing of certain values in `AbstractMap`. > > By removing these caching fields in `AbstractMap`, we can make the immutable > maps `@ValueBased` and at the

Re: RFR: 8315850: Improve AbstractMap anonymous Iterator classes [v3]

2023-09-19 Thread Chen Liang
On Fri, 8 Sep 2023 16:13:16 GMT, Per Minborg wrote: >> This PR proposes to slightly improve some iterators of `AbstractMap`: >> >> * Declare two fields `final` >> * Use distinct classes rather than anonymous classes > > Per Minborg has updated the pull request incrementally with two additional

Re: RFR: 8316426: Optimization for HexFormat.formatHex [v3]

2023-09-19 Thread 温绍锦
> In the improvement of @cl4es PR #15591, the advantages of non-lookup-table > were discussed. > > But if the input is byte[], using lookup table can improve performance. > > For HexFormat#formatHex(Appendable, byte[]) and HexFormat#formatHex(byte[]), > If the length of byte[] is larger, the pe

Re: RFR: 8316493: Make immutable maps @ValueBased

2023-09-19 Thread Per Minborg
On Thu, 7 Sep 2023 11:13:44 GMT, Per Minborg wrote: > This PR outlines a solution for making immutable maps `@ValueBased` by > removing cacheing of certain values in `AbstractMap`. > > By removing these caching fields in `AbstractMap`, we can make the immutable > maps `@ValueBased` and at the

Re: RFR: 8316493: Make immutable maps @ValueBased

2023-09-19 Thread Claes Redestad
On Thu, 7 Sep 2023 11:13:44 GMT, Per Minborg wrote: > This PR outlines a solution for making immutable maps `@ValueBased` by > removing cacheing of certain values in `AbstractMap`. > > By removing these caching fields in `AbstractMap`, we can make the immutable > maps `@ValueBased` and at the

RFR: 8316493: Make immutable maps @ValueBased

2023-09-19 Thread Per Minborg
This PR outlines a solution for making immutable maps `@ValueBased` by removing cacheing of certain values in `AbstractMap`. By removing these caching fields in `AbstractMap`, we can make the immutable maps `@ValueBased` and at the same time, performance is likely improved because the JVM is pr

Re: RFR: 8316421: libjava should load shell32.dll eagerly [v2]

2023-09-19 Thread Daniel Jeliński
On Mon, 18 Sep 2023 18:10:12 GMT, Daniel Jeliński wrote: >> Please review this patch that makes java.dll load shell32.dll earlier. >> Delay-loading requires some additional code (delayimp.lib), and offers no >> benefits since we always load shell32 during JVM startup. >> >> Other than removing

Re: RFR: 8316433: net.dll should delay load winhttp.dll [v2]

2023-09-19 Thread Daniel Jeliński
> WinHTTP functions are only used when an application: > - uses DefaultProxySelector to resolve proxies, and > - is run with -Djava.net.useSystemProxies=true > > In all other cases, loading winhttp.dll is a waste of resources. > > Verified that: > - existing tier1 and tier2 tests still pass > - t

Re: RFR: 8316433: net.dll should delay load winhttp.dll [v2]

2023-09-19 Thread Daniel Jeliński
On Tue, 19 Sep 2023 06:41:11 GMT, Alan Bateman wrote: >> Daniel Jeliński has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Revert test changes > > test/jdk/java/net/ProxySelector/SystemProxies.java line 26: > >> 24: /* >> 25: * @test >>