Re: RFR: 8336831: Optimize StringConcatHelper.simpleConcat [v5]

2024-07-19 Thread Chen Liang
On Sat, 20 Jul 2024 06:28:12 GMT, Shaojin Wen wrote: > If code is generated through ClassFile, how to access the private methods of > classes such as String/StringConcatHelper? In that case, you have to encode those methods as live `MethodHandle` objects, passed to the generated class with `de

Integrated: 8336706: Optimize LocalDate.toString with StringBuilder.repeat

2024-07-19 Thread Shaojin Wen
On Thu, 18 Jul 2024 05:21:36 GMT, Shaojin Wen wrote: > class LocalDate { > public String toString() { > if (absYear < 1000) { > if (yearValue < 0) { > buf.append(yearValue - 1).deleteCharAt(1); > } else { > buf.append(yearVal

Re: RFR: 8336844: ZipConstants64 defines duplicate constants EXTID_ZIP64 and ZIP64_EXTID [v2]

2024-07-19 Thread Jaikiran Pai
On Sat, 20 Jul 2024 02:18:11 GMT, Liam Miller-Cushon wrote: >> This change deduplicates constants in ZipConstants64 for the Zip64 Extended >> Information Extra Field Header ID (see APPNOTE.TXT 4.5.3). >> >> I think there are arguments for consolidating on either `EXTID_ZIP64` or >> `ZIP64_EXTI

Re: RFR: 8336844: ZipConstants64 defines duplicate constants EXTID_ZIP64 and ZIP64_EXTID [v2]

