RFR: 8301834: Templated Buffer classes leave a lot of empty lines in the generated source

2023-02-05 Thread Jaikiran Pai
Can I please get a review for this change which proposes to fix the issue noted in https://bugs.openjdk.org/browse/JDK-8301834? Some classes in `java.nio` package are generated from template files, during the build. The template files are processed by a build tool implemented by a Java class `m

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

2023-02-05 Thread Jatin Bhateja
On Wed, 1 Feb 2023 19:07:17 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: JEP415: FilterInThread Example

2023-02-05 Thread Roger Riggs
Hi Heinz, Indeed, this example is not intuitive and does not do what was intended and could use a better explanation. The interaction of three filters gets complicated and their combination depends on the ordering and intention of each filter and the particular filter factory goal. The Filte

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

2023-02-05 Thread Quan Anh Mai
On Sun, 5 Feb 2023 13:52:23 GMT, Tagir F. Valeev wrote: >> src/java.base/share/classes/java/lang/Math.java line 2297: >> >>> 2295: */ >>> 2296: public static float clamp(float value, float min, float max) { >>> 2297: if (!(min < max)) { >> >> Wouldn't it be more simple to repla

Re: RFR: 8301737: java/rmi/server/UnicastRemoteObject/serialFilter/FilterUROTest.java fail with -Xcomp

2023-02-05 Thread SUN Guoyun
On Fri, 3 Feb 2023 15:52:09 GMT, Daniel Fuchs wrote: >> Hi all, >> When -Xcomp be used, java thread to block for longer, then causing this test >> failed frequently on the AArch64 and LoongArch64 architecture. >> >> This PR fix the issue, Please help review it. >> >> Thanks. > > test/jdk/java/

Re: RFR: JDK-8301833: Add manual tests for FDLIBM porting

2023-02-05 Thread Joe Darcy
On Mon, 6 Feb 2023 01:50:55 GMT, Joe Darcy wrote: > To help add assurances that the main-line port of FDLIBM to Java is working > correctly, added some long-running manual tests to probe that the > transliteration port and the corresponding StrictMath method are in agreement > on a large numbe

Re: RFR: 8293198: [vectorapi] Improve the implementation of VectorMask.indexInRange() [v2]

2023-02-05 Thread Xiaohong Gong
On Fri, 3 Feb 2023 02:03:14 GMT, Jatin Bhateja wrote: >> Xiaohong Gong has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Add smaller array size for benchmark tests > > LGTM Thanks for the review @jatin-bhateja @merykitty ! -

RFR: JDK-8301833: Add manual tests for FDLIBM porting

2023-02-05 Thread Joe Darcy
To help add assurances that the main-line port of FDLIBM to Java is working correctly, added some long-running manual tests to probe that the transliteration port and the corresponding StrictMath method are in agreement on a large number of argument, say, all float values. To test the translite

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

2023-02-05 Thread Claes Redestad
On Thu, 2 Feb 2023 15:33:29 GMT, Scott Gibbons wrote: >> Names are important, but always hard to get right. At the very least they >> need to be correct. Maybe call it something like >> `..parameterized_decode_tables..` and the other `..shared_decode_tables..`? > > I prefer leaving them the way

Re: RFR: JDK-8301621: libzip should use pread instead of lseek+read

2023-02-05 Thread Alan Bateman
On Fri, 3 Feb 2023 19:49:44 GMT, Justin King wrote: > Avoid using `lseek` + `read` in favor of `pread`. For Windows, we can do the > same thing by using `OVERLAPPED`, as we are in synchronous mode we can use > `Offset` and `OffsetHigh` to achieve the same thing. > > Additionally I updated open

Re: RFR: 8301578: Perform output outside synchronization in Module.class [v3]

2023-02-05 Thread ExE Boss
On Wed, 1 Feb 2023 08:51:16 GMT, Per Minborg wrote: >> This PR proposed to reduce contention in synchronized methods mainly by >> doing I/O operations outside synch blocks. > > Per Minborg has updated the pull request incrementally with three additional > commits since the last revision: > >

Re: RFR: 8301578: Perform output outside synchronization in Module.class [v3]

2023-02-05 Thread ExE Boss
On Wed, 1 Feb 2023 07:52:25 GMT, Per Minborg wrote: >> src/java.base/share/classes/java/lang/Module.java line 281: >> >>> 279: >>> 280: private static boolean isNativeAccessEnabled(Module target) { >>> 281: if (target.enableNativeAccess) >> >> @minborg It'd seem a bit easier to imp

Re: RFR: 8301220: Return value of toArray() of Сollection types from java.base should be trusted [v3]

2023-02-05 Thread ExE Boss
On Mon, 30 Jan 2023 03:13:01 GMT, Glavo wrote: > > > > Why not use set of classes? > > > > > > > > > Because some classes are not visible here (such as `Arrays.ArrayList`). > > > I'm not sure what the best choice is, so I'm trying to explore the > > > implementation plan. > > > > > > Only `A

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

2023-02-05 Thread ExE Boss
On Sat, 4 Feb 2023 21:34:50 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 a

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

2023-02-05 Thread ExE Boss
On Sun, 5 Feb 2023 13:52:23 GMT, Tagir F. Valeev wrote: >> src/java.base/share/classes/java/lang/Math.java line 2297: >> >>> 2295: */ >>> 2296: public static float clamp(float value, float min, float max) { >>> 2297: if (!(min < max)) { >> >> Wouldn't it be more simple to repla

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

2023-02-05 Thread Tagir F . Valeev
On Sun, 5 Feb 2023 13:45:15 GMT, Sergey Tsypanov wrote: >> Tagir F. Valeev has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Typo in doc fixed > > src/java.base/share/classes/java/lang/Math.java line 2297: > >> 2295: */ >> 2296:

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

2023-02-05 Thread Sergey Tsypanov
On Sat, 4 Feb 2023 21:34:50 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 a