Re: Proposal: track zlib native memory usage with NMTThomas Stüfe thomas.stuefe at gmail.com

2023-03-22 Thread Thomas Stüfe
I always meant to ask, why is it that we chose to dedicate the beginning of > the memory chunk to NMT, and not the end? > > If we used the end, then in this case with an unbalanced malloc/free, we > would still be OK. > > The end seems more natural to me and either way we need to track the size, >

Re: RFR: 8284871: Use covariant overrides for the resolveConstantDesc(Lookup) method in sub‑interfaces of java.lang.constant.ConstantDesc

2023-03-22 Thread Chen Liang
On Sat, 11 Mar 2023 04:59:07 GMT, Chen Liang wrote: > Also remove redundant casts to avoid javac warnings. Please review this minor patch introducing covariant overrides to make usage of `ClassDesc::resolveConstantDesc` and `MethodTypeDesc::resolveConstantDesc` easier. - PR Comme

Re: RFR: 8303930: Fix ConstantUtils.skipOverFieldSignature void case return value [v3]

2023-03-22 Thread Chen Liang
On Tue, 21 Mar 2023 20:21:23 GMT, Chen Liang wrote: >> This typo doesn't allow creation of malformed ClassDesc or MethodTypeDesc, >> but it produces an erroneous exception on certain inputs. Running >> `java.lang.constant.MethodTypeDesc.ofDescriptor("(I[[[V)I")` in Jshell >> 19.0.2 throws

Re: RFR: 8304450: [vectorapi] Refactor VectorShuffle implementation [v3]

2023-03-22 Thread Xiaohong Gong
On Wed, 22 Mar 2023 08:09:03 GMT, Xiaohong Gong wrote: >> Quan Anh Mai has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - missing casts >> - clean up > > Please also update the copyright to 2023 for some touched files like > `vectorSupp

Re: RFR: 8304450: [vectorapi] Refactor VectorShuffle implementation [v4]

2023-03-22 Thread Xiaohong Gong
On Wed, 22 Mar 2023 12:42:15 GMT, Quan Anh Mai wrote: >> src/hotspot/share/opto/vectorIntrinsics.cpp line 2059: >> >>> 2057: if (need_load_shuffle) { >>> 2058: shuffle = gvn().transform(new VectorLoadShuffleNode(shuffle, vt)); >>> 2059: } >> >> How about generating `VectorLoadShuffleNod

Re: RFR: 8304006: jlink should create the jimage file in the native endian for the target platform [v10]

2023-03-22 Thread Jaikiran Pai
On Tue, 21 Mar 2023 18:55:17 GMT, Mandy Chung wrote: >> src/jdk.jlink/share/classes/jdk/tools/jlink/internal/Platform.java line 192: >> >>> 190: case "s390x" -> Architecture.s390x; >>> 191: case "sparc" -> Architecture.SPARC; >>> 192: case

Re: RFR: 8304006: jlink should create the jimage file in the native endian for the target platform [v12]

2023-03-22 Thread Jaikiran Pai
On Thu, 23 Mar 2023 01:46:47 GMT, Jaikiran Pai wrote: >> Can I please get a review for this change which proposes to fix the issue >> reported in https://bugs.openjdk.org/browse/JDK-8206890? >> >> The `jlink` command allows a `--endian` option to specify the byte order in >> the generated imag

Re: RFR: 8304006: jlink should create the jimage file in the native endian for the target platform [v10]

2023-03-22 Thread Jaikiran Pai
On Tue, 21 Mar 2023 19:02:21 GMT, Mandy Chung wrote: >> Jaikiran Pai has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Alan's suggestions - don't parse arch out of osname-arch for determining >> endianness and reduce the number of support

Re: RFR: JDK-8285932 Implementation of JEP 430 String Templates (Preview) [v46]

2023-03-22 Thread Chen Liang
On Mon, 20 Mar 2023 20:31:46 GMT, Jim Laskey wrote: >> Enhance the Java programming language with string templates, which are >> similar to string literals but contain embedded expressions. A string >> template is interpreted at run time by replacing each expression with the >> result of evalu

Re: RFR: JDK-8285932 Implementation of JEP 430 String Templates (Preview) [v3]

