Re: RFR: 8318650: Optimized subword gather for x86 targets. [v7]

2023-11-16 Thread Jatin Bhateja
On Wed, 15 Nov 2023 02:17:58 GMT, Jatin Bhateja wrote: >> Hi All, >> >> This patch optimizes sub-word gather operation for x86 targets with AVX2 and >> AVX512 features. >> >> Following is the summary of changes:- >> >> 1) Intrinsify sub-word gather with high performance backend

Re: RFR: 8318650: Optimized subword gather for x86 targets. [v7]

2023-11-16 Thread Jatin Bhateja
On Thu, 16 Nov 2023 04:07:21 GMT, Xiaohong Gong wrote: >> Jatin Bhateja has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Fix incorrect comment > > src/jdk.incubator.vector/share/classes/jdk/incubator/vector/ByteVector.java > line 3073:

Withdrawn: 8313961: Enhance identification of special serialization methods

2023-11-16 Thread duke
On Mon, 21 Aug 2023 15:46:53 GMT, Raffaello Giulietti wrote: > This improves the identification of the serialization magic fields and > methods. This pull request has been closed without being integrated. - PR: https://git.openjdk.org/jdk/pull/15364

Re: RFR: 8318364: Add an FFM-based implementation of harfbuzz OpenType layout [v6]

2023-11-16 Thread Jayathirth D V
On Thu, 16 Nov 2023 20:06:52 GMT, Phil Race wrote: >> 8318364: Add an FFM-based implementation of harfbuzz OpenType layout > > Phil Race has updated the pull request incrementally with one additional > commit since the last revision: > > 8318364 Marked as reviewed by jdv (Reviewer).

Re: RFR: 8317742: ISO Standard Date Format implementation consistency on DateTimeFormatter and String.format [v6]

2023-11-16 Thread Shaojin Wen
On Thu, 9 Nov 2023 17:15:02 GMT, Naoto Sato wrote: >> Shaojin Wen has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Use minus sign from cached DecimalFormatSymbols and improved testcase > > Looks like your fix causes a regression test

Integrated: 8319567: Update java/lang/invoke tests to support vm flags

2023-11-16 Thread Mandy Chung
On Tue, 14 Nov 2023 22:45:56 GMT, Mandy Chung wrote: > This PR includes test fixes for the following issues: > > 8319567: Update java/lang/invoke tests to support vm flags > 8319568: Update java/lang/reflect/exeCallerAccessTest/CallerAccessTest.java > to accept vm flags > 8319672: Several

Re: RFR: JDK-8266431: Dual-Pivot Quicksort improvements (Radix sort) [v11]

2023-11-16 Thread Srinivas Vamsi Parasa
On Sun, 22 Oct 2023 17:26:52 GMT, Laurent Bourgès wrote: >> * improved mixed insertion sort (makes whole sorting faster) >> * introduced Radix which sort shows several times boost of performance and >> has linear complexity instead of n*ln(n) >> * improved merging sort for almost sorted data

Re: RFR: JDK-8266431: Dual-Pivot Quicksort improvements (Radix sort) [v9]

2023-11-16 Thread Srinivas Vamsi Parasa
On Thu, 16 Nov 2023 17:33:02 GMT, Vladimir Yaroslavskiy wrote: >> Hello Vladimir (@iaroslavski) >> >> Will provide the performance data using AVX512 sort as baseline by early >> next week. >> (Friday is a holiday for us due to Veterans Day) >> >> Thanks, >> Vamsi > > Hello Vamsi

Re: RFR: JDK-8266431: Dual-Pivot Quicksort improvements (Radix sort) [v11]

2023-11-16 Thread Srinivas Vamsi Parasa
On Sun, 22 Oct 2023 17:26:52 GMT, Laurent Bourgès wrote: >> * improved mixed insertion sort (makes whole sorting faster) >> * introduced Radix which sort shows several times boost of performance and >> has linear complexity instead of n*ln(n) >> * improved merging sort for almost sorted data

Re: RFR: 8311906: Improve robustness of String constructors with mutable array inputs [v8]

2023-11-16 Thread Raffaello Giulietti
On Thu, 16 Nov 2023 20:27:11 GMT, Roger Riggs wrote: >> Strings, after construction, are immutable but may be constructed from >> mutable arrays of bytes, characters, or integers. >> The string constructors should guard against the effects of mutating the >> arrays during construction that

Re: RFR: 8310159: Bulk copy with Unsafe::arrayCopy is slower compared to memcpy [v4]

2023-11-16 Thread Steve Dohrmann
On Mon, 13 Nov 2023 08:36:44 GMT, Tobias Hartmann wrote: >> Steve Dohrmann has updated the pull request incrementally with one >> additional commit since the last revision: >> >> - fix whitespace error > > I submitted some quick testing and I'm seeing the following failure with > multiple