2024-07-19 Thread Vyom Tewari
On Sat, 20 Jul 2024 02:18:11 GMT, Liam Miller-Cushon wrote: >> This change deduplicates constants in ZipConstants64 for the Zip64 Extended >> Information Extra Field Header ID (see APPNOTE.TXT 4.5.3). >> >> I think there are arguments for consolidating on either `EXTID_ZIP64` or >> `ZIP64_EXTI

Re: RFR: 8336831: Optimize StringConcatHelper.simpleConcat [v5]

2024-07-19 Thread Shaojin Wen
On Fri, 19 Jul 2024 21:42:09 GMT, Shaojin Wen wrote: >> Currently simpleConcat is implemented using mix and prepend, but in this >> simple scenario, it can be implemented in a simpler way and can improve >> performance. > > Shaojin Wen has updated the pull request incrementally with two additio

Re: RFR: 8333812: ClassFile.verify() can throw exceptions instead of returning VerifyErrors [v3]

2024-07-19 Thread Chen Liang
On Fri, 19 Jul 2024 22:30:00 GMT, ExE Boss wrote: >> Adam Sotona has updated the pull request incrementally with one additional >> commit since the last revision: >> >> nit change > > src/java.base/share/classes/jdk/internal/classfile/impl/ClassFileImpl.java > line 138: > >> 136:

Re: RFR: 8336831: Optimize StringConcatHelper.simpleConcat [v5]

2024-07-19 Thread Chen Liang
On Fri, 19 Jul 2024 22:49:41 GMT, Shaojin Wen wrote: >> FWIW one of the ideas when implementing `StringConcatHelper.simpleConcat` >> was that by using the primitives used by the `StringConcatFactory` as >> straightforwardly as possible the method acts as a documentation-of-sorts or >> guide to

Re: RFR: 8336844: ZipConstants64 defines duplicate constants EXTID_ZIP64 and ZIP64_EXTID [v2]

2024-07-19 Thread Liam Miller-Cushon
> This change deduplicates constants in ZipConstants64 for the Zip64 Extended > Information Extra Field Header ID (see APPNOTE.TXT 4.5.3). > > I think there are arguments for consolidating on either `EXTID_ZIP64` or > `ZIP64_EXTID`. The PR currently consolidates on `EXTID_ZIP64`, `ZIP64_EXTID`

Re: RFR: 8336844: ZipConstants64 defines duplicate constants EXTID_ZIP64 and ZIP64_EXTID

2024-07-19 Thread Liam Miller-Cushon
On Fri, 19 Jul 2024 19:35:14 GMT, Liam Miller-Cushon wrote: > This change deduplicates constants in ZipConstants64 for the Zip64 Extended > Information Extra Field Header ID (see APPNOTE.TXT 4.5.3). > > I think there are arguments for consolidating on either `EXTID_ZIP64` or > `ZIP64_EXTID`. T

Re: RFR: 8336844: ZipConstants64 defines duplicate constants EXTID_ZIP64 and ZIP64_EXTID

2024-07-19 Thread Jaikiran Pai
On Fri, 19 Jul 2024 19:35:14 GMT, Liam Miller-Cushon wrote: > This change deduplicates constants in ZipConstants64 for the Zip64 Extended > Information Extra Field Header ID (see APPNOTE.TXT 4.5.3). > > I think there are arguments for consolidating on either `EXTID_ZIP64` or > `ZIP64_EXTID`. T

Re: RFR: 8336831: Optimize StringConcatHelper.simpleConcat [v5]

2024-07-19 Thread Claes Redestad
On Fri, 19 Jul 2024 21:42:09 GMT, Shaojin Wen wrote: >> Currently simpleConcat is implemented using mix and prepend, but in this >> simple scenario, it can be implemented in a simpler way and can improve >> performance. > > Shaojin Wen has updated the pull request incrementally with two additio

Re: RFR: 8336706: Optimize LocalDate.toString with StringBuilder.repeat

2024-07-19 Thread duke
On Thu, 18 Jul 2024 05:21:36 GMT, Shaojin Wen wrote: > class LocalDate { > public String toString() { > if (absYear < 1000) { > if (yearValue < 0) { > buf.append(yearValue - 1).deleteCharAt(1); > } else { > buf.append(yearVal

Re: RFR: 8322256: Define and document GZIPInputStream concatenated stream semantics [v5]

2024-07-19 Thread Archie Cobbs
On Fri, 19 Jul 2024 09:56:46 GMT, Eirik Bjørsnøs wrote: > The term "extra" here feels somewhat open to interpretation. Specifically, > "extra" sounds like something that is out of the ordinary, but not uncommon > or wrong. It could be used when describing an optional feature in a format > spec

Re: RFR: 8335791: Speed ​​up j.u.Formatter & String.format [v4]

2024-07-19 Thread Shaojin Wen
On Sat, 6 Jul 2024 00:15:04 GMT, Shaojin Wen wrote: >> String.format is widely used, and improving its performance is very >> meaningful. This PR can significantly improve the performance of >> String.format. Sorry, there are many changes, which will take a lot of time. >> I hope you can revie

Re: RFR: 8336831: Optimize StringConcatHelper.simpleConcat [v5]

2024-07-19 Thread Shaojin Wen
On Fri, 19 Jul 2024 22:28:40 GMT, Claes Redestad wrote: >> Shaojin Wen has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - Update src/java.base/share/classes/java/lang/String.java >> >>Co-authored-by: Chen Liang >> - add comments

Re: RFR: 8333812: ClassFile.verify() can throw exceptions instead of returning VerifyErrors [v3]

2024-07-19 Thread ExE Boss
On Fri, 19 Jul 2024 08:26:46 GMT, Adam Sotona wrote: >> `ClassFile.verify()` should always return list of verification errors and >> never throw an exception, even for corrupted classes. >> `BoundAttribute` initializations of `LocalVariableTable` and >> `LocalVariableTypeTable` attributes do no

Re: RFR: 8336831: Optimize StringConcatHelper.simpleConcat [v5]

2024-07-19 Thread Claes Redestad
On Fri, 19 Jul 2024 21:42:09 GMT, Shaojin Wen wrote: >> Currently simpleConcat is implemented using mix and prepend, but in this >> simple scenario, it can be implemented in a simpler way and can improve >> performance. > > Shaojin Wen has updated the pull request incrementally with two additio

Re: RFR: 8336706: Optimize LocalDate.toString with StringBuilder.repeat

2024-07-19 Thread Roger Riggs
On Thu, 18 Jul 2024 05:21:36 GMT, Shaojin Wen wrote: > class LocalDate { > public String toString() { > if (absYear < 1000) { > if (yearValue < 0) { > buf.append(yearValue - 1).deleteCharAt(1); > } else { > buf.append(yearVal

Integrated: 8336792: DateTimeFormatterBuilder append zeros based on StringBuilder.repeat

2024-07-19 Thread Shaojin Wen
On Thu, 18 Jul 2024 23:36:37 GMT, Shaojin Wen wrote: > The StringBuilder.repeat method was added in JDK 21, which can be used to > make some minor optimizations to existing code, including > DateTimeFormatterBuilder This pull request has now been integrated. Changeset: e3acf4c6 Author:Sha

Re: RFR: 8336792: DateTimeFormatterBuilder append zeros based on StringBuilder.repeat

2024-07-19 Thread duke
On Thu, 18 Jul 2024 23:36:37 GMT, Shaojin Wen wrote: > The StringBuilder.repeat method was added in JDK 21, which can be used to > make some minor optimizations to existing code, including > DateTimeFormatterBuilder @wenshao Your change (at version db3027b03030304dbec990c943eff0f037363e37) is

Re: RFR: 8336831: Optimize StringConcatHelper.simpleConcat [v5]

2024-07-19 Thread Roger Riggs
On Fri, 19 Jul 2024 21:42:09 GMT, Shaojin Wen wrote: >> Currently simpleConcat is implemented using mix and prepend, but in this >> simple scenario, it can be implemented in a simpler way and can improve >> performance. > > Shaojin Wen has updated the pull request incrementally with two additio

Re: RFR: 8336831: Optimize StringConcatHelper.simpleConcat [v5]

2024-07-19 Thread Shaojin Wen
On Fri, 19 Jul 2024 21:42:09 GMT, Shaojin Wen wrote: >> Currently simpleConcat is implemented using mix and prepend, but in this >> simple scenario, it can be implemented in a simpler way and can improve >> performance. > > Shaojin Wen has updated the pull request incrementally with two additio

Re: RFR: 8336831: Optimize StringConcatHelper.simpleConcat [v3]

2024-07-19 Thread Chen Liang
On Fri, 19 Jul 2024 21:33:09 GMT, Shaojin Wen wrote: >> Currently simpleConcat is implemented using mix and prepend, but in this >> simple scenario, it can be implemented in a simpler way and can improve >> performance. > > Shaojin Wen has updated the pull request incrementally with one additio

Re: RFR: 8336831: Optimize StringConcatHelper.simpleConcat [v5]

2024-07-19 Thread Shaojin Wen
> Currently simpleConcat is implemented using mix and prepend, but in this > simple scenario, it can be implemented in a simpler way and can improve > performance. Shaojin Wen has updated the pull request incrementally with two additional commits since the last revision: - Update src/java.bas

Re: RFR: 8336831: Optimize StringConcatHelper.simpleConcat [v4]

2024-07-19 Thread Chen Liang
On Fri, 19 Jul 2024 21:34:36 GMT, Shaojin Wen wrote: >> Currently simpleConcat is implemented using mix and prepend, but in this >> simple scenario, it can be implemented in a simpler way and can improve >> performance. > > Shaojin Wen has updated the pull request incrementally with one additio

Re: RFR: 8336831: Optimize StringConcatHelper.simpleConcat [v4]

2024-07-19 Thread Shaojin Wen
> Currently simpleConcat is implemented using mix and prepend, but in this > simple scenario, it can be implemented in a simpler way and can improve > performance. Shaojin Wen has updated the pull request incrementally with one additional commit since the last revision: handle null argument

Re: RFR: 8336831: Optimize StringConcatHelper.simpleConcat [v3]

2024-07-19 Thread Shaojin Wen
> Currently simpleConcat is implemented using mix and prepend, but in this > simple scenario, it can be implemented in a simpler way and can improve > performance. Shaojin Wen has updated the pull request incrementally with one additional commit since the last revision: extract a common doCo

Re: RFR: 8328995: Launcher can't open jar files where the offset of the manifest is >4GB [v8]

2024-07-19 Thread Liam Miller-Cushon
On Fri, 19 Jul 2024 15:18:26 GMT, Lance Andersen wrote: >> src/java.base/share/native/libjli/parse_manifest.c line 507: >> >>> 505: || censiz == ZIP64_MAGICVAL >>> 506: || cenoff == ZIP64_MAGICVAL) >>> 507: && cenext > 0) { >> >> I went throug

Integrated: 8336777: BufferedMethodBuilder not initialized with static flag

2024-07-19 Thread Chen Liang
On Thu, 18 Jul 2024 22:21:08 GMT, Chen Liang wrote: > `BufferedMethodBuilder` accepts a static flag and passes it to the > `CodeBuilder` it creates; yet it does not prevent static flag tampering like > `DirectMethodBuilder` does. This patch makes their behaviors consistent. > > Note that the t

Re: RFR: 8336777: BufferedMethodBuilder not initialized with static flag

2024-07-19 Thread Chen Liang
On Thu, 18 Jul 2024 22:21:08 GMT, Chen Liang wrote: > `BufferedMethodBuilder` accepts a static flag and passes it to the > `CodeBuilder` it creates; yet it does not prevent static flag tampering like > `DirectMethodBuilder` does. This patch makes their behaviors consistent. > > Note that the t

Re: RFR: 8336831: Optimize StringConcatHelper.simpleConcat [v2]

2024-07-19 Thread Chen Liang
On Fri, 19 Jul 2024 19:18:43 GMT, Shaojin Wen wrote: >> Currently simpleConcat is implemented using mix and prepend, but in this >> simple scenario, it can be implemented in a simpler way and can improve >> performance. > > Shaojin Wen has updated the pull request incrementally with one additio

Re: RFR: 8333396: Use StringBuilder internally for java.text.Format.* formatting [v21]

2024-07-19 Thread Naoto Sato
On Fri, 19 Jul 2024 20:46:37 GMT, Naoto Sato wrote: >> lingjun-cg has updated the pull request incrementally with one additional >> commit since the last revision: >> >> 896: Use StringBuilder internally for java.text.Format.* formatting > > src/java.base/share/classes/java/text/CompactNu

Withdrawn: 8331342: Convert Base64 tests to JUnit

2024-07-19 Thread duke
On Tue, 21 May 2024 22:56:45 GMT, Justin Lu wrote: > Please review this test-only clean up PR which converts the java.util.Base64 > tests to run under JUnit. > > In general, this allows for the tests to run independently, separates the > data providers from the tests, as well being able to uti

Re: RFR: 8336831: Optimize StringConcatHelper.simpleConcat [v2]

2024-07-19 Thread Shaojin Wen
On Fri, 19 Jul 2024 20:43:42 GMT, Chen Liang wrote: >> Shaojin Wen has updated the pull request incrementally with one additional >> commit since the last revision: >> >> share newArray > > As annoying and risky as this first appeared, this patch is actually in quite > good shape: The usage

Re: RFR: 8336831: Optimize StringConcatHelper.simpleConcat [v2]

2024-07-19 Thread Shaojin Wen
On Fri, 19 Jul 2024 20:18:04 GMT, Chen Liang wrote: >> Shaojin Wen has updated the pull request incrementally with one additional >> commit since the last revision: >> >> share newArray > > src/java.base/share/classes/java/lang/StringConcatHelper.java line 371: > >> 369: return n

Re: RFR: 8336831: Optimize StringConcatHelper.simpleConcat [v2]

2024-07-19 Thread Chen Liang
On Fri, 19 Jul 2024 20:55:03 GMT, Shaojin Wen wrote: >> src/java.base/share/classes/java/lang/StringConcatHelper.java line 371: >> >>> 369: return new String(s1); >>> 370: } >>> 371: byte coder = (byte) (s1.coder() | s2.coder()); >> >> Suggestion: >> >> int

Re: RFR: 8333396: Use StringBuilder internally for java.text.Format.* formatting [v21]

2024-07-19 Thread Chen Liang
On Mon, 15 Jul 2024 02:30:54 GMT, lingjun-cg wrote: >> ### Performance regression of DecimalFormat.format >> From the output of perf, we can see the hottest regions contain atomic >> instructions. But when run with JDK 11, there is no such problem. The >> reason is the removed biased locking.

Re: RFR: 8333396: Use StringBuilder internally for java.text.Format.* formatting [v21]

2024-07-19 Thread Naoto Sato
On Mon, 15 Jul 2024 02:30:54 GMT, lingjun-cg wrote: >> ### Performance regression of DecimalFormat.format >> From the output of perf, we can see the hottest regions contain atomic >> instructions. But when run with JDK 11, there is no such problem. The >> reason is the removed biased locking.

Re: RFR: 8336831: Optimize StringConcatHelper.simpleConcat [v2]

2024-07-19 Thread Chen Liang
On Fri, 19 Jul 2024 19:18:43 GMT, Shaojin Wen wrote: >> Currently simpleConcat is implemented using mix and prepend, but in this >> simple scenario, it can be implemented in a simpler way and can improve >> performance. > > Shaojin Wen has updated the pull request incrementally with one additio

Re: RFR: 8336831: Optimize StringConcatHelper.simpleConcat [v2]

2024-07-19 Thread Chen Liang
On Fri, 19 Jul 2024 19:18:43 GMT, Shaojin Wen wrote: >> Currently simpleConcat is implemented using mix and prepend, but in this >> simple scenario, it can be implemented in a simpler way and can improve >> performance. > > Shaojin Wen has updated the pull request incrementally with one additio

Re: RFR: 8336831: Optimize StringConcatHelper.simpleConcat

2024-07-19 Thread Shaojin Wen
On Fri, 19 Jul 2024 17:35:45 GMT, Chen Liang wrote: > Also beware of #19927: it simplifies the prepend part. How does that patch > run in your benchmark? The performance comparison I made is based on the latest master branch ([c25c4896ad9ef031e3cddec493aef66ff87c48a7](https://github.com/openjd

RFR: 8336844: ZipConstants64 defines duplicate constants ZIP64_EXTID and EXTID_ZIP64

2024-07-19 Thread Liam Miller-Cushon
This change deduplicates constants in ZipConstants64 for the Zip64 Extended Information Extra Field Header ID (see APPNOTE.TXT 4.5.3). I think there are arguments for consolidating on either `EXTID_ZIP64` or `ZIP64_EXTID`. The PR currently consolidates on `EXTID_ZIP64`, `ZIP64_EXTID` is also an

Re: RFR: 8336831: Optimize StringConcatHelper.simpleConcat [v2]

2024-07-19 Thread Shaojin Wen
On Fri, 19 Jul 2024 19:18:43 GMT, Shaojin Wen wrote: >> Currently simpleConcat is implemented using mix and prepend, but in this >> simple scenario, it can be implemented in a simpler way and can improve >> performance. > > Shaojin Wen has updated the pull request incrementally with one additio

Re: java.util.zip.ZipError seems unused

2024-07-19 Thread Eirik Bjørsnøs
Thanks Lance, I have filed the following enhancement request to track this: https://bugs.openjdk.org/browse/JDK-8336843 Eirik. On Sun, Jun 30, 2024 at 2:54 PM Lance Andersen wrote: > Hi Eirik, > > The removal of ZipError from ZipFile/ZipFileSystem/ZipFileSystemProvider > occurred via 8145260

Re: RFR: 8336831: Optimize StringConcatHelper.simpleConcat [v2]

2024-07-19 Thread Shaojin Wen
> Currently simpleConcat is implemented using mix and prepend, but in this > simple scenario, it can be implemented in a simpler way and can improve > performance. Shaojin Wen has updated the pull request incrementally with one additional commit since the last revision: share newArray -

Re: RFR: 8334758: Incorrect note in Javadoc for a few RandomGenerator methods [v2]

2024-07-19 Thread Brian Burkhalter
On Fri, 19 Jul 2024 17:08:38 GMT, Raffaello Giulietti wrote: > I guess that the approval of the CSR, once done, would "de-facto" count as a > 2nd review? I agree. - PR Comment: https://git.openjdk.org/jdk/pull/20152#issuecomment-2239863660

Re: RFR: 8336831: Optimize StringConcatHelper.simpleConcat

2024-07-19 Thread Chen Liang
On Fri, 19 Jul 2024 13:10:43 GMT, Shaojin Wen wrote: > Currently simpleConcat is implemented using mix and prepend, but in this > simple scenario, it can be implemented in a simpler way and can improve > performance. Changes requested by liach (Reviewer). src/java.base/share/classes/java/lang

Re: RFR: 8336831: Optimize StringConcatHelper.simpleConcat

2024-07-19 Thread Chen Liang
On Fri, 19 Jul 2024 13:10:43 GMT, Shaojin Wen wrote: > Currently simpleConcat is implemented using mix and prepend, but in this > simple scenario, it can be implemented in a simpler way and can improve > performance. Also beware of #19927: it simplifies the prepend part. How does that patch ru

Re: [jdk23] RFR: 8325280: Update troff manpages in JDK 23 before RC

2024-07-19 Thread Iris Clark
On Fri, 19 Jul 2024 05:47:15 GMT, David Holmes wrote: > Before RC we need to update the man pages in the repo from their Markdown > sources. All pages at a minimum have 23-ea replaced with 23, and publication > year set to 2024 if needed. > > This also picks up the unpublished changes to java.

Re: RFR: 8336792: DateTimeFormatterBuilder append zeros based on StringBuilder.repeat

2024-07-19 Thread Chen Liang
On Thu, 18 Jul 2024 23:36:37 GMT, Shaojin Wen wrote: > The StringBuilder.repeat method was added in JDK 21, which can be used to > make some minor optimizations to existing code, including > DateTimeFormatterBuilder Tier 1-3 tests come back all passing as well. - PR Comment: http

Re: RFR: 8336792: DateTimeFormatterBuilder append zeros based on StringBuilder.repeat

2024-07-19 Thread Naoto Sato
On Thu, 18 Jul 2024 23:36:37 GMT, Shaojin Wen wrote: > The StringBuilder.repeat method was added in JDK 21, which can be used to > make some minor optimizations to existing code, including > DateTimeFormatterBuilder Marked as reviewed by naoto (Reviewer). - PR Review: https://git

Re: RFR: 8334758: Incorrect note in Javadoc for a few RandomGenerator methods [v2]

2024-07-19 Thread Raffaello Giulietti
On Fri, 19 Jul 2024 16:50:50 GMT, Raffaello Giulietti wrote: >> Small corrections to @implSpec notes in a few methods in RandomGenerator. > > Raffaello Giulietti has updated the pull request incrementally with one > additional commit since the last revision: > > Improved wording. I guess th

Re: RFR: 8334758: Incorrect note in Javadoc for a few RandomGenerator methods [v2]

2024-07-19 Thread Brian Burkhalter
On Fri, 19 Jul 2024 16:50:50 GMT, Raffaello Giulietti wrote: >> Small corrections to @implSpec notes in a few methods in RandomGenerator. > > Raffaello Giulietti has updated the pull request incrementally with one > additional commit since the last revision: > > Improved wording. Looks fine

Re: RFR: 8336254: Virtual thread implementation + test updates [v2]

2024-07-19 Thread Alan Bateman
> Bringover some of the changes accumulated in the loom repo to the main line, > most of these changes are test updates and have been baking in the loom repo > for several months. The motive is partly to reduce the large set of changes > that have accumulated in the loom repo, and partly to impr

Re: RFR: 8331341: secondary_super_cache does not scale well: C1 and interpreter [v3]

2024-07-19 Thread Andrew Haley
> This patch expands the use of a hash table for secondary superclasses > to the interpreter, C1, and runtime. It also adds a C2 implementation > of hashed lookup in cases where the superclass isn't known at compile > time. > > HotSpot shared runtime > -- > > Building hashed s

Re: RFR: 8334758: Incorrect note in Javadoc for a few RandomGenerator methods [v2]

2024-07-19 Thread Raffaello Giulietti
> Small corrections to @implSpec notes in a few methods in RandomGenerator. Raffaello Giulietti has updated the pull request incrementally with one additional commit since the last revision: Improved wording. - Changes: - all: https://git.openjdk.org/jdk/pull/20152/files - ne

Re: RFR: 8334758: Incorrect note in Javadoc for a few RandomGenerator methods

2024-07-19 Thread Brian Burkhalter
On Fri, 12 Jul 2024 06:28:15 GMT, Raffaello Giulietti wrote: > Small corrections to @implSpec notes in a few methods in RandomGenerator. src/java.base/share/classes/java/util/random/RandomGenerator.java line 816: > 814: * distribution in the range 0 (inclusive) > 815: * to {@code bou

Re: RFR: 8336833: Endless loop in Javap ClassWriter

2024-07-19 Thread Chen Liang
On Fri, 19 Jul 2024 15:32:24 GMT, Adam Sotona wrote: > Artificially corrupted class with overflowing max - min values of > `tableswitch` instruction cause infinite loop in > `jdk.internal.classfile.impl.CodeImpl::inflateJumpTargets` > > This patch fixes the overflow and adds relevant test. >

Re: RFR: 8336039: Doccheck: HTML warnings, broken links and missing files in java.base documentation [v4]

2024-07-19 Thread Daniel Jeliński
On Fri, 19 Jul 2024 14:20:48 GMT, Nizar Benalla wrote: >> Can I get a review for this change that fixes some broken links in javadoc >> comments? The new docs are hosted >> [here](https://cr.openjdk.org/~nbenalla/GeneratedDocs/8336039-warnings-links/). >> >> It's mostly fixing some relative li

Re: RFR: 8336833: Endless loop in Javap ClassWriter

2024-07-19 Thread Adam Sotona
On Fri, 19 Jul 2024 15:41:07 GMT, Chen Liang wrote: >> Artificially corrupted class with overflowing max - min values of >> `tableswitch` instruction cause infinite loop in >> `jdk.internal.classfile.impl.CodeImpl::inflateJumpTargets` >> >> This patch fixes the overflow and adds relevant test.

Re: RFR: 8336039: Doccheck: HTML warnings, broken links and missing files in java.base documentation [v2]

2024-07-19 Thread Daniel Jeliński
On Fri, 19 Jul 2024 13:11:05 GMT, Chen Liang wrote: >> Nizar Benalla has updated the pull request incrementally with one additional >> commit since the last revision: >> >> remove docroot based on review > > src/java.base/share/classes/java/lang/foreign/Arena.java line 64: > >> 62: * such,

Re: RFR: 8329597: C2: Intrinsify Reference.clear [v3]

2024-07-19 Thread Aleksey Shipilev
> [JDK-8240696](https://bugs.openjdk.org/browse/JDK-8240696) added the native > method for `Reference.clear`. The original patch skipped intrinsification of > this method, because we thought `Reference.clear` is not on a performance > sensitive path. However, it shows up prominently on simple be

Re: RFR: 8336039: Doccheck: HTML warnings, broken links and missing files in java.base documentation [v4]

2024-07-19 Thread Chen Liang
On Fri, 19 Jul 2024 14:20:48 GMT, Nizar Benalla wrote: >> Can I get a review for this change that fixes some broken links in javadoc >> comments? The new docs are hosted >> [here](https://cr.openjdk.org/~nbenalla/GeneratedDocs/8336039-warnings-links/). >> >> It's mostly fixing some relative li

Re: RFR: 8336833: Endless loop in Javap ClassWriter

2024-07-19 Thread Chen Liang
On Fri, 19 Jul 2024 15:32:24 GMT, Adam Sotona wrote: > Artificially corrupted class with overflowing max - min values of > `tableswitch` instruction cause infinite loop in > `jdk.internal.classfile.impl.CodeImpl::inflateJumpTargets` > > This patch fixes the overflow and adds relevant test. >

RFR: 8336833: Endless loop in Javap ClassWriter

2024-07-19 Thread Adam Sotona
Artificially corrupted class with overflowing max - min values of `tableswitch` instruction cause infinite loop in `jdk.internal.classfile.impl.CodeImpl::inflateJumpTargets` This patch fixes the overflow and adds relevant test. Please review. Thank you, Adam - Commit messages: -

Re: RFR: 8328995: Launcher can't open jar files where the offset of the manifest is >4GB [v9]

2024-07-19 Thread Liam Miller-Cushon
> This change fixes a zip64 bug in the launcher that is prevent it from reading > the manifest of jars where the 'relative offset of local header' field in the > central directory entry is >4GB. As described in APPNOTE.TXT 4.5.3, the > offset is too large to be stored in the central directory it

Re: RFR: 8328995: Launcher can't open jar files where the offset of the manifest is >4GB [v8]

2024-07-19 Thread Liam Miller-Cushon
On Fri, 19 Jul 2024 13:19:52 GMT, Jaikiran Pai wrote: >> Liam Miller-Cushon 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 com

Re: RFR: 8336792: DateTimeFormatterBuilder append zeros based on StringBuilder.repeat

2024-07-19 Thread Roger Riggs
On Thu, 18 Jul 2024 23:36:37 GMT, Shaojin Wen wrote: > The StringBuilder.repeat method was added in JDK 21, which can be used to > make some minor optimizations to existing code, including > DateTimeFormatterBuilder lgtm - Marked as reviewed by rriggs (Reviewer). PR Review: http

Re: RFR: 8328995: Launcher can't open jar files where the offset of the manifest is >4GB [v8]

2024-07-19 Thread Lance Andersen
On Fri, 19 Jul 2024 14:16:21 GMT, Jaikiran Pai wrote: >> Liam Miller-Cushon 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 com

Re: RFR: 4452735: Add GZIPOutputStream constructor to specify Deflater

2024-07-19 Thread Lance Andersen
On Fri, 19 Jul 2024 14:07:07 GMT, Archie Cobbs wrote: > > I understand the request here, but is there a current use case for needing > > a custom Deflater? > > I think the primary use case is when you want to set a non-default > compression level, e.g., "best" or "fast". This is a pretty norma

Re: RFR: 8336479: Provide Process.waitFor(Duration) [v5]

2024-07-19 Thread Roger Riggs
On Thu, 18 Jul 2024 21:50:31 GMT, Naoto Sato wrote: >> The `ProcessTools` override is a delegating override; I think it still makes >> sense and should be kept. > > I think the test tool should not depend on the internal implementation, so I > think it should be kept. Its still unnecessary, ad

Re: RFR: 8336479: Provide Process.waitFor(Duration) [v5]

2024-07-19 Thread Roger Riggs
On Thu, 18 Jul 2024 20:51:48 GMT, Naoto Sato wrote: >> Proposing a new overload method for `Process#waitFor()` which takes a >> `Duration` for the timeout value. This will reduce the possibility for >> making mistakes with the `TimeUnit` in the other overload method. A >> corresponding CSR has