2023-03-22 Thread Chen Liang
On Fri, 28 Oct 2022 20:05:22 GMT, Rémi Forax wrote: >> Disagree. > > As i said above, i consider this thread as resolved Suggestion: * to {@value #MAX_INDY_CONCAT_ARG_SLOTS}. - PR Review Comment: https://git.openjdk.org/jdk/pull/10889#discussion_r1145511120

Re: RFR: 8304006: jlink should create the jimage file in the native endian for the target platform [v12]

2023-03-22 Thread Jaikiran Pai
> Can I please get a review for this change which proposes to fix the issue > reported in https://bugs.openjdk.org/browse/JDK-8206890? > > The `jlink` command allows a `--endian` option to specify the byte order in > the generated image. Before this change, when such a image was being > launche

Re: RFR: 8304006: jlink should create the jimage file in the native endian for the target platform [v10]

2023-03-22 Thread Jaikiran Pai
On Tue, 21 Mar 2023 18:07:30 GMT, Mandy Chung wrote: >> Jaikiran Pai has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Alan's suggestions - don't parse arch out of osname-arch for determining >> endianness and reduce the number of support

Re: RFR: 8304450: [vectorapi] Refactor VectorShuffle implementation [v4]

2023-03-22 Thread Xiaohong Gong
On Wed, 22 Mar 2023 12:39:27 GMT, Quan Anh Mai wrote: >> src/hotspot/share/opto/vectorIntrinsics.cpp line 2426: >> >>> 2424: if (is_vector_shuffle(vbox_klass_from)) { >>> 2425: return false; // vector shuffles aren't supported >>> 2426: } >> >> Is it better to change this as an "asserti

Re: RFR: 8304006: jlink should create the jimage file in the native endian for the target platform [v11]

2023-03-22 Thread Jaikiran Pai
> Can I please get a review for this change which proposes to fix the issue > reported in https://bugs.openjdk.org/browse/JDK-8206890? > > The `jlink` command allows a `--endian` option to specify the byte order in > the generated image. Before this change, when such a image was being > launche

Re: RFR: 8304691: Remove jlink --post-process-path option [v4]

2023-03-22 Thread Ian Graves
> Removing the hidden `jlink --post-process-path` option. Ian Graves has updated the pull request incrementally with one additional commit since the last revision: Removing post process opt reference - Changes: - all: https://git.openjdk.org/jdk/pull/13126/files - new: https:

Re: RFR: 8303923: ZipOutStream::putEntry should include an apiNote to indicate that the STORED compression method should be used when writing directory entries [v3]

2023-03-22 Thread jmehrens
On Sun, 19 Mar 2023 14:50:41 GMT, Eirik Bjorsnos wrote: >> ZipOutputStream currently writes directory entries using the DEFLATED >> compression method. This does not strictly comply with the APPNOTE.TXT >> specification and is also about 10x slower than using the STORED compression >> method.

Re: RFR: 8304031: Classfile API cannot encode Primitive Class as Condy [v3]

2023-03-22 Thread Chen Liang
> Without this patch, the Classfile API tries to encode PrimitiveClassDesc as > CONSTANT_Class_info and error in `toInternalName`. Chen Liang has updated the pull request incrementally with one additional commit since the last revision: PrimitiveClassConstantTest check the other 2 API endpoin

Re: RFR: 8266571: Sequenced Collections

2023-03-22 Thread Stuart Marks
On Tue, 21 Mar 2023 12:39:18 GMT, Chen Liang wrote: > I am interested in the optimization potential of > `arraylist.reversed().addAll()` and similar batch operations. Though reverse > list/deque views are a good start, I still wish to see customized > implementations for `reversed` to perform

Re: RFR: 8303214: Typo in java.util.Collections#synchronizedNavigableMap javadoc

2023-03-22 Thread Stuart Marks
On Wed, 14 Dec 2022 17:43:08 GMT, nbauma109 wrote: > I think this is a typo Marked as reviewed by smarks (Reviewer). Agreed that there is no need for CSR. This is just a typo. Reviewed. - PR Review: https://git.openjdk.org/jdk/pull/11679#pullrequestreview-1353554321 PR Comment: ht

Re: RFR: 8303485: Replacing os.name for operating system customization [v4]

2023-03-22 Thread Naoto Sato
On Tue, 14 Mar 2023 18:21:33 GMT, Roger Riggs wrote: >> Improvements to support OS specific customization for JDK internal use: >> - To select values and code; allowing elimination of unused code and values >> - Optionally evaluated by build processes, compilation, or archiving (i.e. >> CDS) >

Re: Proposal: track zlib native memory usage with NMTThomas Stüfe thomas.stuefe at gmail.com

2023-03-22 Thread Gerard Ziemski
> Hi all, > > I am currently working on https://bugs.openjdk.org/browse/JDK-8296360; I > was preparing the final PR [1], but then Alan did ask me to discuss this on > core-libs first. > > Backstory: > > NMT tracks hotspot native allocations but does not cover the JDK libraries > (small exception

Re: RFR: 8303392: Runtime.exec and ProcessBuilder.start should use System logger [v7]

2023-03-22 Thread Sean Mullan
On Tue, 14 Mar 2023 18:08:08 GMT, Roger Riggs wrote: >> Runtime.exec and ProcessBuilder.start methods create a new operating system >> process with the program and arguments. Many applications configure a >> logging subsystem to monitor application events. Logging a process start >> message wi

Re: RFR: 8284493: Improve computeNextExponential tail performance and accuracy [v17]

2023-03-22 Thread Chris Hennick
> This PR improves both the worst-case performance of `nextExponential` and > `nextGaussian` and the distribution of output at the tails. It fixes the > following imperfections: > > * Repeatedly adding DoubleZigguratTables.exponentialX0 to extra causes a > rounding error to accumulate at the ta

Re: RFR: 8284493: Improve computeNextExponential tail performance and accuracy [v16]

2023-03-22 Thread Chris Hennick
On Wed, 22 Mar 2023 19:23:37 GMT, Eirik Bjorsnos wrote: >> Chris Hennick has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Add parameter to enable/disable fixed PRNG seed > > Chris, copyrights in your new (2021?) and updated (2022?) files

Re: RFR: 8303485: Replacing os.name for operating system customization [v4]

2023-03-22 Thread Roger Riggs
On Tue, 14 Mar 2023 18:21:33 GMT, Roger Riggs wrote: >> Improvements to support OS specific customization for JDK internal use: >> - To select values and code; allowing elimination of unused code and values >> - Optionally evaluated by build processes, compilation, or archiving (i.e. >> CDS) >

Re: RFR: 8304691: Remove jlink --post-process-path option [v3]

2023-03-22 Thread Ian Graves
On Wed, 22 Mar 2023 19:57:51 GMT, Mandy Chung wrote: >> Ian Graves has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Removing leftover properties > > src/jdk.jlink/share/classes/jdk/tools/jlink/internal/JlinkTask.java line 392: > >> 390:

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v8]

2023-03-22 Thread Maurizio Cimadamore
On Wed, 22 Mar 2023 19:25:05 GMT, Jorn Vernee wrote: >> Note: this text was just copied/adapted from toplevel javadoc and moved >> here. I think we have to say something about `null` as the text refers to >> `null` being passed as parameter to the returned MH, which is NOT covered by >> the pa

Re: RFR: 8304691: Remove jlink --post-process-path option [v3]

2023-03-22 Thread Ian Graves
> Removing the hidden `jlink --post-process-path` option. Ian Graves has updated the pull request incrementally with one additional commit since the last revision: Removing leftover properties - Changes: - all: https://git.openjdk.org/jdk/pull/13126/files - new: https://git.o

Re: RFR: 8304691: Remove jlink --post-process-path option [v2]

2023-03-22 Thread Mandy Chung
On Wed, 22 Mar 2023 16:25:51 GMT, Ian Graves wrote: >> Removing the hidden `jlink --post-process-path` option. > > Ian Graves has updated the pull request incrementally with one additional > commit since the last revision: > > Updates per feedback `test/jdk/tools/lib/tests/JImageGenerator` r

Re: RFR: 8303214: Typo in java.util.Collections#synchronizedNavigableMap javadoc

2023-03-22 Thread Jaikiran Pai
On Thu, 9 Feb 2023 06:13:51 GMT, nbauma109 wrote: >> I think this is a typo > > need help with progressing this pull request towards integration Hello @nbauma109, have you signed the OCA? If not, please follow the instructions in this comment https://github.com/openjdk/jdk/pull/11679#issuecomm

Re: RFR: 8303214: Typo in java.util.Collections#synchronizedNavigableMap javadoc

2023-03-22 Thread Andrey Turbanov
On Wed, 14 Dec 2022 17:43:08 GMT, nbauma109 wrote: > I think this is a typo Filled https://bugs.openjdk.org/browse/JDK-8303214 Please change PR title to `8303214: Typo in java.util.Collections#synchronizedNavigableMap javadoc` - PR Comment: https://git.openjdk.org/jdk/pull/11679#i

Re: RFR: 8303214: Typo in java.util.Collections#synchronizedNavigableMap javadoc

2023-03-22 Thread SWinxy
On Wed, 14 Dec 2022 17:43:08 GMT, nbauma109 wrote: > I think this is a typo Yeah this looks like a typo, but it doesn't fall under the `javadoc` tag—that's for the `javadoc` tool and related, not for issues in documentation. This might require a [CSR](https://wiki.openjdk.org/display/csr/Main)

Re: RFR: 8303214: Typo in java.util.Collections#synchronizedNavigableMap javadoc

2023-03-22 Thread nbauma109
On Wed, 14 Dec 2022 17:43:08 GMT, nbauma109 wrote: > I think this is a typo need help with progressing this pull request towards integration - PR Comment: https://git.openjdk.org/jdk/pull/11679#issuecomment-1423692568

Re: RFR: 8303214: Typo in java.util.Collections#synchronizedNavigableMap javadoc

2023-03-22 Thread Martin Buchholz
On Wed, 14 Dec 2022 17:43:08 GMT, nbauma109 wrote: > I think this is a typo Marked as reviewed by martin (Reviewer). No CSR required for typos in code samples. - PR Review: https://git.openjdk.org/jdk/pull/11679#pullrequestreview-1314583164 PR Comment: https://git.openjdk.org/jdk/

RFR: 8303214: Typo in java.util.Collections#synchronizedNavigableMap javadoc

2023-03-22 Thread nbauma109
I think this is a typo - Commit messages: - Javadoc typo Changes: https://git.openjdk.org/jdk/pull/11679/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=11679&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8303214 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod

Re: RFR: 8300977: Retire java.io.ExpiringCache

2023-03-22 Thread Alan Bateman
On Tue, 24 Jan 2023 14:02:26 GMT, Per Minborg wrote: > This PR proposed to retire the class 'java.io.ExpiringCache'. The use of the > class has been off by default since Java 16 but could be explicitly turned on > by means of two System properties. The removal looks okay okay. There is some no

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v8]

2023-03-22 Thread Jorn Vernee
On Wed, 22 Mar 2023 19:02:52 GMT, Maurizio Cimadamore wrote: >> src/java.base/share/classes/java/lang/foreign/Linker.java line 492: >> >>> 490: * Finally, the returned method handle will throw an {@link >>> IllegalArgumentException} if the {@link MemorySegment} >>> 491: * parameter p

Re: RFR: 8300979: Lazily initialize (byte, char)arr in java.io.DataInputStream [v3]

2023-03-22 Thread Alan Bateman
On Wed, 22 Mar 2023 10:12:26 GMT, Per Minborg wrote: >> This PR proposed to lazily initialize the scratch arrays only if/when needed. > > Per Minborg 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

Re: RFR: 8284493: Improve computeNextExponential tail performance and accuracy [v16]

2023-03-22 Thread Eirik Bjorsnos
On Tue, 4 Oct 2022 17:36:56 GMT, Chris Hennick wrote: >> This PR improves both the worst-case performance of `nextExponential` and >> `nextGaussian` and the distribution of output at the tails. It fixes the >> following imperfections: >> >> * Repeatedly adding DoubleZigguratTables.exponentialX

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v8]