Re: RFR: 8310159: Bulk copy with Unsafe::arrayCopy is slower compared to memcpy [v4]

2023-11-16 Thread Steve Dohrmann
On Thu, 16 Nov 2023 05:43:11 GMT, Jatin Bhateja wrote: >> src/hotspot/cpu/x86/stubGenerator_x86_64_arraycopy.cpp line 585: >> >>> 583: __ shlq(temp2, shift); >>> 584: __ cmpq(temp2, large_threshold); >>> 585: __ jcc(Assembler::greaterEqual, L_copy_large); >> >> Hi @steveatgh , Can

Re: RFR: 8310159: Bulk copy with Unsafe::arrayCopy is slower compared to memcpy [v4]

2023-11-16 Thread Steve Dohrmann
> Below is baseline data collected using a modified version of the > java.lang.foreign.xor micro benchmark referenced by @mcimadamore in the bug > report. I collected data on an Ubuntu 22.04 laptop with a Tigerlake > i7-1185G7, which does support AVX512. > > Baseline data > Benchmark

Re: RFR: 8310159: Bulk copy with Unsafe::arrayCopy is slower compared to memcpy [v3]

2023-11-16 Thread Steve Dohrmann
> Below is baseline data collected using a modified version of the > java.lang.foreign.xor micro benchmark referenced by @mcimadamore in the bug > report. I collected data on an Ubuntu 22.04 laptop with a Tigerlake > i7-1185G7, which does support AVX512. > > Baseline data > Benchmark

Re: RFR: 8316141: Improve CEN header validation checking

2023-11-16 Thread Eirik Bjorsnos
On Thu, 9 Nov 2023 17:22:39 GMT, Lance Andersen wrote: > Regarding you comment about checking whether or not to check if the combined > length of the CEN header + name length + comment length + extra length > 65K > bytes, I chose to add this given the strong wording given this is a really >

Re: RFR: 8310159: Bulk copy with Unsafe::arrayCopy is slower compared to memcpy [v2]

2023-11-16 Thread Steve Dohrmann
> Below is baseline data collected using a modified version of the > java.lang.foreign.xor micro benchmark referenced by @mcimadamore in the bug > report. I collected data on an Ubuntu 22.04 laptop with a Tigerlake > i7-1185G7, which does support AVX512. > > Baseline data > Benchmark

Re: RFR: 8318364: Add an FFM-based implementation of harfbuzz OpenType layout [v4]

2023-11-16 Thread Jorn Vernee
On Thu, 16 Nov 2023 19:56:51 GMT, Phil Race wrote: > > > > > > layoutCnt=16000 total=193ms <<< app fully displayed > > > > > > vs > > > > > > layoutCnt=16000 total=453ms <<< app fully displayed > > > > > > > > > > > > > > > It looks strange that 16000 calls are not enough to warmup, and the >

Re: RFR: 8311906: Improve robustness of String constructors with mutable array inputs [v8]

2023-11-16 Thread Roger Riggs
> Strings, after construction, are immutable but may be constructed from > mutable arrays of bytes, characters, or integers. > The string constructors should guard against the effects of mutating the > arrays during construction that might invalidate internal invariants for the > correct

Re: RFR: 8311906: Improve robustness of String constructors with mutable array inputs [v7]

2023-11-16 Thread Roger Riggs
> Strings, after construction, are immutable but may be constructed from > mutable arrays of bytes, characters, or integers. > The string constructors should guard against the effects of mutating the > arrays during construction that might invalidate internal invariants for the > correct

Re: RFR: 8318364: Add an FFM-based implementation of harfbuzz OpenType layout [v6]

2023-11-16 Thread Phil Race
> 8318364: Add an FFM-based implementation of harfbuzz OpenType layout Phil Race has updated the pull request incrementally with one additional commit since the last revision: 8318364 - Changes: - all: https://git.openjdk.org/jdk/pull/15476/files - new:

Re: RFR: 8318364: Add an FFM-based implementation of harfbuzz OpenType layout [v4]

2023-11-16 Thread Phil Race
On Wed, 15 Nov 2023 15:06:55 GMT, Jayathirth D V wrote: >> Phil Race has updated the pull request incrementally with one additional >> commit since the last revision: >> >> indentation > > src/java.desktop/share/classes/sun/font/HBShaper.java line 66: > >> 64: * }; >> 65: */ >>

Re: RFR: 8318364: Add an FFM-based implementation of harfbuzz OpenType layout [v4]

