RFR: 8341585: Test java/foreign/TestUpcallStress.java should mark as /native

2024-10-05 Thread SendaoYan
Hi all, The newly added test `java/foreign/TestUpcallStress.java` call `System.loadLibrary("TestUpcall")` load native library, so this test should mark as `/native`. The change has been verified locally, trivial fix, no risk. - Commit messages: - 8341585: Test java/foreign/TestUpca

Integrated: 8340572: ConcurrentModificationException when sorting ArrayList sublists

2024-10-05 Thread Attila Szegedi
On Sun, 29 Sep 2024 17:44:30 GMT, Attila Szegedi wrote: > Fixes a regression with #17818 where `ArrayList.subList(…).sort()` started > incrementing `ArrayList.modCount` resulting in some cases throwing a > `ConcurrentModificationException` where none was thrown before. > > This change keeps th

Withdrawn: 8340571: Outline code from the loop in ZipFile.Source.initCen

2024-10-05 Thread Claes Redestad
On Mon, 23 Sep 2024 09:44:57 GMT, Claes Redestad wrote: > This PR suggests refactoring `ZipFile.Source.initCEN` to move as much logic > as possible into the per-entry method processor. This inner method will be > called often and JIT optimized earlier in the bootstrap sequence. > > Startup tes

RFR: 8341581: Optimize BytecodeHelpers validate slot

2024-10-05 Thread Shaojin Wen
Use `slot & ~0xFF == 0` instead of `(slot & 0xFF) == slot` to reduce codeSize. The following is a comparison of the bytecode before and after the modification. It can be seen that using `slot & ~0xFF == 0` will reduce one iload operation. // (slot & 0xFF) == slot 56: iload_0 57: sipush

Re: RFR: 8340887: Add micro benchmark comparing input stream performance of ZipFile vs ZipInputStream [v2]

2024-10-05 Thread Eirik Bjørsnøs
> Please review this test-only PR which adds a micro benchmark exploring > performance differences between reading entry data sequentially from a > `ZipFile` and reading the same entries using `ZipInputStream` wrapping a > `BufferedInputStream`. > > Spoiler alert: `ZipFile` streams are ~1.8 X s

Re: RFR: 8341566: Adding factory for non-synchronized CharSequence Reader

2024-10-05 Thread Markus KARG
On Sat, 5 Oct 2024 16:32:39 GMT, Markus KARG wrote: > This Pull Requests proposes an implementation for > [JDK-8341566](https://bugs.openjdk.org/browse/JDK-8341566): Adding the new > method `public static Reader Reader.of(CharSequence)` will return an > anonymous, non-synchronized implementati

RFR: 8341566: Adding factory for non-synchronized CharSequence Reader

2024-10-05 Thread Markus KARG
This Pull Requests proposes an implementation for [JDK-8341566](https://bugs.openjdk.org/browse/JDK-8341566): Adding the new method `public static Reader Reader.of(CharSequence)` will return an anonymous, non-synchronized implementation of a `Reader` for each kind of `CharSequence` implementati

Re: RFR: 8341141: Optimize DirectCodeBuilder [v23]

2024-10-05 Thread Shaojin Wen
> Some DirectCodeBuilder related optimizations to improve startup and running > performance: > 1. Merge calls, merge writeU1 and writeU2 into writeU3 > 2. Merge calls, merge writeU1 and writeIndex operations > 3. Directly use writeU1 instead of writeBytecode > 4. Rewrite the implementation of load

Re: RFR: 8341141: Optimize DirectCodeBuilder [v22]

2024-10-05 Thread Shaojin Wen
> Some DirectCodeBuilder related optimizations to improve startup and running > performance: > 1. Merge calls, merge writeU1 and writeU2 into writeU3 > 2. Merge calls, merge writeU1 and writeIndex operations > 3. Directly use writeU1 instead of writeBytecode > 4. Rewrite the implementation of load

Re: RFR: 8339205: Optimize StackMapGenerator [v4]

2024-10-05 Thread Shaojin Wen
> Reduce code size by combining calls and defining local variables Shaojin Wen has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 15 commits: - Merge branch 'master' into optim_stack_map_gen_202408 - Merge branch 'master' into optim_st

Integrated: 8341512: Optimize StackMapGenerator::processInvokeInstructions

2024-10-05 Thread Shaojin Wen
On Fri, 4 Oct 2024 02:15:51 GMT, Shaojin Wen wrote: > A small optimization for StackMapGenerator::processInvokeInstructions. > > 1. Use local currentFrame to avoid multiple getfields > 2. remove Util.methodTypeSymbol(NameAndTypeEntry) > 3. Use decStack instead of popStack to reduce array access

Running a jpackage app-image inside Flatpak

2024-10-05 Thread Mark Raynsford
Hello! I've been working on some tools to produce Flatpaks[1]. My thinking was that I could use jpackage to produce an app-image and then simply copy that app-image into a Flatpak and run it that way. This almost works, except that it seems that the actual executable produced by jpackage doesn't

Re: RFR: 8341470: BigDecimal.stripTrailingZeros() optimization [v25]

2024-10-05 Thread fabioromano1
> An optimized algorithm for `BigDecimal.stripTrailingZeros()` that uses > repeated squares trick. fabioromano1 has updated the pull request incrementally with one additional commit since the last revision: Minor change - Changes: - all: https://git.openjdk.org/jdk/pull/21323/

Re: RFR: 8341470: BigDecimal.stripTrailingZeros() optimization [v24]

2024-10-05 Thread fabioromano1
> An optimized algorithm for `BigDecimal.stripTrailingZeros()` that uses > repeated squares trick. fabioromano1 has updated the pull request incrementally with one additional commit since the last revision: Optimization - Changes: - all: https://git.openjdk.org/jdk/pull/21323/

Re: RFR: 8341470: BigDecimal.stripTrailingZeros() optimization [v23]

2024-10-05 Thread fabioromano1
> An optimized algorithm for `BigDecimal.stripTrailingZeros()` that uses > repeated squares trick. fabioromano1 has updated the pull request incrementally with one additional commit since the last revision: An optimization - Changes: - all: https://git.openjdk.org/jdk/pull/213

Re: RFR: 8341470: BigDecimal.stripTrailingZeros() optimization [v22]

2024-10-05 Thread fabioromano1
> An optimized algorithm for `BigDecimal.stripTrailingZeros()` that uses > repeated squares trick. fabioromano1 has updated the pull request incrementally with two additional commits since the last revision: - Correct documentation - Correct documentation - Changes: - all: htt

Re: RFR: 8341470: BigDecimal.stripTrailingZeros() optimization [v21]

2024-10-05 Thread fabioromano1
> An optimized algorithm for `BigDecimal.stripTrailingZeros()` that uses > repeated squares trick. fabioromano1 has updated the pull request incrementally with one additional commit since the last revision: Changed caching of powers and removed superfluous condition - Changes:

Re: RFR: 8341141: Optimize DirectCodeBuilder [v21]

2024-10-05 Thread Shaojin Wen
> Some DirectCodeBuilder related optimizations to improve startup and running > performance: > 1. Merge calls, merge writeU1 and writeU2 into writeU3 > 2. Merge calls, merge writeU1 and writeIndex operations > 3. Directly use writeU1 instead of writeBytecode > 4. Rewrite the implementation of load