2023-03-22 Thread Maurizio Cimadamore
On Wed, 22 Mar 2023 18:04:15 GMT, Jorn Vernee wrote: >> Per Minborg has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Improve javadocs for Linker::captureStateLayout > > src/java.base/share/classes/java/lang/foreign/MemorySegment.java line

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v8]

2023-03-22 Thread Maurizio Cimadamore
On Wed, 22 Mar 2023 17:34:36 GMT, Jorn Vernee wrote: >> Per Minborg has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Improve javadocs for Linker::captureStateLayout > > src/java.base/share/classes/java/lang/foreign/Linker.java line 492: >

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

2023-03-22 Thread Chen Liang
On Wed, 22 Mar 2023 17:37:07 GMT, Adam Sotona wrote: >> java.base java.lang.reflect.ProxyGenerator uses ASM to generate proxy >> classes and this patch converts it to use Classfile API. >> >> Please review. >> >> Thank you, >> Adam > > Adam Sotona has updated the pull request with a new target

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

2023-03-22 Thread Mandy Chung
On Wed, 22 Mar 2023 17:37:07 GMT, Adam Sotona wrote: >> java.base java.lang.reflect.ProxyGenerator uses ASM to generate proxy >> classes and this patch converts it to use Classfile API. >> >> Please review. >> >> Thank you, >> Adam > > Adam Sotona has updated the pull request with a new target

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