2023-11-16 Thread Phil Race
On Thu, 16 Nov 2023 19:35:53 GMT, Jorn Vernee wrote: > > > > > layoutCnt=16000 total=193ms <<< app fully displayed > > > > > vs > > > > > layoutCnt=16000 total=453ms <<< app fully displayed > > > > > > > > > > > > It looks strange that 16000 calls are not enough to warmup, and the > > > >

Re: RFR: 8318364: Add an FFM-based implementation of harfbuzz OpenType layout [v4]

2023-11-16 Thread Jorn Vernee
On Thu, 16 Nov 2023 01:54:29 GMT, Sergey Bylokhov wrote: > > > > So we have somewhere around a fixed 125ms startup cost for the FFM case > > > > - as measured on my Mac, > > > > but only 35-40ms of that is attributable to the specific needs of > > > > layout. > > > > > > > > > That looks

Re: RFR: 8318364: Add an FFM-based implementation of harfbuzz OpenType layout [v5]

2023-11-16 Thread Phil Race
> 8318364: Add an FFM-based implementation of harfbuzz OpenType layout Phil Race has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 21 commits: - Merge remote-tracking branch 'upstream/master' into harfbuzz_panama Merge -

Re: RFR: 8318966: Some methods make promises about Java array element alignment that are too strong

2023-11-16 Thread Jorn Vernee
On Thu, 16 Nov 2023 06:29:20 GMT, Alan Bateman wrote: >> See the JBS issue for an extended problem description. >> >> This patch changes the specification and implementation of >> `MethodHandles::byteArrayViewVarHandle`, >> `MethodHandles::byteBufferViewVarHandle`, `ByteBuffer::alignedSlice`,

RFR: 8318966: Some methods make promises about Java array element alignment that are too strong

2023-11-16 Thread Jorn Vernee
See the JBS issue for an extended problem description. This patch changes the specification and implementation of `MethodHandles::byteArrayViewVarHandle`, `MethodHandles::byteBufferViewVarHandle`, `ByteBuffer::alignedSlice`, and `ByteBuffer::alignmentOffset` to weaken the guarantees they make

Re: RFR: 8318966: Some methods make promises about Java array element alignment that are too strong

2023-11-16 Thread Alan Bateman
On Wed, 15 Nov 2023 22:46:03 GMT, Jorn Vernee wrote: > See the JBS issue for an extended problem description. > > This patch changes the specification and implementation of > `MethodHandles::byteArrayViewVarHandle`, > `MethodHandles::byteBufferViewVarHandle`, `ByteBuffer::alignedSlice`, and

Re: RFR: 8318966: Some methods make promises about Java array element alignment that are too strong

2023-11-16 Thread Maurizio Cimadamore
On Thu, 16 Nov 2023 17:34:40 GMT, Paul Sandoz wrote: >> See the JBS issue for an extended problem description. >> >> This patch changes the specification and implementation of >> `MethodHandles::byteArrayViewVarHandle`, >> `MethodHandles::byteBufferViewVarHandle`, `ByteBuffer::alignedSlice`,

Re: RFR: 8318966: Some methods make promises about Java array element alignment that are too strong

2023-11-16 Thread Maurizio Cimadamore
On Thu, 16 Nov 2023 19:15:25 GMT, Jorn Vernee wrote: >> But... surely if I'm just accessing bytes the access cannot possibly be >> mis-aligned? > > Right. I think there is a difference between 'unaligned' and 'misaligned'. > Unaligned means there is no effort made to align the access (so it

Re: RFR: 8318966: Some methods make promises about Java array element alignment that are too strong

2023-11-16 Thread Jorn Vernee
On Thu, 16 Nov 2023 17:31:46 GMT, Paul Sandoz wrote: >> See the JBS issue for an extended problem description. >> >> This patch changes the specification and implementation of >> `MethodHandles::byteArrayViewVarHandle`, >> `MethodHandles::byteBufferViewVarHandle`, `ByteBuffer::alignedSlice`,

Re: RFR: 8318966: Some methods make promises about Java array element alignment that are too strong