Re: RFR: 8333396: Use StringBuilder internally for java.text.Format.* formatting [v21]

2024-07-19 Thread Roger Riggs
On Fri, 19 Jul 2024 13:03:31 GMT, Chen Liang wrote: >> lingjun-cg has updated the pull request incrementally with one additional >> commit since the last revision: >> >> 896: Use StringBuilder internally for java.text.Format.* formatting > > src/java.base/share/classes/java/text/Format.ja

Re: RFR: 8336039: Doccheck: HTML warnings, broken links and missing files in java.base documentation [v3]

2024-07-19 Thread Chen Liang
On Fri, 19 Jul 2024 14:05:07 GMT, Nizar Benalla wrote: >> Can I get a review for this change that fixes some broken links in javadoc >> comments? The new docs are hosted >> [here](https://cr.openjdk.org/~nbenalla/GeneratedDocs/8336039-warnings-links/). >> >> It's mostly fixing some relative li

Re: RFR: 8336039: Doccheck: HTML warnings, broken links and missing files in java.base documentation [v4]

2024-07-19 Thread Nizar Benalla
> Can I get a review for this change that fixes some broken links in javadoc > comments? The new docs are hosted > [here](https://cr.openjdk.org/~nbenalla/GeneratedDocs/8336039-warnings-links/). > > It's mostly fixing some relative links. > If using `{@docroot}` isn't ideal I can change it. > >

Re: RFR: 8328995: Launcher can't open jar files where the offset of the manifest is >4GB [v8]

2024-07-19 Thread Jaikiran Pai
On Thu, 18 Jul 2024 21:36:54 GMT, Liam Miller-Cushon wrote: >> This change fixes a zip64 bug in the launcher that is prevent it from >> reading the manifest of jars where the 'relative offset of local header' >> field in the central directory entry is >4GB. As described in APPNOTE.TXT >> 4.5.3

Re: RFR: 8336039: Doccheck: HTML warnings, broken links and missing files in java.base documentation [v3]

2024-07-19 Thread Nizar Benalla
> Can I get a review for this change that fixes some broken links in javadoc > comments? The new docs are hosted > [here](https://cr.openjdk.org/~nbenalla/GeneratedDocs/8336039-warnings-links/). > > It's mostly fixing some relative links. > If using `{@docroot}` isn't ideal I can change it. > >

Re: RFR: 4452735: Add GZIPOutputStream constructor to specify Deflater

2024-07-19 Thread Archie Cobbs
On Fri, 19 Jul 2024 10:41:05 GMT, Lance Andersen wrote: > I understand the request here, but is there a current use case for needing a > custom Deflater? I think the primary use case is when you want to set a non-default compression level, e.g., "best" or "fast". This is a pretty normal thing

Re: RFR: 8336039: Doccheck: HTML warnings, broken links and missing files in java.base documentation [v2]

2024-07-19 Thread Nizar Benalla
On Fri, 19 Jul 2024 13:08:06 GMT, Nizar Benalla wrote: >> Can I get a review for this change that fixes some broken links in javadoc >> comments? The new docs are hosted >> [here](https://cr.openjdk.org/~nbenalla/GeneratedDocs/8336039-warnings-links/). >> >> It's mostly fixing some relative li

Re: RFR: 8336754: Remodel TypeAnnotation to "has" instead of "be" an Annotation

2024-07-19 Thread Adam Sotona
On Fri, 19 Jul 2024 01:55:57 GMT, Chen Liang wrote: > `TypeAnnotation` is not an annotation, as it should not be used in places > like `AnnotationValue.ofAnnotation`. Thus it's remodeled to contain an > annotation at a given location instead of to be an annotation. > > Depends on #20205. Look

Re: RFR: 8336754: Remodel TypeAnnotation to "has" instead of "be" an Annotation

2024-07-19 Thread Chen Liang
On Fri, 19 Jul 2024 13:30:44 GMT, Adam Sotona wrote: >> `TypeAnnotation` is not an annotation, as it should not be used in places >> like `AnnotationValue.ofAnnotation`. Thus it's remodeled to contain an >> annotation at a given location instead of to be an annotation. >> >> Depends on #20205.

Re: RFR: 8336754: Remodel TypeAnnotation to "has" instead of "be" an Annotation

2024-07-19 Thread Adam Sotona
On Fri, 19 Jul 2024 01:55:57 GMT, Chen Liang wrote: > `TypeAnnotation` is not an annotation, as it should not be used in places > like `AnnotationValue.ofAnnotation`. Thus it's remodeled to contain an > annotation at a given location instead of to be an annotation. > > Depends on #20205. src/

RFR: 8336831: Optimize StringConcatHelper.simpleConcat

2024-07-19 Thread Shaojin Wen
Currently simpleConcat is implemented using mix and prepend, but in this simple scenario, it can be implemented in a simpler way and can improve performance. - Commit messages: - copyright 2024 - optimize String.concat Changes: https://git.openjdk.org/jdk/pull/20253/files Webrev

Re: RFR: 8336831: Optimize StringConcatHelper.simpleConcat

2024-07-19 Thread Shaojin Wen
On Fri, 19 Jul 2024 13:10:43 GMT, Shaojin Wen wrote: > Currently simpleConcat is implemented using mix and prepend, but in this > simple scenario, it can be implemented in a simpler way and can improve > performance. Below are the performance numbers running on a MacBook M1 Pro, which is 8.71%

Re: RFR: 8336777: BufferedMethodBuilder not initialized with static flag

2024-07-19 Thread Adam Sotona
On Thu, 18 Jul 2024 22:21:08 GMT, Chen Liang wrote: > `BufferedMethodBuilder` accepts a static flag and passes it to the > `CodeBuilder` it creates; yet it does not prevent static flag tampering like > `DirectMethodBuilder` does. This patch makes their behaviors consistent. > > Note that the t

Re: RFR: 8328995: Launcher can't open jar files where the offset of the manifest is >4GB [v8]

2024-07-19 Thread Jaikiran Pai
On Thu, 18 Jul 2024 21:36:54 GMT, Liam Miller-Cushon wrote: >> This change fixes a zip64 bug in the launcher that is prevent it from >> reading the manifest of jars where the 'relative offset of local header' >> field in the central directory entry is >4GB. As described in APPNOTE.TXT >> 4.5.3

Re: RFR: 8336039: Doccheck: HTML warnings, broken links and missing files in java.base documentation [v2]

2024-07-19 Thread Chen Liang
On Fri, 19 Jul 2024 13:08:06 GMT, Nizar Benalla wrote: >> Can I get a review for this change that fixes some broken links in javadoc >> comments? The new docs are hosted >> [here](https://cr.openjdk.org/~nbenalla/GeneratedDocs/8336039-warnings-links/). >> >> It's mostly fixing some relative li

Integrated: 8333812: ClassFile.verify() can throw exceptions instead of returning VerifyErrors

2024-07-19 Thread Adam Sotona
On Thu, 18 Jul 2024 16:23:44 GMT, Adam Sotona wrote: > `ClassFile.verify()` should always return list of verification errors and > never throw an exception, even for corrupted classes. > `BoundAttribute` initializations of `LocalVariableTable` and > `LocalVariableTypeTable` attributes do not ex

Re: RFR: 8333812: ClassFile.verify() can throw exceptions instead of returning VerifyErrors [v3]

2024-07-19 Thread Adam Sotona
On Fri, 19 Jul 2024 08:26:46 GMT, Adam Sotona wrote: >> `ClassFile.verify()` should always return list of verification errors and >> never throw an exception, even for corrupted classes. >> `BoundAttribute` initializations of `LocalVariableTable` and >> `LocalVariableTypeTable` attributes do no

Re: RFR: 8333396: Use StringBuilder internally for java.text.Format.* formatting [v21]

2024-07-19 Thread Chen Liang
On Mon, 15 Jul 2024 02:30:54 GMT, lingjun-cg wrote: >> ### Performance regression of DecimalFormat.format >> From the output of perf, we can see the hottest regions contain atomic >> instructions. But when run with JDK 11, there is no such problem. The >> reason is the removed biased locking.

Re: RFR: 8336039: Doccheck: HTML warnings, broken links and missing files in java.base documentation [v2]

2024-07-19 Thread Nizar Benalla
On Fri, 19 Jul 2024 12:44:47 GMT, Daniel Jeliński wrote: >> Nizar Benalla has updated the pull request incrementally with one additional >> commit since the last revision: >> >> remove docroot based on review > > src/java.base/share/classes/java/util/concurrent/StructuredTaskScope.java > lin

Re: RFR: 8336039: Doccheck: HTML warnings, broken links and missing files in java.base documentation [v2]

2024-07-19 Thread Nizar Benalla
> Can I get a review for this change that fixes some broken links in javadoc > comments? The new docs are hosted > [here](https://cr.openjdk.org/~nbenalla/GeneratedDocs/8336039-warnings-links/). > > It's mostly fixing some relative links. > If using `{@docroot}` isn't ideal I can change it. > >

Re: RFR: 8322420: [Linux] cgroup v2: Limits in parent nested control groups are not detected [v15]

2024-07-19 Thread Jan Kratochvil
On Thu, 18 Jul 2024 14:48:02 GMT, Jan Kratochvil wrote: >> The testcase requires root permissions. >> >> Fix by Severin Gehwolf. >> Testcase by Jan Kratochvil. > > Jan Kratochvil has updated the pull request incrementally with one additional > commit since the last revision: > > Unify 4 co

Re: RFR: 8336039: Doccheck: HTML warnings, broken links and missing files in java.base documentation

2024-07-19 Thread Daniel Jeliński
On Fri, 19 Jul 2024 11:11:38 GMT, Nizar Benalla wrote: > Can I get a review for this change that fixes some broken links in javadoc > comments? The new docs are hosted > [here](https://cr.openjdk.org/~nbenalla/GeneratedDocs/8336039-warnings-links/). > > It's mostly fixing some relative links.

Re: RFR: 8336039: Doccheck: HTML warnings, broken links and missing files in java.base documentation

2024-07-19 Thread Daniel Jeliński
On Fri, 19 Jul 2024 11:11:38 GMT, Nizar Benalla wrote: > Can I get a review for this change that fixes some broken links in javadoc > comments? The new docs are hosted > [here](https://cr.openjdk.org/~nbenalla/GeneratedDocs/8336039-warnings-links/). > > It's mostly fixing some relative links.

Re: RFR: 8333812: ClassFile.verify() can throw exceptions instead of returning VerifyErrors [v3]

2024-07-19 Thread Chen Liang
On Fri, 19 Jul 2024 08:26:46 GMT, Adam Sotona wrote: >> `ClassFile.verify()` should always return list of verification errors and >> never throw an exception, even for corrupted classes. >> `BoundAttribute` initializations of `LocalVariableTable` and >> `LocalVariableTypeTable` attributes do no

Re: RFR: 8315884: New Object to ObjectMonitor mapping [v9]

2024-07-19 Thread Andrey Turbanov
On Mon, 15 Jul 2024 00:50:30 GMT, Axel Boldt-Christmas wrote: >> When inflating a monitor the `ObjectMonitor*` is written directly over the >> `markWord` and any overwritten data is displaced into a displaced >> `markWord`. This is problematic for concurrent GCs which needs extra care or >> l

Re: RFR: 8336254: Virtual thread implementation + test updates

2024-07-19 Thread Andrey Turbanov
On Thu, 11 Jul 2024 17:30:21 GMT, Alan Bateman wrote: > Bringover some of the changes accumulated in the loom repo to the main line, > most of these changes are test updates and have been baking in the loom repo > for several months. The motive is partly to reduce the large set of changes > th

RFR: 8336039: Doccheck: HTML warnings, broken links and missing files in java.base documentation

2024-07-19 Thread Nizar Benalla
Can I get a review for this change that fixes some broken links in javadoc comments? The new docs are hosted [here](https://cr.openjdk.org/~nbenalla/GeneratedDocs/8336039-warnings-links/). It's mostly fixing some relative links. If using `{@docroot}` isn't ideal I can change it. Here is the res

Re: RFR: 4452735: Add GZIPOutputStream constructor to specify Deflater

2024-07-19 Thread Lance Andersen
On Wed, 17 Jul 2024 21:07:23 GMT, Archie Cobbs wrote: > The class `GZIPOutputStream` extends `DeflaterOutputStream`, which is logical > because the GZIP encoding is based on ZLIB "deflate" encoding. > > However, while `DeflaterOutputStream` provides constructors that take a > custom `Deflater`

  1   2   >