2023-03-22 Thread Chen Liang
On Wed, 22 Mar 2023 17:37:07 GMT, Adam Sotona wrote: >> java.base java.lang.reflect.ProxyGenerator uses ASM to generate proxy >> classes and this patch converts it to use Classfile API. >> >> Please review. >> >> Thank you, >> Adam > > Adam Sotona has updated the pull request with a new target

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v8]

2023-03-22 Thread Jorn Vernee
On Wed, 22 Mar 2023 14:09:07 GMT, Per Minborg wrote: >> API changes for the FFM API (third preview) >> >> Specdiff: >> https://cr.openjdk.org/~pminborg/panama/21/v1/specdiff/overview-summary.html >> >> Javadoc: >> https://cr.openjdk.org/~pminborg/panama/21/v1/javadoc/java.base/module-summary.ht

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v5]

2023-03-22 Thread Jorn Vernee
On Tue, 21 Mar 2023 09:02:29 GMT, Per Minborg wrote: >> API changes for the FFM API (third preview) >> >> Specdiff: >> https://cr.openjdk.org/~pminborg/panama/21/v1/specdiff/overview-summary.html >> >> Javadoc: >> https://cr.openjdk.org/~pminborg/panama/21/v1/javadoc/java.base/module-summary.ht

Re: RFR: 8304498: JShell does not switch to raw mode when there is no /bin/test [v2]

2023-03-22 Thread Jan Lahoda
> If JShell is run on a system that does not have `/bin/test` (which is, > apparently, possible for some systems, which only have `/usr/bin/test`), it > won't switch the terminal into the raw mode, and the input will not work > properly. > > The proposed fix herein is to detect whether `test` e

Re: RFR: 8284493: Improve computeNextExponential tail performance and accuracy [v16]

2023-03-22 Thread Chris Hennick
On Tue, 4 Oct 2022 17:36:56 GMT, Chris Hennick wrote: >> This PR improves both the worst-case performance of `nextExponential` and >> `nextGaussian` and the distribution of output at the tails. It fixes the >> following imperfections: >> >> * Repeatedly adding DoubleZigguratTables.exponentialX

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

2023-03-22 Thread Adam Sotona
> java.base java.lang.reflect.ProxyGenerator uses ASM to generate proxy classes > and this patch converts it to use Classfile API. > > Please review. > > Thank you, > Adam Adam Sotona has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains

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

2023-03-22 Thread Adam Sotona
> java.base java.lang.reflect.ProxyGenerator uses ASM to generate proxy classes > and this patch converts it to use Classfile API. > > Please review. > > Thank you, > Adam Adam Sotona has updated the pull request incrementally with two additional commits since the last revision: - ClassEntry

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

2023-03-22 Thread Adam Sotona
On Thu, 9 Mar 2023 17:53:05 GMT, Mandy Chung wrote: >> Adam Sotona has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains 195 commits: >> >> - Merge branch 'master' into JDK-8294961-proxy >> - Merge branch 'JDK-8294982' into JDK-829496