2023-11-16 Thread Jorn Vernee
On Thu, 16 Nov 2023 18:52:03 GMT, Maurizio Cimadamore wrote: >> src/java.base/share/classes/java/lang/invoke/MethodHandles.java line 4610: >> >>> 4608: * {@link Double#doubleToRawLongBits}, respectively). >>> 4609: * >>> 4610: * Access to heap byte buffers is always unaligned.

Re: RFR: 8318966: Some methods make promises about Java array element alignment that are too strong

2023-11-16 Thread Jorn Vernee
On Wed, 15 Nov 2023 22:46:03 GMT, Jorn Vernee wrote: > See the JBS issue for an extended problem description. > > This patch changes the specification and implementation of > `MethodHandles::byteArrayViewVarHandle`, > `MethodHandles::byteBufferViewVarHandle`, `ByteBuffer::alignedSlice`, and

Re: RFR: 8318966: Some methods make promises about Java array element alignment that are too strong

2023-11-16 Thread Paul Sandoz
On Wed, 15 Nov 2023 22:46:03 GMT, Jorn Vernee wrote: > See the JBS issue for an extended problem description. > > This patch changes the specification and implementation of > `MethodHandles::byteArrayViewVarHandle`, > `MethodHandles::byteBufferViewVarHandle`, `ByteBuffer::alignedSlice`, and

Re: RFE: support safely wrapping restricted FFM calls

2023-11-16 Thread Rob Spoor
On 16/11/2023 18:15, Maurizio Cimadamore wrote: On 16/11/2023 16:54, Rob Spoor wrote: Hi Maurizio, I don't think you understand what my module is doing. For instance, it's not specifying the downcall method handles themselves, it's just making it easy to define them. Maybe a small example

Re: RFR: 8319928: Exceptions thrown by cleanup actions should be handled correctly [v5]

2023-11-16 Thread Jorn Vernee
On Thu, 16 Nov 2023 18:38:54 GMT, Maurizio Cimadamore wrote: >> This simplePR tweaks the factory which wraps custom cleanup actions passed >> to `MemorySegment::reinterpret`, so that any exception thrown by the custom >> cleanup is swallowed when the arena is closed. >> >> This aligns the

Re: RFR: JDK-8315457 Implementation of String Templates (Second Preview) [v7]

2023-11-16 Thread Jim Laskey
> Update String Templates for a second preview. With the addition of > > - Expression type and throws are determined from the `process` method of the > processor type and not the processor type. > > - Qualified `STR` and `RAW` are treated the same as unqualified `STR` and > `RAW` . > > - Raw

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

2023-11-16 Thread Mandy Chung
On Thu, 16 Nov 2023 18:30:46 GMT, Severin Gehwolf wrote: > > We need to go through each plugin and decide on its behavior. > > OK. I'll add documentation to the `--list-plugins` help should there be > deviations. It'd be helpful if you write down your proposed behavior for each plugin for

Re: RFR: 8319928: Exceptions thrown by cleanup actions should be handled correctly [v3]

2023-11-16 Thread Jorn Vernee
On Thu, 16 Nov 2023 18:24:44 GMT, Maurizio Cimadamore wrote: >> This simplePR tweaks the factory which wraps custom cleanup actions passed >> to `MemorySegment::reinterpret`, so that any exception thrown by the custom >> cleanup is swallowed when the arena is closed. >> >> This aligns the

Re: RFR: 8319928: Exceptions thrown by cleanup actions should be handled correctly [v5]

2023-11-16 Thread Maurizio Cimadamore
> This simplePR tweaks the factory which wraps custom cleanup actions passed to > `MemorySegment::reinterpret`, so that any exception thrown by the custom > cleanup is swallowed when the arena is closed. > > This aligns the behavior of confined/shared session with that of implicit > session

Re: RFR: 8319928: Exceptions thrown by cleanup actions should be handled correctly [v3]

2023-11-16 Thread Maurizio Cimadamore
On Thu, 16 Nov 2023 18:27:36 GMT, Jorn Vernee wrote: >> Maurizio Cimadamore has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Address CSR comments > > src/java.base/share/classes/jdk/internal/foreign/MemorySessionImpl.java line > 266: >

Re: RFR: 8319928: Exceptions thrown by cleanup actions should be handled correctly [v4]

2023-11-16 Thread Maurizio Cimadamore
> This simplePR tweaks the factory which wraps custom cleanup actions passed to > `MemorySegment::reinterpret`, so that any exception thrown by the custom > cleanup is swallowed when the arena is closed. > > This aligns the behavior of confined/shared session with that of implicit > session

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

2023-11-16 Thread Severin Gehwolf
On Tue, 14 Nov 2023 15:21:47 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 >>

Re: RFR: 8319567: Update java/lang/invoke tests to support vm flags [v3]

2023-11-16 Thread Leonid Mesnik
On Thu, 16 Nov 2023 18:20:04 GMT, Mandy Chung wrote: >> This PR includes test fixes for the following issues: >> >> 8319567: Update java/lang/invoke tests to support vm flags >> 8319568: Update java/lang/reflect/exeCallerAccessTest/CallerAccessTest.java >> to accept vm flags >> 8319672:

Re: RFR: 8319928: Exceptions thrown by cleanup actions should be handled correctly [v3]

2023-11-16 Thread Maurizio Cimadamore
On Thu, 16 Nov 2023 18:24:44 GMT, Maurizio Cimadamore wrote: >> This simplePR tweaks the factory which wraps custom cleanup actions passed >> to `MemorySegment::reinterpret`, so that any exception thrown by the custom >> cleanup is swallowed when the arena is closed. >> >> This aligns the

Re: RFR: 8319928: Exceptions thrown by cleanup actions should be handled correctly [v3]

2023-11-16 Thread Maurizio Cimadamore
> This simplePR tweaks the factory which wraps custom cleanup actions passed to > `MemorySegment::reinterpret`, so that any exception thrown by the custom > cleanup is swallowed when the arena is closed. > > This aligns the behavior of confined/shared session with that of implicit > session

Re: RFR: JDK-8266431: Dual-Pivot Quicksort improvements (Radix sort) [v9]

2023-11-16 Thread Srinivas Vamsi Parasa
On Thu, 9 Nov 2023 18:12:36 GMT, Srinivas Vamsi Parasa wrote: >> Hello @PaulSandoz and @AlanBateman ! >> >> Did you have time to look at the latest benchmarking? > > Hello Vladimir (@iaroslavski) > > Will provide the performance data using AVX512 sort as baseline by early next > week. >

Re: RFR: 8319567: Update java/lang/invoke tests to support vm flags [v2]

2023-11-16 Thread Mandy Chung
On Thu, 16 Nov 2023 18:09:20 GMT, Leonid Mesnik wrote: >> Mandy Chung has updated the pull request incrementally with one additional >> commit since the last revision: >> >> review feedback > > test/jdk/jdk/modules/incubator/DefaultImage.java line 113: > >> 111: PrintStream ps = new

Re: RFR: 8319567: Update java/lang/invoke tests to support vm flags [v3]

2023-11-16 Thread Mandy Chung
> This PR includes test fixes for the following issues: > > 8319567: Update java/lang/invoke tests to support vm flags > 8319568: Update java/lang/reflect/exeCallerAccessTest/CallerAccessTest.java > to accept vm flags > 8319672: Several classloader tests ignore VM flags > 8319676: A couple of

Re: RFR: 8303374: Compiler Implementation for Primitive types in patterns, instanceof, and switch (Preview) [v30]

2023-11-16 Thread Aggelos Biboudis
> This is the proposed patch for Primitive types in patterns, instanceof, and > switch (Preview). > > Draft spec here: > https://cr.openjdk.org/~abimpoudis/instanceof/jep455-20231030/specs/instanceof-jls.html Aggelos Biboudis has updated the pull request with a new target base due to a merge

Re: RFR: 8319567: Update java/lang/invoke tests to support vm flags [v2]

2023-11-16 Thread Leonid Mesnik
On Wed, 15 Nov 2023 02:39:56 GMT, Mandy Chung wrote: >> This PR includes test fixes for the following issues: >> >> 8319567: Update java/lang/invoke tests to support vm flags >> 8319568: Update java/lang/reflect/exeCallerAccessTest/CallerAccessTest.java >> to accept vm flags >> 8319672:

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

2023-11-16 Thread Andrey Turbanov
> A few classes in `sun.util` package have non-final fields which could easily > be marked `final`. Andrey Turbanov has updated the pull request incrementally with one additional commit since the last revision: 8316557: Make fields final in 'sun.util' package "First Day" is the first

new JEP: DeepClone API

2023-11-16 Thread Birke Heeren
idea (How do I learn to do this?) clazz deepclone = new DeepClone().do(object_to_be_copied); class DeepClone clazz do (clazz object_to_be_copied) { return new PerlDecoder().do(new PerlEncoder().do(object_to_be_copied)); } JSON can be cloned by copying perl deepclones through JSON all

Re: RFR: JDK-8266431: Dual-Pivot Quicksort improvements (Radix sort) [v9]

2023-11-16 Thread Vladimir Yaroslavskiy
On Thu, 9 Nov 2023 18:12:36 GMT, Srinivas Vamsi Parasa wrote: >> Hello @PaulSandoz and @AlanBateman ! >> >> Did you have time to look at the latest benchmarking? > > Hello Vladimir (@iaroslavski) > > Will provide the performance data using AVX512 sort as baseline by early next > week. >

Re: RFE: support safely wrapping restricted FFM calls

2023-11-16 Thread Maurizio Cimadamore
On 16/11/2023 16:54, Rob Spoor wrote: Hi Maurizio, I don't think you understand what my module is doing. For instance, it's not specifying the downcall method handles themselves, it's just making it easy to define them. Maybe a small example would show what I'm doing. Consider the

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

2023-11-16 Thread Naoto Sato
On Thu, 16 Nov 2023 08:56:05 GMT, Andrey Turbanov wrote: >> A few classes in `sun.util` package have non-final fields which could easily >> be marked `final`. > > Andrey Turbanov has updated the pull request incrementally with one > additional commit since the last revision: > > 8316557:

Re: RFR: 8310159: Bulk copy with Unsafe::arrayCopy is slower compared to memcpy

2023-11-16 Thread Steve Dohrmann
On Thu, 16 Nov 2023 09:49:00 GMT, Andrew Haley wrote: >> Thanks for the clarification, agree behavior is similar to non-NT case, in >> fact using NT for huge copy operations will prevent polluting caches due to >> destination cache line fills. > > But won't it also cause performance

Integrated: 8320199: Fix HTML 5 errors in java.math.BigInteger

2023-11-16 Thread Brian Burkhalter
On Wed, 15 Nov 2023 21:59:56 GMT, Brian Burkhalter wrote: > Clean up HTML error due to nested anchor (``) elements. This pull request has now been integrated. Changeset: 9727f4bd Author:Brian Burkhalter URL:

Re: RFE: support safely wrapping restricted FFM calls

2023-11-16 Thread Rob Spoor
Hi Maurizio, I don't think you understand what my module is doing. For instance, it's not specifying the downcall method handles themselves, it's just making it easy to define them. Maybe a small example would show what I'm doing. Consider the following partial interface from JNA:

Re: RFR: 8311906: Improve robustness of String constructors with mutable array inputs [v6]

2023-11-16 Thread Roger Riggs
> Strings, after construction, are immutable but may be constructed from > mutable arrays of bytes, characters, or integers. > The string constructors should guard against the effects of mutating the > arrays during construction that might invalidate internal invariants for the > correct

Re: RFE: support safely wrapping restricted FFM calls

2023-11-16 Thread Alan Bateman
On 15/11/2023 17:13, Rob Spoor wrote: Hello all, I'm working on a module that makes working with FFM easier; think of something like JNA. For instance, it allows creating structures without having to manually manage var handles etc. My module uses restricted mehods like

RFR: 8320208: Update Public Suffix List to b5bf572

2023-11-16 Thread Weijun Wang
Update `public_suffix_list.dat` to the latest. - Commit messages: - initial change Changes: https://git.openjdk.org/jdk/pull/16692/files Webrev: https://webrevs.openjdk.org/?repo=jdk=16692=00 Issue: https://bugs.openjdk.org/browse/JDK-8320208 Stats: 3002 lines in 4 files

Re: RFR: JDK-8315458 Implement JEP 463: Implicitly Declared Classes and Instance Main Method (Second Preview) [v20]

2023-11-16 Thread Jim Laskey
> Address changes from JEP 445 to JEP 463. > > - Move from a SYNTHETIC unnamed class to a MANDATED implicit class. > > - Don't mark class on read. > > - Remove reflection and annotation processing related to unnamed classes. > > - Simplify main method search. Jim Laskey has updated the pull

Re: RFR: 8317834: java/lang/Thread/IsAlive.java timed out [v2]

2023-11-16 Thread Aleksey Shipilev
On Tue, 14 Nov 2023 17:25:42 GMT, Darragh Clarke wrote: >> Currently the `IsAlive` test occasionally times out. >> >> This PR changes the timeout from `10` to `25` which I think is an adequate >> increase based on the failures I've seen. Though I'd be happy to change it >> to another value if

Re: RFR: 8312425: [vectorapi] AArch64: Optimize vector math operations with SLEEF [v3]

2023-11-16 Thread Magnus Ihse Bursie
On Wed, 15 Nov 2023 01:32:00 GMT, Xiaohong Gong wrote: >> Currently the vector floating-point math APIs like >> `VectorOperators.SIN/COS/TAN...` are not intrinsified on AArch64 platform, >> which causes large performance gap on AArch64. Note that those APIs are >> optimized by C2 compiler on

Re: RFR: 8312425: [vectorapi] AArch64: Optimize vector math operations with SLEEF [v3]

2023-11-16 Thread Magnus Ihse Bursie
On Wed, 15 Nov 2023 01:32:00 GMT, Xiaohong Gong wrote: >> Currently the vector floating-point math APIs like >> `VectorOperators.SIN/COS/TAN...` are not intrinsified on AArch64 platform, >> which causes large performance gap on AArch64. Note that those APIs are >> optimized by C2 compiler on

Re: RFR: 8312425: [vectorapi] AArch64: Optimize vector math operations with SLEEF [v3]

2023-11-16 Thread Magnus Ihse Bursie
On Wed, 15 Nov 2023 01:32:00 GMT, Xiaohong Gong wrote: >> Currently the vector floating-point math APIs like >> `VectorOperators.SIN/COS/TAN...` are not intrinsified on AArch64 platform, >> which causes large performance gap on AArch64. Note that those APIs are >> optimized by C2 compiler on

Re: RFR: JDK-8319626: Override toString() for ZipFile [v2]

2023-11-16 Thread Bernd
On Wed, 15 Nov 2023 18:33:47 GMT, Justin Lu wrote: >> Please review this PR and [CSR](https://bugs.openjdk.org/browse/JDK-8319982) >> which overrides and provides an implementation of `toString()` in >> _java.util.zip.ZipFile_ (and by extension, _java.util.jar.JarFile_). >> >> This change is

Re: RFR: 8320222: Wrong bytecode accepted, and StackMap table generated

2023-11-16 Thread Chen Liang
On Thu, 16 Nov 2023 10:00:44 GMT, Adam Sotona wrote: > Stack map generator in ClassFile API performs only minimal checks in favour > of performance. > However it led to situations where it generates invalid stack maps for > corrupted code. > This patch adds basic checks of stack when two

Re: RFR: JDK-8319626: Override toString() for ZipFile [v2]

2023-11-16 Thread Pavel Rappo
On Thu, 16 Nov 2023 11:19:39 GMT, Pavel Rappo wrote: >> src/java.base/share/classes/java/util/zip/ZipFile.java line 494: >> >>> 492: @Override >>> 493: public String toString() { >>> 494: return "" + name + >>> Integer.toHexString(System.identityHashCode(this)); >> >> This

Re: RFR: JDK-8319626: Override toString() for ZipFile [v2]

2023-11-16 Thread Pavel Rappo
On Thu, 16 Nov 2023 11:03:30 GMT, Alan Bateman wrote: >> Justin Lu has updated the pull request incrementally with one additional >> commit since the last revision: >> >> reflect review: change string value and drop spec > > src/java.base/share/classes/java/util/zip/ZipFile.java line 494: >

Re: RFR: JDK-8319626: Override toString() for ZipFile [v2]

2023-11-16 Thread Alan Bateman
On Wed, 15 Nov 2023 18:33:47 GMT, Justin Lu wrote: >> Please review this PR and [CSR](https://bugs.openjdk.org/browse/JDK-8319982) >> which overrides and provides an implementation of `toString()` in >> _java.util.zip.ZipFile_ (and by extension, _java.util.jar.JarFile_). >> >> This change is

Re: RFR: 8311906: Improve robustness of String constructors with mutable array inputs [v4]

2023-11-16 Thread Claes Redestad
On Thu, 16 Nov 2023 10:05:14 GMT, Tobias Hartmann wrote: >> No, we don't mix: the SSE code is used as fallback only when the length is >> below 32 (if length is above 32 we check the tail with AVX code by >> shifting). >> >> I would suggest factoring out so that the implementations don't mix

RFR: 8320222: Wrong bytecode accepted, and StackMap table generated

2023-11-16 Thread Adam Sotona
Stack map generator in ClassFile API performs only minimal checks in favour of performance. However it led to situations where it generates invalid stack maps for corrupted code. This patch adds basic checks of stack when two frames are merged and throws an exception in case of stack size or

Re: RFR: 8311906: Improve robustness of String constructors with mutable array inputs [v4]

2023-11-16 Thread Tobias Hartmann
On Thu, 16 Nov 2023 09:31:57 GMT, Claes Redestad wrote: >>> This cause a crash if I run with -XX:UseAVX=3 -XX:AVX3Threshold=0: >> >> Good catch! Do we have a test for that scenario? If not, one should be added. >> >>> Alternatively [...] >> >> I would suggest to use `jmp(copy_chars_loop)`

Re: RFR: 8310159: Bulk copy with Unsafe::arrayCopy is slower compared to memcpy

2023-11-16 Thread Andrew Haley
On Thu, 16 Nov 2023 05:38:30 GMT, Jatin Bhateja wrote: >> The results a concurrent reader sees could be different if the copy is using >> nt writes, but if the read of the destination is not synced with the copy >> operation, I think the reader would not see consistent state in either case.

Re: RFR: 8311906: Improve robustness of String constructors with mutable array inputs [v5]

2023-11-16 Thread Raffaello Giulietti
On Wed, 15 Nov 2023 22:15:54 GMT, Roger Riggs wrote: >> Strings, after construction, are immutable but may be constructed from >> mutable arrays of bytes, characters, or integers. >> The string constructors should guard against the effects of mutating the >> arrays during construction that

Re: RFR: 8311906: Improve robustness of String constructors with mutable array inputs [v4]

2023-11-16 Thread Claes Redestad
On Thu, 16 Nov 2023 08:59:25 GMT, Tobias Hartmann wrote: >> Alternatively: >> >> if (UseSSE42Intrinsics) { >> jmpb(copy_chars_loop); >> } else { >> jmp(copy_chars_loop); >> } >> >> >> More generally I do wonder if it'd make most sense to make the AVX512 and >> SSE42 implementations

Re: RFR: 8319872: AArch64: [vectorapi] Implementation of unsigned (zero extended) casts [v2]

2023-11-16 Thread Andrew Haley
On Thu, 16 Nov 2023 08:44:26 GMT, Eric Liu wrote: >> Vector API defines zero-extend operations [1], which are going to be >> intrinsified and generated to `VectorUCastNode` by C2. This patch adds >> backend implementation for `VectorUCastNode` on AArch64. >> >> The micro benchmark shows

Re: RFR: 8311906: Improve robustness of String constructors with mutable array inputs [v4]

2023-11-16 Thread Tobias Hartmann
On Wed, 15 Nov 2023 15:40:49 GMT, Claes Redestad wrote: >> src/hotspot/cpu/x86/macroAssembler_x86.cpp line 8617: >> >>> 8615: lea(dst, Address(dst, tmp5, Address::times_1)); >>> 8616: subptr(len, tmp5); >>> 8617: jmpb(copy_chars_loop); >> >> This cause a crash if I run with

Re: RFR: 8311906: Improve robustness of String constructors with mutable array inputs [v5]

2023-11-16 Thread Raffaello Giulietti
On Wed, 15 Nov 2023 22:15:54 GMT, Roger Riggs wrote: >> Strings, after construction, are immutable but may be constructed from >> mutable arrays of bytes, characters, or integers. >> The string constructors should guard against the effects of mutating the >> arrays during construction that

Re: RFR: 8311906: Improve robustness of String constructors with mutable array inputs [v4]

2023-11-16 Thread Raffaello Giulietti
On Wed, 15 Nov 2023 15:25:21 GMT, Raffaello Giulietti wrote: >> Roger Riggs has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Update PPC implementation of string_compress to return the index of the >> non-latin1 char >> Patch supplied

Re: RFR: 8311906: Improve robustness of String constructors with mutable array inputs [v4]

2023-11-16 Thread Raffaello Giulietti
On Wed, 15 Nov 2023 22:08:19 GMT, Roger Riggs wrote: >> test/jdk/java/lang/String/StringRacyConstructor.java line 190: >> >>> 188: if (printWarningCount == 0) { >>> 189: printWarningCount = 1; >>> 190:

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

2023-11-16 Thread Andrey Turbanov
> A few classes in `sun.util` package have non-final fields which could easily > be marked `final`. Andrey Turbanov has updated the pull request incrementally with one additional commit since the last revision: 8316557: Make fields final in 'sun.util' package rename 'firstDay' to

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

2023-11-16 Thread Andrey Turbanov
On Mon, 13 Nov 2023 11:40:27 GMT, Per Minborg wrote: >> Andrey Turbanov has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 8316557: Make fields final in 'sun.util' package >> >> rename 'firstDay' to 'firstDays' to match 'minDays'

Re: RFR: 8319872: AArch64: [vectorapi] Implementation of unsigned (zero extended) casts [v2]

2023-11-16 Thread Eric Liu
On Wed, 15 Nov 2023 15:24:11 GMT, Andrew Haley wrote: >> Eric Liu has updated the pull request incrementally with one additional >> commit since the last revision: >> >> update m4 >> >> Change-Id: I82bf5f9384f79e09965a0498ad2de45cec6f0a29 > > src/hotspot/cpu/aarch64/aarch64_vector_ad.m4

Re: RFR: 8319872: AArch64: [vectorapi] Implementation of unsigned (zero extended) casts [v2]

2023-11-16 Thread Eric Liu
> Vector API defines zero-extend operations [1], which are going to be > intrinsified and generated to `VectorUCastNode` by C2. This patch adds > backend implementation for `VectorUCastNode` on AArch64. > > The micro benchmark shows significant performance improvement. In my test > machine

Re: RFR: 8319123: Implement JEP 461: Stream Gatherers (Preview) [v10]

2023-11-16 Thread Viktor Klang
> This Pull-Request implements [JEP-461](https://openjdk.org/jeps/461) Viktor Klang has updated the pull request incrementally with one additional commit since the last revision: Clarifying that Stream#gather is a stateful intermediate operation - Changes: - all:

Re: RFR: 8319123: Implement JEP 461: Stream Gatherers (Preview) [v9]

2023-11-16 Thread Viktor Klang
On Thu, 16 Nov 2023 07:51:46 GMT, Alan Bateman wrote: >> Viktor Klang has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Improvements after feedback > > Really nicely done. @AlanBateman @PaulSandoz Thank you so much! I just pushed a minor