Re: RFR: 8294982: Implementation of Classfile API [v15]

2023-02-14 Thread Adam Sotona
On Thu, 9 Feb 2023 12:54:42 GMT, Maurizio Cimadamore wrote: >> Adam Sotona has updated the pull request incrementally with one additional >> commit since the last revision: >> >> AttributeElement.Kind removal (#48) > >

Re: RFR: 8299748: java/util/zip/Deinflate.java failing on s390x

2023-02-14 Thread Amit Kumar
On Tue, 14 Feb 2023 20:08:47 GMT, Alan Bateman wrote: >I don't think we have a good handle on the issue. It's clear that this zlib >implementation is a bit different but I'm concerned that your proposed change >to the test is masking an issue. I say this because the check method is >changed

Re: RFR: JDK-8302026: Port fdlibm inverse trig functions (asin, acos, atan) to Java [v2]

2023-02-14 Thread Joe Darcy
> Proceeding down the line of FDLIBM functions to be ported, next up are asin, > acos, and atan. > > Diffs of the various versions will follow in a separate message. > > There were no unusual coding idioms encountered in porting these methods. Joe Darcy has updated the pull request

Re: RFR: JDK-8301444: Port fdlibm hyperbolic transcendental functions to Java [v10]

2023-02-14 Thread Joe Darcy
> Initial pass of porting FDLIBM sinh/cosh/tanh to Java. I do intend to > refactor the regression tests a bit to reduce duplication, but the actual > ports should be ready for review. > > Diff'ing the ports as before, original vs transliteration port: > > > $ diff -w Hyperbolic.c

Re: RFR: 8301873: Avoid string decoding in ZipFile.Source.getEntryPos [v12]

2023-02-14 Thread Lance Andersen
On Tue, 14 Feb 2023 11:49:23 GMT, Eirik Bjorsnos wrote: >> After finding a hash match, getEntryPos needs to compare the lookup name up >> to the encoded entry name in the CEN. This comparison is done by decoding >> the entry name into a String. The names can then be compared using the >>

Re: RFR: 8301873: Avoid string decoding in ZipFile.Source.getEntryPos [v9]

2023-02-14 Thread Eirik Bjorsnos
On Tue, 14 Feb 2023 11:21:36 GMT, Lance Andersen wrote: >> The message is already validated using `expectedExceptionsMessageRegExp` in >> the `@Test` annotation. >> >> Would you prefer if I use expectThrows instead, or perhaps inline the >> `BAD_ENTRY_NAME_OR_COMMENT` constant as a literal? >

Re: RFR: JDK-8300808: Accelerate Base64 on x86 for AVX2 [v17]

2023-02-14 Thread Sandhya Viswanathan
On Tue, 14 Feb 2023 22:41:47 GMT, Claes Redestad wrote: >> Scott Gibbons has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Last of review comments > > I've started tier1-5 testing internally. Will let you know if we find any > issues.

Re: RFR: JDK-8301460: Clean up LambdaForm to reference BasicType enums directly [v2]

2023-02-14 Thread Jorn Vernee
On Tue, 14 Feb 2023 19:30:27 GMT, Mandy Chung wrote: >> `LambdaForm` declares int constants for `BasicType::ordinal` to workaround >> JDK-8161245. Now these int constants are no longer needed.This removes >> these int constants and reference `BasicType` enums directly. > > Mandy Chung

Re: RFR: JDK-8300808: Accelerate Base64 on x86 for AVX2 [v17]

2023-02-14 Thread Claes Redestad
On Tue, 14 Feb 2023 18:22:32 GMT, Scott Gibbons wrote: >> Added code for Base64 acceleration (encode and decode) which will accelerate >> ~4x for AVX2 platforms. >> >> Encode performance: >> **Old:** >> >> Benchmark (maxNumBytes) Mode Cnt Score Error >> Units

Integrated: 8302260: VarHandle.describeConstable() fails to return a nominal descriptor for static public fields

2023-02-14 Thread Mandy Chung
On Mon, 13 Feb 2023 19:35:52 GMT, Mandy Chung wrote: > I overlooked in the fix for JDK-8297757 that it should have passed the > declaring class of the static fields rather than the reference class passed > to `Lookup::findStaticVarHandle`. This pull request has now been integrated.

Re: RFR: 8301226: Add clamp() methods to java.lang.Math and to StrictMath [v8]

2023-02-14 Thread Karl T
On Tue, 7 Feb 2023 12:53:25 GMT, Tagir F. Valeev wrote: >> clamp() methods added to Math and StrictMath >> >> `int clamp(long, int, int)` is somewhat different, as it accepts a `long` >> value and safely clamps it to an `int` range. Other overloads work with a >> particular type (long, float

Re: RFR: 8302260: VarHandle.describeConstable() fails to return a nominal descriptor for static public fields

2023-02-14 Thread Paul Sandoz
On Mon, 13 Feb 2023 19:35:52 GMT, Mandy Chung wrote: > I overlooked in the fix for JDK-8297757 that it should have passed the > declaring class of the static fields rather than the reference class passed > to `Lookup::findStaticVarHandle`. Marked as reviewed by psandoz (Reviewer).

Re: RFR: 8302325: Wrong comment in java.base/share/native/libjimage/imageFile.hpp [v3]

2023-02-14 Thread Jim Laskey
On Tue, 14 Feb 2023 19:30:19 GMT, Severin Gehwolf wrote: >> Could I please get a review of this trivial comment-only change? >> `imageFile.hpp` >> describes some properties of the jimage file `lib/modules`. However, I don't >> think >> the comment example matches current code in the JDK. >>

Re: RFR: 8301226: Add clamp() methods to java.lang.Math and to StrictMath [v8]

2023-02-14 Thread Karl T
On Tue, 14 Feb 2023 20:13:03 GMT, Tagir F. Valeev wrote: > Finally, I find it extremely strange to use var to hide the type and name the > variable as `longValue2`, encoding the type inside variable name. This is just an example name to document the type of the var for this post. 

Re: RFR: 8293667: Align jlink's --compress option with jmod's --compress option [v6]

2023-02-14 Thread Mandy Chung
On Wed, 8 Feb 2023 23:07:14 GMT, Ian Graves wrote: >> This is an approach to adding a flag to jlink that will allow --compress to >> take the same types of arguments as jmod, thus bringing the two into >> alignment. This likely requires a CSR and a discussion on whether we should >> deprecate

Re: RFR: 8301226: Add clamp() methods to java.lang.Math and to StrictMath [v8]

2023-02-14 Thread Tagir F . Valeev
On Tue, 7 Feb 2023 12:53:25 GMT, Tagir F. Valeev wrote: >> clamp() methods added to Math and StrictMath >> >> `int clamp(long, int, int)` is somewhat different, as it accepts a `long` >> value and safely clamps it to an `int` range. Other overloads work with a >> particular type (long, float

Re: RFR: 8299748: java/util/zip/Deinflate.java failing on s390x

2023-02-14 Thread Alan Bateman
On Tue, 7 Feb 2023 07:07:54 GMT, Alan Bateman wrote: >>> Hi @AlanBateman , >>> with latest changes (doing inflate/deinflate) test passes over s390 and x86 >>> as well. Please take a look now. >> >> Good. One thing to try is to just deflate/inflate into out1/out2, no need >> for the

Re: RFR: 8301226: Add clamp() methods to java.lang.Math and to StrictMath [v8]

2023-02-14 Thread Karl T
On Tue, 7 Feb 2023 12:53:25 GMT, Tagir F. Valeev wrote: >> clamp() methods added to Math and StrictMath >> >> `int clamp(long, int, int)` is somewhat different, as it accepts a `long` >> value and safely clamps it to an `int` range. Other overloads work with a >> particular type (long, float

Re: RFR: JDK-8301460: Clean up LambdaForm to reference BasicType enums directly [v2]

2023-02-14 Thread Mandy Chung
On Tue, 14 Feb 2023 10:50:12 GMT, Jorn Vernee wrote: >> Mandy Chung 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 three additional >> commits

Re: RFR: JDK-8301460: Clean up LambdaForm to reference BasicType enums directly [v2]

2023-02-14 Thread Mandy Chung
On Tue, 14 Feb 2023 11:16:26 GMT, Sergey Tsypanov wrote: >> Mandy Chung 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 three additional >>

Re: RFR: JDK-8301460: Clean up LambdaForm to reference BasicType enums directly [v2]

2023-02-14 Thread Mandy Chung
> `LambdaForm` declares int constants for `BasicType::ordinal` to workaround > JDK-8161245. Now these int constants are no longer needed.This removes > these int constants and reference `BasicType` enums directly. Mandy Chung has updated the pull request with a new target base due to a

Re: RFR: 8302325: Wrong comment in java.base/share/native/libjimage/imageFile.hpp [v2]

2023-02-14 Thread Severin Gehwolf
On Tue, 14 Feb 2023 18:10:11 GMT, Jim Laskey wrote: >> Got it. How about we change this comment from: >> >> // - Even though ATTRIBUTE_END is used to mark the end of the attribute >> stream, >> // streams will contain zero byte values to represent lesser >> significant bits. >> //

Re: RFR: 8302325: Wrong comment in java.base/share/native/libjimage/imageFile.hpp [v2]

2023-02-14 Thread Severin Gehwolf
On Tue, 14 Feb 2023 17:18:00 GMT, Jim Laskey wrote: >> Severin Gehwolf 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 three additional >>

Re: RFR: 8302325: Wrong comment in java.base/share/native/libjimage/imageFile.hpp [v3]

2023-02-14 Thread Severin Gehwolf
> Could I please get a review of this trivial comment-only change? > `imageFile.hpp` > describes some properties of the jimage file `lib/modules`. However, I don't > think > the comment example matches current code in the JDK. >

Re: RFR: 8301627: System.exit and Runtime.exit debug logging [v4]

2023-02-14 Thread Stuart Marks
On Tue, 14 Feb 2023 18:56:29 GMT, Roger Riggs wrote: >> It can be difficult to find the cause of calls to >> `java.lang.System.exit(status)` and `Runtime.exit(status)` because the Java >> runtime exits. >> The status value and stack trace are logged using the System Logger named >>

Re: RFR: JDK-8300808: Accelerate Base64 on x86 for AVX2 [v17]

2023-02-14 Thread Sandhya Viswanathan
On Tue, 14 Feb 2023 18:22:32 GMT, Scott Gibbons wrote: >> Added code for Base64 acceleration (encode and decode) which will accelerate >> ~4x for AVX2 platforms. >> >> Encode performance: >> **Old:** >> >> Benchmark (maxNumBytes) Mode Cnt Score Error >> Units

Re: RFR: 8301627: System.exit and Runtime.exit debug logging [v4]

2023-02-14 Thread Roger Riggs
> It can be difficult to find the cause of calls to > `java.lang.System.exit(status)` and `Runtime.exit(status)` because the Java > runtime exits. > The status value and stack trace are logged using the System Logger named > `java.lang.Runtime` with message level `System.Logger.Level.DEBUG`.

Re: RFR: JDK-8300808: Accelerate Base64 on x86 for AVX2 [v17]

2023-02-14 Thread Scott Gibbons
> Added code for Base64 acceleration (encode and decode) which will accelerate > ~4x for AVX2 platforms. > > Encode performance: > **Old:** > > Benchmark (maxNumBytes) Mode Cnt Score Error > Units > Base64Encode.testBase64Encode 1024 thrpt3

Re: RFR: 8302325: Wrong comment in java.base/share/native/libjimage/imageFile.hpp [v2]

2023-02-14 Thread Jim Laskey
On Tue, 14 Feb 2023 18:01:44 GMT, Severin Gehwolf wrote: >> I meant that an attribute can have zeros in the non-header portion of the >> attribute data. > > Got it. How about we change this comment from: > > // - Even though ATTRIBUTE_END is used to mark the end of the attribute > stream, >

Re: RFR: 8301627: System.exit and Runtime.exit debug logging [v3]

2023-02-14 Thread Roger Riggs
On Tue, 14 Feb 2023 17:15:28 GMT, Daniel Fuchs wrote: >> Roger Riggs has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Add an @implNote to Runtime.exit to describe the java.lang.Runtime logging. > >

Re: RFR: 8302325: Wrong comment in java.base/share/native/libjimage/imageFile.hpp [v2]

2023-02-14 Thread Severin Gehwolf
On Tue, 14 Feb 2023 17:17:53 GMT, Jim Laskey wrote: >> To me it sounded like it wanted to say: Since the `ATTRIBUTE_END` isn't a >> full byte (only 5 bits in a byte), it might be represented as a non-zero >> value. For example a byte containing `0x07` would equally be `ATTRIBUTE_END` >> as

Re: RFR: JDK-8300808: Accelerate Base64 on x86 for AVX2 [v15]

2023-02-14 Thread Sandhya Viswanathan
On Tue, 14 Feb 2023 15:19:34 GMT, Claes Redestad wrote: >> Why? There is no performance difference and the intent is clear. Is this >> just a "style" thing? > > I think with `lessEqual` we'll jump to `L_tailProc` for the final 32-byte > chunk in inputs that are divisible by 32 (starting from

Re: RFR: JDK-8300808: Accelerate Base64 on x86 for AVX2 [v15]

2023-02-14 Thread Sandhya Viswanathan
On Tue, 14 Feb 2023 15:03:49 GMT, Scott Gibbons wrote: >> src/hotspot/cpu/x86/stubGenerator_x86_64.cpp line 2658: >> >>> 2656: // Check for buffer too small (for algorithm) >>> 2657: __ subl(length, 0x2c); >>> 2658: __ jcc(Assembler::lessEqual, L_tailProc); >> >> This could be

Convert CorruptedZipFiles to testNG

2023-02-14 Thread Eirik Bjørsnøs
Hi! CorruptedZipFiles could benefit from some modernization and a conversion to testNG: https://github.com/openjdk/jdk/pull/12563 Thanks, Eirik.

Re: RFR: 8302325: Wrong comment in java.base/share/native/libjimage/imageFile.hpp [v2]

2023-02-14 Thread Jim Laskey
On Tue, 14 Feb 2023 17:10:32 GMT, Severin Gehwolf wrote: >> @JimLaskey OK. Perhaps we can be clearer what is meant here exactly. I was >> having a hard time deciphering this. It does say `stream will contain zero >> byte values to represent lesser significant bits`. **What** are "byte values

Re: RFR: 8302325: Wrong comment in java.base/share/native/libjimage/imageFile.hpp [v2]

2023-02-14 Thread Jim Laskey
On Tue, 14 Feb 2023 14:46:58 GMT, Severin Gehwolf wrote: >> Could I please get a review of this trivial comment-only change? >> `imageFile.hpp` >> describes some properties of the jimage file `lib/modules`. However, I don't >> think >> the comment example matches current code in the JDK. >>

Re: RFR: 8302325: Wrong comment in java.base/share/native/libjimage/imageFile.hpp [v2]

2023-02-14 Thread Severin Gehwolf
On Tue, 14 Feb 2023 16:59:03 GMT, Severin Gehwolf wrote: >> src/java.base/share/native/libjimage/imageFile.hpp line 218: >> >>> 216: // Notes: >>> 217: // - Even though ATTRIBUTE_END is used to mark the end of the >>> attribute stream, >>> 218: // streams will contain non-zero byte

Re: RFR: 8302325: Wrong comment in java.base/share/native/libjimage/imageFile.hpp [v2]

2023-02-14 Thread Severin Gehwolf
On Tue, 14 Feb 2023 16:47:15 GMT, Jim Laskey wrote: >> Severin Gehwolf 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 three additional >>

Re: RFR: 8302325: Wrong comment in java.base/share/native/libjimage/imageFile.hpp [v2]

2023-02-14 Thread Jim Laskey
On Tue, 14 Feb 2023 14:46:58 GMT, Severin Gehwolf wrote: >> Could I please get a review of this trivial comment-only change? >> `imageFile.hpp` >> describes some properties of the jimage file `lib/modules`. However, I don't >> think >> the comment example matches current code in the JDK. >>

Re: RFR: 8301627: System.exit and Runtime.exit debug logging [v3]

2023-02-14 Thread Roger Riggs
> It can be difficult to find the cause of calls to > `java.lang.System.exit(status)` and `Runtime.exit(status)` because the Java > runtime exits. > The status value and stack trace are logged using the System Logger named > `java.lang.Runtime` with message level `System.Logger.Level.DEBUG`.

Re: RFR: 8302325: Wrong comment in java.base/share/native/libjimage/imageFile.hpp [v2]

2023-02-14 Thread Alan Bateman
On Tue, 14 Feb 2023 10:40:31 GMT, Alan Bateman wrote: >> Severin Gehwolf 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 three additional >>

Re: RFR: 8298619: java/io/File/GetXSpace.java is failing

2023-02-14 Thread Brian Burkhalter
On Sun, 12 Feb 2023 09:34:37 GMT, Alan Bateman wrote: >>> It seems a bit fragile to be parsing the output of `fsutil volume diskFree` >>> as the output seems to vary by Windows releases and maybe configuration. So >>> minimally, I think it should be changed to use ProcessTools so that the >>>

Integrated: 8297632: InputStream.transferTo() method should specify what the return value should be when the number of bytes transfered is larger than Long.MAX_VALUE

2023-02-14 Thread Brian Burkhalter
On Tue, 29 Nov 2022 00:56:58 GMT, Brian Burkhalter wrote: > `java.io.InputStream::transferTo` could conceivably return a negative value > if the count of bytes transferred overflows a `long`. Modify the method to > limit the number of bytes transferred to `Long.MAX_VALUE` per invocation. This

Re: RFR: JDK-8300808: Accelerate Base64 on x86 for AVX2 [v15]

2023-02-14 Thread Claes Redestad
On Tue, 14 Feb 2023 15:03:50 GMT, Scott Gibbons wrote: >> src/hotspot/cpu/x86/stubGenerator_x86_64.cpp line 2699: >> >>> 2697: __ addptr(dest, 0x18); >>> 2698: __ subl(length, 0x20); >>> 2699: __ jcc(Assembler::lessEqual, L_tailProc); >> >> This could be Assembler::less instead of

Re: RFR: JDK-8300808: Accelerate Base64 on x86 for AVX2 [v15]

2023-02-14 Thread Scott Gibbons
On Tue, 14 Feb 2023 01:48:37 GMT, Sandhya Viswanathan wrote: >> Scott Gibbons has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Add URL to microbenchmark > > src/hotspot/cpu/x86/stubGenerator_x86_64.cpp line 2399: > >> 2397:

Re: RFR: 8302325: Wrong comment in java.base/share/native/libjimage/imageFile.hpp [v2]

2023-02-14 Thread Severin Gehwolf
On Tue, 14 Feb 2023 10:40:31 GMT, Alan Bateman wrote: >> Severin Gehwolf 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 three additional >>

Re: RFR: 8302325: Wrong comment in java.base/share/native/libjimage/imageFile.hpp [v2]

2023-02-14 Thread Severin Gehwolf
> Could I please get a review of this trivial comment-only change? > `imageFile.hpp` > describes some properties of the jimage file `lib/modules`. However, I don't > think > the comment example matches current code in the JDK. >

Re: RFR: 8205592: BigDecimal.doubleValue() is depressingly slow

2023-02-14 Thread Andriy Plokhotnyuk
On Tue, 14 Feb 2023 14:07:22 GMT, Raffaello Giulietti wrote: >> Sorry, I overlooked those checks two times :) >> >> How about adding a moderate path like >>

RFR: 8302158: PPC: test/jdk/jdk/internal/vm/Continuation/Fuzz.java: AssertionError: res: false shouldPin: false

2023-02-14 Thread Richard Reingruber
This fixes the linked issue by trimming the caller of a frame to be deoptimized back to its `unextended_sp` iff it is compiled. The creation of the section `dead after deoptimization` shown in the attachment

Re: RFR: 8205592: BigDecimal.doubleValue() is depressingly slow

2023-02-14 Thread Raffaello Giulietti
On Tue, 14 Feb 2023 08:02:08 GMT, Andriy Plokhotnyuk wrote: >> A reimplementation of `BigDecimal.[double|float]Value()` to enhance >> performance, avoiding an intermediate string and its subsequent parsing on >> the slow path. > > Sorry, I overlooked those checks two times :) > > How about

Re: RFR: 8302325: Wrong comment in java.base/share/native/libjimage/imageFile.hpp

2023-02-14 Thread Severin Gehwolf
On Tue, 14 Feb 2023 10:40:31 GMT, Alan Bateman wrote: > Can you update the end date of the copyright headers as this is the first > change in 2023. imageFile.cpp by missed by the other change so it could be > done here too. Absolutely! Thanks for the review. - PR:

Re: RFR: JDK-8302026: Port fdlibm inverse trig functions (asin, acos, atan) to Java

2023-02-14 Thread Raffaello Giulietti
On Mon, 13 Feb 2023 22:03:14 GMT, Joe Darcy wrote: > Proceeding down the line of FDLIBM functions to be ported, next up are asin, > acos, and atan. > > Diffs of the various versions will follow in a separate message. > > There were no unusual coding idioms encountered in porting these

Re: RFR: 8301627: System.exit and Runtime.exit debug logging [v2]

2023-02-14 Thread Daniel Fuchs
On Tue, 14 Feb 2023 07:45:07 GMT, Alan Bateman wrote: >> FINE is not a level supported by the System.Logger, it is the level to which >> DEBUG is mapped when the backend is java.util.logging. I suggest to remove >> FINE from this description and add an `{@link Loger.Level#DEBUG DEBUG}` >>

Re: RFR: 8302260: VarHandle.describeConstable() fails to return a nominal descriptor for static public fields

2023-02-14 Thread Alan Bateman
On Mon, 13 Feb 2023 19:35:52 GMT, Mandy Chung wrote: > I overlooked in the fix for JDK-8297757 that it should have passed the > declaring class of the static fields rather than the reference class passed > to `Lookup::findStaticVarHandle`. Looks right and you've added good test coverage.

Re: RFR: 8301873: Avoid string decoding in ZipFile.Source.getEntryPos [v12]

2023-02-14 Thread Eirik Bjorsnos
> After finding a hash match, getEntryPos needs to compare the lookup name up > to the encoded entry name in the CEN. This comparison is done by decoding the > entry name into a String. The names can then be compared using the String > API. This decoding step adds a significat cost to this

Re: RFR: 8301873: Avoid string decoding in ZipFile.Source.getEntryPos [v9]

2023-02-14 Thread Lance Andersen
On Tue, 14 Feb 2023 08:47:15 GMT, Eirik Bjorsnos wrote: >> test/jdk/java/util/zip/ZipFile/InvalidBytesInEntryNameOrComment.java line 90: >> >>> 88: expectedExceptionsMessageRegExp = BAD_ENTRY_NAME_OR_COMMENT) >>> 89: public void shouldRejectInvalidName() throws IOException { >>>

Re: RFR: JDK-8301460: Clean up LambdaForm to reference BasicType enums directly

2023-02-14 Thread Sergey Tsypanov
On Mon, 13 Feb 2023 22:05:15 GMT, Mandy Chung wrote: > `LambdaForm` declares int constants for `BasicType::ordinal` to workaround > JDK-8161245. Now these int constants are no longer needed.This removes > these int constants and reference `BasicType` enums directly.

Re: RFR: JDK-8301460: Clean up LambdaForm to reference BasicType enums directly

2023-02-14 Thread Jorn Vernee
On Mon, 13 Feb 2023 22:05:15 GMT, Mandy Chung wrote: > `LambdaForm` declares int constants for `BasicType::ordinal` to workaround > JDK-8161245. Now these int constants are no longer needed.This removes > these int constants and reference `BasicType` enums directly.

Re: RFR: JDK-8300808: Accelerate Base64 on x86 for AVX2 [v15]

2023-02-14 Thread Claes Redestad
On Fri, 10 Feb 2023 23:18:47 GMT, Claes Redestad wrote: >> Scott Gibbons has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Add URL to microbenchmark > > Marked as reviewed by redestad (Reviewer). > @cl4es Can you please initiate the

Re: RFR: 8302325: Wrong comment in java.base/share/native/libjimage/imageFile.hpp

2023-02-14 Thread Alan Bateman
On Mon, 13 Feb 2023 14:12:15 GMT, Severin Gehwolf wrote: > Could I please get a review of this trivial comment-only change? > `imageFile.hpp` > describes some properties of the jimage file `lib/modules`. However, I don't > think > the comment example matches current code in the JDK. >

Re: RFR: 8301873: Avoid string decoding in ZipFile.Source.getEntryPos [v10]

2023-02-14 Thread Eirik Bjorsnos
> After finding a hash match, getEntryPos needs to compare the lookup name up > to the encoded entry name in the CEN. This comparison is done by decoding the > entry name into a String. The names can then be compared using the String > API. This decoding step adds a significat cost to this

Integrated: 8302337: JDK crashes if lib/modules contains non-zero byte containing ATTRIBUTE_END

2023-02-14 Thread Severin Gehwolf
On Mon, 13 Feb 2023 16:57:17 GMT, Severin Gehwolf wrote: > The `jimage` location attributes are terminated with `ATTRIBUTE_END`-kinds. > However, > the byte containing `ATTRIBUTE_END` (most significant 5 bits, represent > `kind`), might > be non-zero in the lower 3 bits (values up to `0x07`

Re: RFR: 8301873: Avoid string decoding in ZipFile.Source.getEntryPos [v10]

2023-02-14 Thread Eirik Bjorsnos
On Tue, 14 Feb 2023 08:34:15 GMT, Eirik Bjorsnos wrote: >> After finding a hash match, getEntryPos needs to compare the lookup name up >> to the encoded entry name in the CEN. This comparison is done by decoding >> the entry name into a String. The names can then be compared using the >>

Re: RFR: 8302337: JDK crashes if lib/modules contains non-zero byte containing ATTRIBUTE_END

2023-02-14 Thread Severin Gehwolf
On Mon, 13 Feb 2023 16:57:17 GMT, Severin Gehwolf wrote: > The `jimage` location attributes are terminated with `ATTRIBUTE_END`-kinds. > However, > the byte containing `ATTRIBUTE_END` (most significant 5 bits, represent > `kind`), might > be non-zero in the lower 3 bits (values up to `0x07`

Re: RFR: 8302337: JDK crashes if lib/modules contains non-zero byte containing ATTRIBUTE_END

2023-02-14 Thread Severin Gehwolf
On Mon, 13 Feb 2023 19:50:24 GMT, Alan Bateman wrote: > The change looks good, I'm just curious whether you observed a crash or > whether this was noticed by inspection. Noticed by exploration. Changed the java code on the jlink side and observed the crash. - PR:

Re: RFR: 8302163: Speed up various String comparison methods with ArraysSupport.mismatch [v2]

2023-02-14 Thread Claes Redestad
On Mon, 13 Feb 2023 16:43:12 GMT, Eirik Bjorsnos wrote: > Case-insensitive regionMatches could be improved by using > ArraysSupport.mismatch to skip over long common substrings: I considered this but saw regressions similar to what you're getting for size = 6 and backed off. I think this

Re: RFR: 8301873: Avoid string decoding in ZipFile.Source.getEntryPos [v11]

2023-02-14 Thread Eirik Bjorsnos
> After finding a hash match, getEntryPos needs to compare the lookup name up > to the encoded entry name in the CEN. This comparison is done by decoding the > entry name into a String. The names can then be compared using the String > API. This decoding step adds a significat cost to this

Re: RFR: 8301873: Avoid string decoding in ZipFile.Source.getEntryPos [v9]

2023-02-14 Thread Eirik Bjorsnos
On Mon, 13 Feb 2023 20:20:22 GMT, Lance Andersen wrote: >> Eirik Bjorsnos has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Revert accidental removal of UTF8ZipCoder.compare > >

Re: RFR: 8301873: Avoid string decoding in ZipFile.Source.getEntryPos [v9]

2023-02-14 Thread Eirik Bjorsnos
On Mon, 13 Feb 2023 20:00:51 GMT, Lance Andersen wrote: >> Eirik Bjorsnos has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Revert accidental removal of UTF8ZipCoder.compare > > src/java.base/share/classes/java/util/zip/ZipCoder.java line

Re: RFR: 8205592: BigDecimal.doubleValue() is depressingly slow

2023-02-14 Thread Andriy Plokhotnyuk
On Thu, 7 Jul 2022 15:20:32 GMT, Raffaello Giulietti wrote: > A reimplementation of `BigDecimal.[double|float]Value()` to enhance > performance, avoiding an intermediate string and its subsequent parsing on > the slow path. Sorry, I failed to recognize those checks two times :) How about