Re: RFR: 8304031: Classfile API cannot encode Primitive Class as Condy [v2]

2023-03-22 Thread Chen Liang
> Without this patch, the Classfile API tries to encode PrimitiveClassDesc as > CONSTANT_Class_info and error in `toInternalName`. Chen Liang 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 m

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v8]

2023-03-22 Thread Maurizio Cimadamore
On Wed, 22 Mar 2023 15:57:16 GMT, Per Minborg wrote: >> src/java.base/share/classes/java/lang/foreign/MemoryLayout.java line 697: >> >>> 695: */ >>> 696: static PaddingLayout paddingLayout(long bitSize) { >>> 697: if (bitSize <= 0) { >> >> While this does the right thing, I won

Re: RFR: JDK-8304557: java/util/concurrent/CompletableFuture/CompletableFutureOrTimeoutExceptionallyTest.java times out

2023-03-22 Thread Viktor Klang
On Wed, 22 Mar 2023 16:29:21 GMT, Pavel Rappo wrote: >> 1. I don't know. >> 2. It's hard to come up with a one-size-fits-all-heap-size given that >> differences in pointersizes, object alignment, etc can skew the need. >> 3. I initially set the threshold (iteration number) at about 4x what I >>

Re: RFR: 8300979: Lazily initialize (byte, char)arr in java.io.DataInputStream [v3]

2023-03-22 Thread Alan Bateman
On Wed, 22 Mar 2023 10:07:57 GMT, Per Minborg wrote: >> src/java.base/share/classes/java/io/DataInputStream.java line 64: >> >>> 62: * working arrays initialized on demand by readUTF >>> 63: */ >>> 64: private byte[] bytearr; >> >> Could the `bytearr` and `chararr` instance variab

Re: RFR: JDK-8304557: java/util/concurrent/CompletableFuture/CompletableFutureOrTimeoutExceptionallyTest.java times out

2023-03-22 Thread Pavel Rappo
On Wed, 22 Mar 2023 16:06:51 GMT, Viktor Klang wrote: > The other alternative I see would be to reach into the implementation of > CompletableFuture's `Delayer`'s `ScheduledThreadPoolExecutor delayer` and > make sure that it's `getQueue()` eventually goes empty. >From what I've seen, JDK prefe

Re: RFR: 8304691: Remove jlink --post-process-path option [v2]

2023-03-22 Thread Ian Graves
On Wed, 22 Mar 2023 16:25:51 GMT, Ian Graves wrote: >> Removing the hidden `jlink --post-process-path` option. > > Ian Graves has updated the pull request incrementally with one additional > commit since the last revision: > > Updates per feedback Thanks! Updates per the feedback --

Re: RFR: 8302818: Optimize wrapper sets and immutable sets of Enums [v5]

2023-03-22 Thread Tingjun Yuan
On Tue, 21 Mar 2023 23:41:44 GMT, Claes Redestad wrote: >> Tingjun Yuan has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Set.copyOf: need defensive copy > > If this level of complexity is indeed needed to get whatever improvement > you'r

Re: RFR: 8304691: Remove jlink --post-process-path option [v2]

2023-03-22 Thread Ian Graves
> Removing the hidden `jlink --post-process-path` option. Ian Graves has updated the pull request incrementally with one additional commit since the last revision: Updates per feedback - Changes: - all: https://git.openjdk.org/jdk/pull/13126/files - new: https://git.openjdk.o

Integrated: 8288730: Add type parameter to Lookup::accessClass and Lookup::ensureInitialized

2023-03-22 Thread Chen Liang
On Sat, 11 Mar 2023 03:28:16 GMT, Chen Liang wrote: > Parameterizes `Lookup::accessClass` and `Lookup::ensureInitialized`. Updated > an applicable use-site within JDK to benefit from this patch. This pull request has now been integrated. Changeset: a2d8f634 Author:Chen Liang Committer: Ma

Re: RFR: 8302818: Optimize wrapper sets and immutable sets of Enums [v7]

2023-03-22 Thread Stuart Marks
On Wed, 22 Mar 2023 01:22:37 GMT, Tingjun Yuan wrote: >> Currently, the two subclasses of `java.util.EnumSet` optimize bulk >> operations when the argument is also a `EnumSet`, but there is no such >> optimization for wrapper sets (returned by `Collections.unmodifiableSet`, >> `Collections.syn

Re: RFR: JDK-8304557: java/util/concurrent/CompletableFuture/CompletableFutureOrTimeoutExceptionallyTest.java times out

2023-03-22 Thread Viktor Klang
On Wed, 22 Mar 2023 13:02:46 GMT, Pavel Rappo wrote: >> @jaikiran The downside is that it is hard to judge how long it will take for >> machine X to execute Y instructions. :/ > > 1. Is there a way to mark this test as skipped if the timeout elapses? I > suggest we don't mark it as skipped base

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v8]

2023-03-22 Thread Per Minborg
On Wed, 22 Mar 2023 14:35:42 GMT, Maurizio Cimadamore wrote: >> Per Minborg has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Improve javadocs for Linker::captureStateLayout > > src/java.base/share/classes/java/lang/foreign/MemoryLayout.j

Re: RFR: 8302818: Optimize wrapper sets and immutable sets of Enums [v7]

2023-03-22 Thread Chen Liang
On Wed, 22 Mar 2023 14:23:45 GMT, ExE Boss wrote: >> Tingjun Yuan has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Fix a whitespace error > > src/java.base/share/classes/java/util/ImmutableCollections.java line 1212: > >> 1210:

Re: RFR: JDK-8285932 Implementation of JEP 430 String Templates (Preview) [v46]

2023-03-22 Thread Jim Laskey
On Tue, 21 Mar 2023 13:37:02 GMT, Maurizio Cimadamore wrote: >> src/java.base/share/classes/java/lang/StringTemplate.java line 69: >> >>> 67: * List values = st.values(); >>> 68: * } >>> 69: * The value of {@code fragments} will be equivalent to {@code >>> List.of("", " + ", " = ", "")}, >>

Re: RFR: JDK-8285932 Implementation of JEP 430 String Templates (Preview) [v46]

2023-03-22 Thread Jim Laskey
On Tue, 21 Mar 2023 13:25:58 GMT, Maurizio Cimadamore wrote: >> Jim Laskey has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - Tidy javadoc >> - Rename StringTemplate classes > > src/java.base/share/classes/java/lang/StringTemplate.java

Re: RFR: 8304498: JShell does not switch to raw mode when there is no /bin/test

2023-03-22 Thread Sean Coffey
On Mon, 20 Mar 2023 12:10:04 GMT, Jan Lahoda wrote: > If JShell is run on a system that does not have `/bin/test` (which is, > apparently, possible for some systems, which only have `/usr/bin/test`), it > won't switch the terminal into the raw mode, and the input will not work > properly. > >

Re: RFR: 8302818: Optimize wrapper sets and immutable sets of Enums [v7]

2023-03-22 Thread ExE Boss
On Wed, 22 Mar 2023 01:22:37 GMT, Tingjun Yuan wrote: >> Currently, the two subclasses of `java.util.EnumSet` optimize bulk >> operations when the argument is also a `EnumSet`, but there is no such >> optimization for wrapper sets (returned by `Collections.unmodifiableSet`, >> `Collections.syn

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v8]

2023-03-22 Thread Maurizio Cimadamore
On Wed, 22 Mar 2023 14:09:07 GMT, Per Minborg wrote: >> API changes for the FFM API (third preview) >> >> Specdiff: >> https://cr.openjdk.org/~pminborg/panama/21/v1/specdiff/overview-summary.html >> >> Javadoc: >> https://cr.openjdk.org/~pminborg/panama/21/v1/javadoc/java.base/module-summary.ht

RFR: 8304717: Declaration aliasing between boolean and jboolean is wrong

2023-03-22 Thread Julian Waters
A couple of spots wrongly refer to boolean and jboolean as the same thing. While this does still compile thanks to a happy accident and implicit conversions, they are not the same at all, and should be fixed before a future compiler error happens if their declarations are touched -

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v8]

2023-03-22 Thread Per Minborg
On Tue, 21 Mar 2023 12:12:15 GMT, Maurizio Cimadamore wrote: >> src/java.base/share/classes/java/lang/foreign/Linker.java line 621: >> >>> 619: * to a downcall handle linked with {@link >>> #captureCallState(String...)}} >>> 620: * >>> 621: * @see #captureCa

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v8]

2023-03-22 Thread Per Minborg
> API changes for the FFM API (third preview) > > Specdiff: > https://cr.openjdk.org/~pminborg/panama/21/v1/specdiff/overview-summary.html > > Javadoc: > https://cr.openjdk.org/~pminborg/panama/21/v1/javadoc/java.base/module-summary.html Per Minborg has updated the pull request incrementally wit

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v7]

