Re: RFR: 8303866: Allow ZipInputStream.readEnd to parse small Zip64 ZIP files [v9]

2023-12-21 Thread Eirik Bjorsnos
> ZipInputStream.readEnd currently assumes a Zip64 data descriptor if the > number of compressed or uncompressed bytes read from the inflater is larger > than the Zip64 magic value. > > While the ZIP format mandates that the data descriptor `SHOULD be stored in > ZIP64 format (as 8 byte

Re: RFR: 8303866: Allow ZipInputStream.readEnd to parse small Zip64 ZIP files

2023-12-21 Thread Eirik Bjorsnos
On Sun, 12 Feb 2023 17:04:51 GMT, Alan Bateman wrote: >> ZipInputStream.readEnd currently assumes a Zip64 data descriptor if the >> number of compressed or uncompressed bytes read from the inflater is larger >> than the Zip64 magic value. >> >> While the ZIP format mandates that the data

Withdrawn: 8318486: Rename JavaLangAccess.xxNoRepl to xxReportError

2023-12-21 Thread duke
On Thu, 19 Oct 2023 07:04:50 GMT, Chen Liang wrote: > Please review a patch that renames `JavaLangAccess::xxNoRepl` to > `xxReportError` to explicitly indicate these APIs report encoding errors. > > The old "NoRepl" suffix presumably means "No Replacement", but it has been > misunderstood as

Re: RFR: 8316704: Regex-free parsing of Formatter and FormatProcessor specifiers [v6]

2023-12-21 Thread Shaojin Wen
On Thu, 21 Dec 2023 08:37:23 GMT, Shaojin Wen wrote: >> @cl4es made performance optimizations for the simple specifiers of >> String.format in PR https://github.com/openjdk/jdk/pull/2830. Based on the >> same idea, I continued to make improvements. I made patterns like %2d %02d >> also be

Re: RFR: 8068958: Timestamp.from(Instant) should throw when conversion is not possible

2023-12-21 Thread Eamonn McManus
On Thu, 21 Dec 2023 21:51:10 GMT, Eamonn McManus wrote: > Multiplying with `*` never produces `ArithmeticException`, so the catch in > the existing code is never triggered. `Math.multiplyExact` does produce > `ArithmeticException` if the multiplication overflows. So we can use that, > and

Re: RFR: 8275338: Add JFR events for notable serialization situations [v11]

2023-12-21 Thread Raffaello Giulietti
> Adds serialization misdeclaration events to JFR. Raffaello Giulietti has updated the pull request incrementally with one additional commit since the last revision: Simplified event messages. Remove ckecker allocation. - Changes: - all:

Re: RFR: 8275338: Add JFR events for notable serialization situations [v10]

2023-12-21 Thread Raffaello Giulietti
On Thu, 21 Dec 2023 21:24:43 GMT, Roger Riggs wrote: >> Raffaello Giulietti has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Corrected @Label of event and of field. > > src/java.base/share/classes/java/io/ObjectStreamClass.java line 466:

RFR: 8068958: Timestamp.from(Instant) should throw when conversion is not possible

2023-12-21 Thread Eamonn McManus
Multiplying with `*` never produces `ArithmeticException`, so the catch in the existing code is never triggered. `Math.multiplyExact` does produce `ArithmeticException` if the multiplication overflows. So we can use that, and rethrow `IllegalArgumentException` as the specification says. There

Re: RFR: 8275338: Add JFR events for notable serialization situations [v10]

2023-12-21 Thread Roger Riggs
On Thu, 21 Dec 2023 09:53:10 GMT, Raffaello Giulietti wrote: >> Adds serialization misdeclaration events to JFR. > > Raffaello Giulietti has updated the pull request incrementally with one > additional commit since the last revision: > > Corrected @Label of event and of field.

Re: RFR: 8322292: Rearrange comparison of fields in Record.equals() [v5]

2023-12-21 Thread ExE Boss
On Thu, 21 Dec 2023 18:30:40 GMT, Rob Spoor wrote: >> Sergey Tsypanov has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Update src/java.base/share/classes/java/lang/runtime/ObjectMethods.java >> >> Co-authored-by: ExE Boss

RFR: 8322322: Support archived full module graph when -Xbootclasspath/a is used

2023-12-21 Thread Calvin Cheung
Please review this change for enabling full module graph even when -Xbootclasspath/a is specified. The validation of -Xbootclasspath/a is already being done in `FileMapInfo::validate_boot_class_paths()`. The full module graph will be disabled if there's a mismatch in -Xbootclasspath/a between

Re: RFR: 8322292: Rearrange comparison of fields in Record.equals() [v5]

2023-12-21 Thread Rob Spoor
On Thu, 21 Dec 2023 16:58:00 GMT, Sergey Tsypanov wrote: >> Currently if we create a record it's fields are compared in their >> declaration order. This might be ineffective in cases when two objects have >> "heavy" fields equals to each other, but different "lightweight" fields >> (heavy and

Re: RFR: 8320971: Use BufferedInputStream.buf directly when param of implTransferTo() is trusted [v16]

2023-12-21 Thread Brian Burkhalter
On Tue, 19 Dec 2023 10:18:11 GMT, Sergey Tsypanov wrote: >> It looks like we can skip copying of `byte[]` in >> `BufferedInputStream.implTransferTo()` for `OutputStreams` residing in >> `java.io`. >> >> See comment by @vlsi in >>

Re: RFR: 8320971: Use BufferedInputStream.buf directly when param of implTransferTo() is trusted [v16]

2023-12-21 Thread Markus KARG
On Tue, 19 Dec 2023 10:18:11 GMT, Sergey Tsypanov wrote: >> It looks like we can skip copying of `byte[]` in >> `BufferedInputStream.implTransferTo()` for `OutputStreams` residing in >> `java.io`. >> >> See comment by @vlsi in >>

Re: RFR: 8322292: Rearrange comparison of fields in Record.equals() [v5]

2023-12-21 Thread Sergey Tsypanov
> Currently if we create a record it's fields are compared in their declaration > order. This might be ineffective in cases when two objects have "heavy" > fields equals to each other, but different "lightweight" fields (heavy and > lightweight in terms of comparison) e.g. primitives, enums, >

Re: RFR: JDK-8311009: Long.toUnsignedString(long, int) doesn't have to create a BigInteger [v2]

2023-12-21 Thread Raffaello Giulietti
On Wed, 28 Jun 2023 07:57:25 GMT, Tingjun Yuan wrote: >> This PR changes the implementation of `Long.toUnsignedString(long, int)` for >> "default" radices, which avoids creating a `BigInteger` and makes use of >> `Long.divideUnsigned` and `Long.remainderUnsigned`. >> >> I've run the test on

Re: RFR: JDK-8320448 Accelerate IndexOf using AVX2 [v5]

2023-12-21 Thread Scott Gibbons
> Re-write the IndexOf code without the use of the pcmpestri instruction, only > using AVX2 instructions. This change accelerates String.IndexOf on average > 1.3x for AVX2. The benchmark numbers: > > > BenchmarkScore > Latest

Re: RFR: 8322292: Rearrange comparison of fields in Record.equals() [v4]

2023-12-21 Thread ExE Boss
On Thu, 21 Dec 2023 14:47:43 GMT, ExE Boss wrote: >> Sergey Tsypanov has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 8322292: Tiny improvement > > src/java.base/share/classes/java/lang/runtime/ObjectMethods.java line 227: > >> 225:

Re: RFR: 8303866: Allow ZipInputStream.readEnd to parse small Zip64 ZIP files [v8]

2023-12-21 Thread Jaikiran Pai
On Tue, 28 Nov 2023 18:38:42 GMT, Eirik Bjorsnos wrote: >> Eirik Bjorsnos has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Extract ZIP64_BLOCK_SIZE_OFFSET as a constant > > Thanks for your patient and thorough review of this long-lived

Re: RFR: 8322292: Rearrange comparison of fields in Record.equals() [v4]

2023-12-21 Thread ExE Boss
On Wed, 20 Dec 2023 10:11:58 GMT, Sergey Tsypanov wrote: >> Currently if we create a record it's fields are compared in their >> declaration order. This might be ineffective in cases when two objects have >> "heavy" fields equals to each other, but different "lightweight" fields >> (heavy and

Re: RFR: 8294961: Convert java.base/java.lang.reflect.ProxyGenerator to use the Classfile API to generate proxy classes [v5]

2023-12-21 Thread Adam Sotona
> java.base java.lang.reflect.ProxyGenerator uses ASM to generate proxy classes. > > This patch converts it to use Classfile API. > > It is continuation of https://github.com/openjdk/jdk/pull/10991 > > Any comments and suggestions are welcome. > > Please review. > > Thank you, > Adam Adam

Re: RFR: 8294961: Convert java.base/java.lang.reflect.ProxyGenerator to use the Classfile API to generate proxy classes [v4]

2023-12-21 Thread Adam Sotona
> java.base java.lang.reflect.ProxyGenerator uses ASM to generate proxy classes. > > This patch converts it to use Classfile API. > > It is continuation of https://github.com/openjdk/jdk/pull/10991 > > Any comments and suggestions are welcome. > > Please review. > > Thank you, > Adam Adam

Re: RFR: 8294961: Convert java.base/java.lang.reflect.ProxyGenerator to use the Classfile API to generate proxy classes [v3]

2023-12-21 Thread Adam Sotona
On Thu, 21 Dec 2023 12:01:25 GMT, Sergey Tsypanov wrote: >> Adam Sotona has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - performance improvements >> - SplitConstantPool performance fix > >

Re: RFR: 8294961: Convert java.base/java.lang.reflect.ProxyGenerator to use the Classfile API to generate proxy classes [v3]

2023-12-21 Thread Sergey Tsypanov
On Thu, 21 Dec 2023 01:12:07 GMT, Adam Sotona wrote: >> java.base java.lang.reflect.ProxyGenerator uses ASM to generate proxy >> classes. >> >> This patch converts it to use Classfile API. >> >> It is continuation of https://github.com/openjdk/jdk/pull/10991 >> >> Any comments and

Re: RFR: 8322417: Console read line with zero out should zero out when throwing exception

2023-12-21 Thread Goetz Lindenmaier
On Wed, 20 Dec 2023 08:07:38 GMT, Alan Bateman wrote: >> …g exception >> >> After leaving the method by throwing an exception the data can not be >> cleaned any more. > > src/java.base/share/classes/jdk/internal/io/JdkConsoleImpl.java line 122: > >> 120:

Re: RFR: 8275338: Add JFR events for notable serialization situations [v10]

2023-12-21 Thread Raffaello Giulietti
> Adds serialization misdeclaration events to JFR. Raffaello Giulietti has updated the pull request incrementally with one additional commit since the last revision: Corrected @Label of event and of field. - Changes: - all: https://git.openjdk.org/jdk/pull/17129/files - new:

Re: RFR: 8275338: Add JFR events for notable serialization situations [v9]

2023-12-21 Thread Erik Gahlin
On Thu, 21 Dec 2023 09:36:06 GMT, Raffaello Giulietti wrote: >> Adds serialization misdeclaration events to JFR. > > Raffaello Giulietti has updated the pull request incrementally with one > additional commit since the last revision: > > Removed @module from test.

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

2023-12-21 Thread Severin Gehwolf
On Tue, 19 Dec 2023 19:14:42 GMT, Mandy Chung wrote: >> Severin Gehwolf has updated the pull request incrementally with two >> additional commits since the last revision: >> >> - Disallow packaged modules and run-time image link >> - Only check for existing path when not a scratch task >>

Re: RFR: 8275338: Add JFR events for notable serialization situations [v9]

2023-12-21 Thread Raffaello Giulietti
> Adds serialization misdeclaration events to JFR. Raffaello Giulietti has updated the pull request incrementally with one additional commit since the last revision: Removed @module from test. - Changes: - all: https://git.openjdk.org/jdk/pull/17129/files - new:

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

2023-12-21 Thread Shaojin Wen
> I submitted PR #1 before, and there were too many changes. I split it > into multiple PRs with small changes. This one is one of them. > > this PR removed the duplicate code for getChars in > BigDecimal#StringBuilderHelper, i also make performance faster. > Please review and don't

Re: RFR: 8316704: Regex-free parsing of Formatter and FormatProcessor specifiers [v6]

2023-12-21 Thread Shaojin Wen
> @cl4es made performance optimizations for the simple specifiers of > String.format in PR https://github.com/openjdk/jdk/pull/2830. Based on the > same idea, I continued to make improvements. I made patterns like %2d %02d > also be optimized. > > The following are the test results based on

Re: RFR: JDK-8322512 StringBuffer.repeat does not work correctly after toString() was called [v2]

2023-12-21 Thread Jaikiran Pai
On Wed, 20 Dec 2023 22:18:08 GMT, Jim Laskey wrote: >> The new repeat methods were not clearing the toStringCache. > > Jim Laskey has updated the pull request incrementally with one additional > commit since the last revision: > > Clear sooner The changes look good to me. I just have a