2023-03-22 Thread Per Minborg
> API changes for the FFM API (third preview) > > Specdiff: > https://cr.openjdk.org/~pminborg/panama/21/v1/specdiff/overview-summary.html > > Javadoc: > https://cr.openjdk.org/~pminborg/panama/21/v1/javadoc/java.base/module-summary.html Per Minborg has updated the pull request incrementally wit

Re: RFR: 8300977: Retire java.io.ExpiringCache

2023-03-22 Thread Per Minborg
On Tue, 24 Jan 2023 14:02:26 GMT, Per Minborg wrote: > This PR proposed to retire the class 'java.io.ExpiringCache'. The use of the > class has been off by default since Java 16 but could be explicitly turned on > by means of two System properties. src/java.base/share/classes/java/io/FileSyste

RFR: 8300977: Retire java.io.ExpiringCache

2023-03-22 Thread Per Minborg
This PR proposed to retire the class 'java.io.ExpiringCache'. The use of the class has been off by default since Java 16 but could be explicitly turned on by means of two System properties. - Commit messages: - Remove warnings - Update copyright years - Retire ExpiringCache Chan

Re: RFR: 8304148: Remapping a class with Invokedynamic constant loses static bootstrap arguments [v2]

2023-03-22 Thread Adam Sotona
On Wed, 22 Mar 2023 11:59:30 GMT, Thiago Henrique Hüpner wrote: >> 8304148: Remapping a class with Invokedynamic constant loses static >> bootstrap arguments > > Thiago Henrique Hüpner has updated the pull request incrementally with one > additional commit since the last revision: > > Add t

Re: RFR: 8304148: Remapping a class with Invokedynamic constant loses static bootstrap arguments [v2]

2023-03-22 Thread Thiago Henrique Hüpner
> 8304148: Remapping a class with Invokedynamic constant loses static bootstrap > arguments Thiago Henrique Hüpner has updated the pull request incrementally with one additional commit since the last revision: Add test - Changes: - all: https://git.openjdk.org/jdk/pull/13021/f

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v5]

2023-03-22 Thread Per Minborg
On Wed, 22 Mar 2023 11:55:09 GMT, Maurizio Cimadamore wrote: >> Per Minborg has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Add example for Option::captureStateLayout > > src/java.base/share/classes/java/lang/foreign/MemoryLayout.java l

Re: RFR: JDK-8304557: java/util/concurrent/CompletableFuture/CompletableFutureOrTimeoutExceptionallyTest.java times out

2023-03-22 Thread Pavel Rappo
On Wed, 22 Mar 2023 11:21:14 GMT, Viktor Klang wrote: >> Hello Viktor, >> >>> @jaikiran Having a long timeout doesn't seem like a problem given that it >>> just needs enough time to run through the iterations (i.e. that's the max >>> duration of the test before giving up). >> >> Having a extr

Re: RFR: 8304450: [vectorapi] Refactor VectorShuffle implementation [v4]

2023-03-22 Thread Quan Anh Mai
On Wed, 22 Mar 2023 07:59:40 GMT, Xiaohong Gong wrote: >> Quan Anh Mai has updated the pull request incrementally with one additional >> commit since the last revision: >> >> reviews > > src/hotspot/share/opto/vectorIntrinsics.cpp line 2059: > >> 2057: if (need_load_shuffle) { >> 2058:

Re: RFR: 8304450: [vectorapi] Refactor VectorShuffle implementation [v3]

2023-03-22 Thread Quan Anh Mai
On Wed, 22 Mar 2023 08:09:03 GMT, Xiaohong Gong wrote: >> Quan Anh Mai has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - missing casts >> - clean up > > Please also update the copyright to 2023 for some touched files like > `vectorSupp

Re: RFR: 8304450: [vectorapi] Refactor VectorShuffle implementation [v4]

2023-03-22 Thread Quan Anh Mai
> Hi, > > This patch reimplements `VectorShuffle` implementations to be a vector of the > bit type. Currently, VectorShuffle is stored as a byte array, and would be > expanded upon usage. This poses several drawbacks: > > 1. Inefficient conversions between a shuffle and its corresponding vector

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v6]

2023-03-22 Thread Per Minborg
> API changes for the FFM API (third preview) > > Specdiff: > https://cr.openjdk.org/~pminborg/panama/21/v1/specdiff/overview-summary.html > > Javadoc: > https://cr.openjdk.org/~pminborg/panama/21/v1/javadoc/java.base/module-summary.html Per Minborg has updated the pull request incrementally wit

Integrated: 8294972: Convert jdk.jlink internal plugins to use the Classfile API

2023-03-22 Thread Adam Sotona
On Thu, 9 Mar 2023 11:35:32 GMT, Adam Sotona wrote: > jdk.jlink internal plugins are heavily using ASM > > This patch converts ASM calls to Classfile API. > > Please review. > Thanks, > Adam This pull request has now been integrated. Changeset: 358c61b5 Author:Adam Sotona URL: htt

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v5]

2023-03-22 Thread Maurizio Cimadamore
On Tue, 21 Mar 2023 09:02:29 GMT, Per Minborg wrote: >> API changes for the FFM API (third preview) >> >> Specdiff: >> https://cr.openjdk.org/~pminborg/panama/21/v1/specdiff/overview-summary.html >> >> Javadoc: >> https://cr.openjdk.org/~pminborg/panama/21/v1/javadoc/java.base/module-summary.ht

Re: RFR: JDK-8304557: java/util/concurrent/CompletableFuture/CompletableFutureOrTimeoutExceptionallyTest.java times out

2023-03-22 Thread Viktor Klang
On Tue, 21 Mar 2023 11:02:52 GMT, Jaikiran Pai wrote: >> Improves the stability of the memory leak test for CompletableFuture timeout >> cancellation by both reducing the count by 50% (which should still be above >> threshold to trigger given the ample margin set initially) as well as >> exten

Re: RFR: JDK-8304557: java/util/concurrent/CompletableFuture/CompletableFutureOrTimeoutExceptionallyTest.java times out

2023-03-22 Thread Viktor Klang
On Wed, 22 Mar 2023 06:20:55 GMT, Jaikiran Pai wrote: >> @AlanBateman Wouldn't that be `@requires vm.debug == false` ? > > Hello Viktor, > >> @jaikiran Having a long timeout doesn't seem like a problem given that it >> just needs enough time to run through the iterations (i.e. that's the max >

Re: RFR: 8304148: Remapping a class with Invokedynamic constant loses static bootstrap arguments

2023-03-22 Thread Adam Sotona
On Tue, 14 Mar 2023 14:51:34 GMT, Thiago Henrique Hüpner wrote: > 8304148: Remapping a class with Invokedynamic constant loses static bootstrap > arguments Suggested patch to test the args lost: diff --git a/test/jdk/jdk/classfile/AdvancedTransformationsTest.java b/test/jdk/jdk/classfile/Adv

Re: RFR: 8300979: Lazily initialize (byte, char)arr in java.io.DataInputStream

2023-03-22 Thread Per Minborg
On Tue, 21 Mar 2023 20:35:36 GMT, Sergey Tsypanov wrote: > Nice idea. Just wonder could we do the same for `BufferedInputStream`? I think it is doable but would require some more work as nullity is used as a "closed flag". Please raise a separate issue about this. - PR Comment: ht

Re: RFR: 8300979: Lazily initialize (byte, char)arr in java.io.DataInputStream

2023-03-22 Thread Per Minborg
On Tue, 21 Mar 2023 17:27:42 GMT, Eirik Bjorsnos wrote: > Looks like `DataInputStream.readUTF` could benefit from using > `JavaLangAccess.countPositives` and return early for the common case that all > bytes are ASCII. Food for another PR? Yep. Please raise an issue with the ideas around this

Re: RFR: 8300979: Lazily initialize (byte, char)arr in java.io.DataInputStream [v3]

2023-03-22 Thread Per Minborg
> This PR proposed to lazily initialize the scratch arrays only if/when needed. Per Minborg 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 five additio

Re: RFR: 8300979: Lazily initialize (byte, char)arr in java.io.DataInputStream [v3]

2023-03-22 Thread Per Minborg
On Tue, 21 Mar 2023 16:17:35 GMT, Brian Burkhalter wrote: >> Per Minborg 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 five additional >> comm

Re: RFR: 8304148: Remapping a class with Invokedynamic constant loses static bootstrap arguments

2023-03-22 Thread Adam Sotona
On Tue, 14 Mar 2023 14:51:34 GMT, Thiago Henrique Hüpner wrote: > 8304148: Remapping a class with Invokedynamic constant loses static bootstrap > arguments Thanks for discovering the bug. Proposed fix looks good to me, however it would be good to cover it with a test. - PR Comme

Re: RFR: 8300979: Lazily initialize (byte, char)arr in java.io.DataInputStream [v2]

2023-03-22 Thread Per Minborg
> This PR proposed to lazily initialize the scratch arrays only if/when needed. Per Minborg has updated the pull request incrementally with one additional commit since the last revision: Update src/java.base/share/classes/java/io/DataInputStream.java Co-authored-by: Eirik Bjorsnos -

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v5]

2023-03-22 Thread Andrey Turbanov
On Tue, 21 Mar 2023 09:02:29 GMT, Per Minborg wrote: >> API changes for the FFM API (third preview) >> >> Specdiff: >> https://cr.openjdk.org/~pminborg/panama/21/v1/specdiff/overview-summary.html >> >> Javadoc: >> https://cr.openjdk.org/~pminborg/panama/21/v1/javadoc/java.base/module-summary.ht

Re: RFR: JDK-8304028: Port fdlibm IEEEremainder to Java

2023-03-22 Thread Andrey Turbanov
On Tue, 21 Mar 2023 06:11:57 GMT, Joe Darcy wrote: > Last but not least, a port of fdlibm IEEEremainder from C to Java. I plan to > write some more implementation-specific tests around decision points in the > FDLIBM algorithm, but I wanted to get the bulk of the changes out for review > first

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v5]

2023-03-22 Thread Feilong Jiang
On Tue, 21 Mar 2023 13:35:25 GMT, Per Minborg wrote: >> Per Minborg has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Add example for Option::captureStateLayout > > A review of all the copyright years shall be made in this PR. Hi @minborg

Re: RFR: 8304450: [vectorapi] Refactor VectorShuffle implementation [v3]

2023-03-22 Thread Xiaohong Gong
On Tue, 21 Mar 2023 16:16:31 GMT, Quan Anh Mai wrote: >> Hi, >> >> This patch reimplements `VectorShuffle` implementations to be a vector of >> the bit type. Currently, VectorShuffle is stored as a byte array, and would >> be expanded upon usage. This poses several drawbacks: >> >> 1. Ineffic

Re: RFR: 8304450: [vectorapi] Refactor VectorShuffle implementation [v3]

2023-03-22 Thread Xiaohong Gong
On Tue, 21 Mar 2023 16:16:31 GMT, Quan Anh Mai wrote: >> Hi, >> >> This patch reimplements `VectorShuffle` implementations to be a vector of >> the bit type. Currently, VectorShuffle is stored as a byte array, and would >> be expanded upon usage. This poses several drawbacks: >> >> 1. Ineffic

Re: RFR: 8304450: [vectorapi] Refactor VectorShuffle implementation [v3]

2023-03-22 Thread Xiaohong Gong
On Tue, 21 Mar 2023 16:16:31 GMT, Quan Anh Mai wrote: >> Hi, >> >> This patch reimplements `VectorShuffle` implementations to be a vector of >> the bit type. Currently, VectorShuffle is stored as a byte array, and would >> be expanded upon usage. This poses several drawbacks: >> >> 1. Ineffic

  1   2   >