Re: RFR: 8284161: Implementation of Virtual Threads (Preview) [v4]

2022-04-19 Thread Alan Bateman
On Tue, 19 Apr 2022 00:09:04 GMT, Mandy Chung wrote: >> Alan Bateman has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Refresh > > src/java.base/share/classes/java/lang/ref/ReferenceQueue.java line 61: > >> 59: private final

RFR: 8285007: Use correct lookup mode for MethodHandleStatics.UNSAFE

2022-04-19 Thread Claes Redestad
Trivially fix the resolution of the `NF_UNSAFE` named function to use the appropriate lookup mode. In [JDK-8187826](https://bugs.openjdk.java.net/browse/JDK-8187826) we changed from regular reflection to use a `NamedFunction` for this field, but it appears the lookup mode came out wrong. This

Re: RFR: 8284932: [Vector API] Incorrect implementation of LSHR operator for negative byte/short elements

2022-04-19 Thread Jie Fu
On Sun, 17 Apr 2022 14:35:14 GMT, Jie Fu wrote: > Hi all, > > According to the Vector API doc, the `LSHR` operator computes > `a>>>(n&(ESIZE*8-1))`. > However, current implementation is incorrect for negative bytes/shorts. > > The background is that one of our customers try to vectorize

RFR: 8285001: Simplify StringLatin1.regionMatches

2022-04-19 Thread Claes Redestad
There is no pair of character values in the latin1 range (0-255) that will make the condition at line 401 in `StringLatin1.java` true, so this test can be removed. Added a test and a microbenchmark (which as expected sees a few ns/op improvement from this change). Took the opportunity to tune

Re: RFR: JDK-8242888: Convert dynamic proxy to hidden classes

2022-04-19 Thread Remi Forax
- Original Message - > From: "liach" > To: "core-libs-dev" , "security-dev" > > Sent: Tuesday, April 19, 2022 3:31:24 AM > Subject: Re: RFR: JDK-8242888: Convert dynamic proxy to hidden classes > On Mon, 18 Apr 2022 20:42:48 GMT, Remi Forax wrote: > >> The third parameter of

RFR: 8284992: Fix misleading Vector API doc for LSHR operator

2022-04-19 Thread Jie Fu
Hi all, The Current Vector API doc for `LSHR` is Produce a>>>(n&(ESIZE*8-1)). Integral only. This is misleading which may lead to bugs for Java developers. This is because for negative byte/short elements, the results computed by `LSHR` will be different from that of `>>>`. For more details,

Re: RFR: 8284435: Add dedicated filler objects for known dead Java heap areas [v3]

2022-04-19 Thread Thomas Schatzl
On Mon, 11 Apr 2022 21:51:32 GMT, David Holmes wrote: > Do you really need to define a real `FillerObject.java` class? Can't you use > an internal-only variant of a hidden class to represent this? I am not sure I understand this request, but of course I am open to try different approaches. An

RFR: 8274517: java/util/DoubleStreamSums/CompensatedSums.java fails with expected [true] but found [false]

2022-04-19 Thread Raffaello Giulietti
Please review these small changes to address intermittent failures, as of JDK-8274517. - Usage of jdk.test.lib.RandomFactory for reproducible random generation. - Slightly less restrictive assertion about badParallelStreamError on L94 (former L88). - Verbatim copy of computeFinalSum() from

Re: RFR: 8284932: [Vector API] Incorrect implementation of LSHR operator for negative byte/short elements

2022-04-19 Thread Paul Sandoz
On Sun, 17 Apr 2022 14:35:14 GMT, Jie Fu wrote: > Hi all, > > According to the Vector API doc, the `LSHR` operator computes > `a>>>(n&(ESIZE*8-1))`. > However, current implementation is incorrect for negative bytes/shorts. > > The background is that one of our customers try to vectorize

Integrated: 8284856: Add a test case for checking UnicodeScript entity numbers

2022-04-19 Thread Naoto Sato
On Thu, 14 Apr 2022 20:52:44 GMT, Naoto Sato wrote: > Added the test case, and eliminated the immediate hashmap value, replaced > with the ordinal number of `Character.UnicodeScript.UNKNOWN`. This pull request has now been integrated. Changeset: eb9c457b Author:Naoto Sato URL:

Re: RFR: 8285001: Simplify StringLatin1.regionMatches

2022-04-19 Thread Naoto Sato
On Tue, 19 Apr 2022 08:50:09 GMT, Claes Redestad wrote: > There is no pair of character values in the latin1 range (0-255) that will > make the condition at line 401 in `StringLatin1.java` true, so this test can > be removed. > > Added a test and a microbenchmark (which as expected sees a few

Re: RFR: 8285007: Use correct lookup mode for MethodHandleStatics.UNSAFE

2022-04-19 Thread Paul Sandoz
On Tue, 19 Apr 2022 13:19:31 GMT, Claes Redestad wrote: > Trivially fix the resolution of the `NF_UNSAFE` named function to use the > appropriate lookup mode. > > In [JDK-8187826](https://bugs.openjdk.java.net/browse/JDK-8187826) we changed > from regular reflection to use a `NamedFunction`

Re: RFR: 8284893: Fix typos in java.base [v2]

2022-04-19 Thread Magnus Ihse Bursie
> I ran `codespell` on the `src/java.base` directory, and accepted those > changes where it indeed discovered real typos. > > (Due to false positives this can unfortunately not be run automatically) > > The majority of fixes are in comments. A handful is in strings, one in a > local variable

Re: RFR: 8279185: Support for IsoFields in JapaneseDate/MinguoDate/ThaiBuddhistDate [v7]

2022-04-19 Thread Roger Riggs
On Fri, 15 Apr 2022 18:47:53 GMT, Naoto Sato wrote: >> Supporting `IsoFields` temporal fields in chronologies that are similar to >> ISO chronology. Corresponding CSR has also been drafted. > > Naoto Sato has updated the pull request with a new target base due to a merge > or a rebase. The

Re: RFR: 8279185: Support for IsoFields in JapaneseDate/MinguoDate/ThaiBuddhistDate [v4]

2022-04-19 Thread Roger Riggs
On Mon, 7 Mar 2022 18:47:17 GMT, Naoto Sato wrote: >> src/java.base/share/classes/java/time/chrono/IsoChronology.java line 689: >> >>> 687: */ >>> 688: @Override >>> 689: public boolean isIsoBased() { >> >> Is this meant to be 'default'? The CSR indicated adding default methods.

Re: RFR: 8285001: Simplify StringLatin1.regionMatches

2022-04-19 Thread Naoto Sato
On Tue, 19 Apr 2022 13:37:32 GMT, Roger Riggs wrote: > Nice Catch! +1 - PR: https://git.openjdk.java.net/jdk/pull/8292

Re: RFR: 8285001: Simplify StringLatin1.regionMatches

2022-04-19 Thread Roger Riggs
On Tue, 19 Apr 2022 08:50:09 GMT, Claes Redestad wrote: > There is no pair of character values in the latin1 range (0-255) that will > make the condition at line 401 in `StringLatin1.java` true, so this test can > be removed. > > Added a test and a microbenchmark (which as expected sees a few

Re: RFR: 8284893: Fix typos in java.base [v3]

2022-04-19 Thread Magnus Ihse Bursie
> I ran `codespell` on the `src/java.base` directory, and accepted those > changes where it indeed discovered real typos. > > (Due to false positives this can unfortunately not be run automatically) > > The majority of fixes are in comments. A handful is in strings, one in a > local variable

Re: RFR: 8284992: Fix misleading Vector API doc for LSHR operator

2022-04-19 Thread Paul Sandoz
On Tue, 19 Apr 2022 08:41:50 GMT, Jie Fu wrote: > Hi all, > > The Current Vector API doc for `LSHR` is > > Produce a>>>(n&(ESIZE*8-1)). Integral only. > > > This is misleading which may lead to bugs for Java developers. > This is because for negative byte/short elements, the results computed

Re: RFR: 8279185: Support for IsoFields in JapaneseDate/MinguoDate/ThaiBuddhistDate [v8]

2022-04-19 Thread Naoto Sato
> Supporting `IsoFields` temporal fields in chronologies that are similar to > ISO chronology. Corresponding CSR has also been drafted. Naoto Sato 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

Re: RFR: 8284161: Implementation of Virtual Threads (Preview) [v4]

2022-04-19 Thread Mandy Chung
On Tue, 19 Apr 2022 10:49:14 GMT, Alan Bateman wrote: >> src/java.base/share/classes/java/lang/ref/ReferenceQueue.java line 61: >> >>> 59: private final Condition notEmpty; >>> 60: >>> 61: void signal() { notEmpty.signalAll(); } >> >> `signal()`, `await()` and `await(long)` methods

Re: RFR: 8285007: Use correct lookup mode for MethodHandleStatics.UNSAFE

2022-04-19 Thread Mandy Chung
On Tue, 19 Apr 2022 13:19:31 GMT, Claes Redestad wrote: > Trivially fix the resolution of the `NF_UNSAFE` named function to use the > appropriate lookup mode. > > In [JDK-8187826](https://bugs.openjdk.java.net/browse/JDK-8187826) we changed > from regular reflection to use a `NamedFunction`

RFR: 8282120: optimal capacity tests and test library need to be cleaned up

2022-04-19 Thread Stuart Marks
The test `java/lang/Enum/ConstantDirectoryOptimalCapacity.java` was problem-listed by [JDK-8281631](https://bugs.openjdk.java.net/browse/JDK-8281631) and essentially superseded by [JDK-8186958](https://bugs.openjdk.java.net/browse/JDK-8186958). Given this, the test should simply be removed.

Re: RFR: 8284780: Need methods to create pre-sized HashSet and LinkedHashSet [v2]

2022-04-19 Thread XenoAmess
> as title. XenoAmess has updated the pull request incrementally with one additional commit since the last revision: fix LinkedHashSet constructor - Changes: - all: https://git.openjdk.java.net/jdk/pull/8302/files - new:

Re: RFR: 8282274: Compiler implementation for Pattern Matching for switch (Third Preview) [v5]

2022-04-19 Thread Jan Lahoda
> This is a (preliminary) patch for javac implementation for the third preview > of pattern matching for switch (type patterns in switches). > > Draft JLS: >

Re: RFR: 8284638: store skip buffers in InputStream Object [v7]

2022-04-19 Thread liach
On Tue, 19 Apr 2022 18:04:03 GMT, XenoAmess wrote: > Reader uses a lock object and it appears that InputStream locks on this (per > make/reset) I would assume now that you have some object member fields you > need to hold some lock while accessing those. Even though single thread > access

Re: RFR: 8279185: Support for IsoFields in JapaneseDate/MinguoDate/ThaiBuddhistDate [v9]

2022-04-19 Thread Roger Riggs
On Tue, 19 Apr 2022 17:43:21 GMT, Naoto Sato wrote: >> Supporting `IsoFields` temporal fields in chronologies that are similar to >> ISO chronology. Corresponding CSR has also been drafted. > > Naoto Sato has updated the pull request incrementally with one additional > commit since the last

Re: RFR: 8284893: Fix typos in java.base [v4]

2022-04-19 Thread Lance Andersen
On Tue, 19 Apr 2022 16:50:12 GMT, Magnus Ihse Bursie wrote: >> I ran `codespell` on the `src/java.base` directory, and accepted those >> changes where it indeed discovered real typos. >> >> (Due to false positives this can unfortunately not be run automatically) >> >> The majority of fixes

Re: RFR: 8284880: Re-examine sun.invoke.util.Wrapper hash tables [v2]

2022-04-19 Thread Mandy Chung
On Thu, 14 Apr 2022 13:59:57 GMT, Claes Redestad wrote: >> This patch examines and optimizes `Wrapper` lookups. >> >> First wrote a few simple microbenchmarks to verify there are actual speedups >> from using perfect hash tables in `sun.invoke.util.Wrapper` compared to >> simpler lookup

Re: RFR: 8284638: store skip buffers in InputStream Object [v7]

2022-04-19 Thread XenoAmess
On Mon, 18 Apr 2022 20:08:23 GMT, jmehrens wrote: > > @jmehrens what about this then? I think it safe now(actually this mechanism > > is learned from Reader) > > Reader uses a lock object and it appears that InputStream locks on this (per > make/reset) I would assume now that you have some

Re: RFR: 8284893: Fix typos in java.base [v4]

2022-04-19 Thread Sean Mullan
On Tue, 19 Apr 2022 16:50:12 GMT, Magnus Ihse Bursie wrote: >> I ran `codespell` on the `src/java.base` directory, and accepted those >> changes where it indeed discovered real typos. >> >> (Due to false positives this can unfortunately not be run automatically) >> >> The majority of fixes

Re: RFR: 8284893: Fix typos in java.base [v4]

2022-04-19 Thread Naoto Sato
On Tue, 19 Apr 2022 16:50:12 GMT, Magnus Ihse Bursie wrote: >> I ran `codespell` on the `src/java.base` directory, and accepted those >> changes where it indeed discovered real typos. >> >> (Due to false positives this can unfortunately not be run automatically) >> >> The majority of fixes

Re: RFR: 8284780: Need methods to create pre-sized HashSet and LinkedHashSet [v3]

2022-04-19 Thread XenoAmess
> as title. XenoAmess has updated the pull request incrementally with two additional commits since the last revision: - migrate HashSet usages - migrate LinkedHashSet usage - Changes: - all: https://git.openjdk.java.net/jdk/pull/8302/files - new:

Re: RFR: 8282120: optimal capacity tests and test library need to be cleaned up

2022-04-19 Thread Naoto Sato
On Tue, 19 Apr 2022 18:12:04 GMT, Stuart Marks wrote: > The test `java/lang/Enum/ConstantDirectoryOptimalCapacity.java` was > problem-listed by > [JDK-8281631](https://bugs.openjdk.java.net/browse/JDK-8281631) and > essentially superseded by >

Re: RFR: 8284893: Fix typos in java.base [v3]

2022-04-19 Thread Magnus Ihse Bursie
On Tue, 19 Apr 2022 16:24:43 GMT, Magnus Ihse Bursie wrote: >> I ran `codespell` on the `src/java.base` directory, and accepted those >> changes where it indeed discovered real typos. >> >> (Due to false positives this can unfortunately not be run automatically) >> >> The majority of fixes

Re: RFR: 8284893: Fix typos in java.base [v4]

2022-04-19 Thread Magnus Ihse Bursie
> I ran `codespell` on the `src/java.base` directory, and accepted those > changes where it indeed discovered real typos. > > (Due to false positives this can unfortunately not be run automatically) > > The majority of fixes are in comments. A handful is in strings, one in a > local variable

Re: RFR: JDK-8242888: Convert dynamic proxy to hidden classes

2022-04-19 Thread Johannes Kuhn
On Sun, 17 Apr 2022 16:17:30 GMT, liach wrote: > Convert dynamic proxies to hidden classes. Modifies the serialization of > proxies (requires change in "Java Object Serialization Specification"). Makes > the proxies hidden in stack traces. Removes duplicate logic in proxy building. > > The

Re: RFR: 8285007: Use correct lookup mode for MethodHandleStatics.UNSAFE [v2]

2022-04-19 Thread Claes Redestad
> Trivially fix the resolution of the `NF_UNSAFE` named function to use the > appropriate lookup mode. > > In [JDK-8187826](https://bugs.openjdk.java.net/browse/JDK-8187826) we changed > from regular reflection to use a `NamedFunction` for this field, but it > appears the lookup mode came out

Re: RFR: 8285007: Use correct lookup mode for MethodHandleStatics.UNSAFE [v2]

2022-04-19 Thread Mandy Chung
On Tue, 19 Apr 2022 17:29:12 GMT, Claes Redestad wrote: >> Trivially fix the resolution of the `NF_UNSAFE` named function to use the >> appropriate lookup mode. >> >> In [JDK-8187826](https://bugs.openjdk.java.net/browse/JDK-8187826) we >> changed from regular reflection to use a

Re: RFR: 8285007: Use correct lookup mode for MethodHandleStatics.UNSAFE [v2]

2022-04-19 Thread Claes Redestad
On Tue, 19 Apr 2022 17:01:38 GMT, Mandy Chung wrote: >> Claes Redestad has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Missed a spot! > > src/java.base/share/classes/java/lang/invoke/DirectMethodHandle.java line 901: > >> 899:

Re: RFR: 8284932: [Vector API] Incorrect implementation of LSHR operator for negative byte/short elements

2022-04-19 Thread Paul Sandoz
On Sun, 17 Apr 2022 14:35:14 GMT, Jie Fu wrote: > Hi all, > > According to the Vector API doc, the `LSHR` operator computes > `a>>>(n&(ESIZE*8-1))`. > However, current implementation is incorrect for negative bytes/shorts. > > The background is that one of our customers try to vectorize

Re: RFR: 8279185: Support for IsoFields in JapaneseDate/MinguoDate/ThaiBuddhistDate [v9]

2022-04-19 Thread Naoto Sato
> Supporting `IsoFields` temporal fields in chronologies that are similar to > ISO chronology. Corresponding CSR has also been drafted. Naoto Sato has updated the pull request incrementally with one additional commit since the last revision: Addressing review comments -

RFR: 8284780: Need methods to create pre-sized HashSet and LinkedHashSet

2022-04-19 Thread XenoAmess
as title. - Commit messages: - 8284780: Need methods to create pre-sized HashSet and LinkedHashSet Changes: https://git.openjdk.java.net/jdk/pull/8302/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk=8302=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8284780

Integrated: 8284893: Fix typos in java.base

2022-04-19 Thread Magnus Ihse Bursie
On Thu, 14 Apr 2022 19:07:09 GMT, Magnus Ihse Bursie wrote: > I ran `codespell` on the `src/java.base` directory, and accepted those > changes where it indeed discovered real typos. > > (Due to false positives this can unfortunately not be run automatically) > > The majority of fixes are in

Re: RFR: JDK-8242888: Convert dynamic proxy to hidden classes

2022-04-19 Thread liach
On Sun, 17 Apr 2022 16:17:30 GMT, liach wrote: > Convert dynamic proxies to hidden classes. Modifies the serialization of > proxies (requires change in "Java Object Serialization Specification"). Makes > the proxies hidden in stack traces. Removes duplicate logic in proxy building. > > The

Re: RFR: JDK-8281006 Module::getResourceAsStream should check if the resource is open unconditionally when caller is null [v4]

2022-04-19 Thread Mandy Chung
On Mon, 11 Apr 2022 00:48:34 GMT, Tim Prinzing wrote: >> Created a test called NullCallerGetResource to test >> Module::getResourceAsStream and Class::getResourceAsStream from the native >> level. >> >> At the java level the test builds a test module called 'n' which opens the >> package

Re: RFR: 8284780: Need methods to create pre-sized HashSet and LinkedHashSet [v4]

2022-04-19 Thread XenoAmess
> as title. XenoAmess has refreshed the contents of this pull request, and previous commits have been removed. The incremental views will show differences compared to the previous content of the PR. The pull request contains two new commits since the last revision: - migrate HashSet usages

Integrated: 8285007: Use correct lookup mode for MethodHandleStatics.UNSAFE

2022-04-19 Thread Claes Redestad
On Tue, 19 Apr 2022 13:19:31 GMT, Claes Redestad wrote: > Trivially fix the resolution of the `NF_UNSAFE` named function to use the > appropriate lookup mode. > > In [JDK-8187826](https://bugs.openjdk.java.net/browse/JDK-8187826) we changed > from regular reflection to use a `NamedFunction`

Re: RFR: 8285007: Use correct lookup mode for MethodHandleStatics.UNSAFE [v2]

2022-04-19 Thread Claes Redestad
On Tue, 19 Apr 2022 17:33:04 GMT, Claes Redestad wrote: >> Trivially fix the resolution of the `NF_UNSAFE` named function to use the >> appropriate lookup mode. >> >> In [JDK-8187826](https://bugs.openjdk.java.net/browse/JDK-8187826) we >> changed from regular reflection to use a

Re: RFR: 8284932: [Vector API] Incorrect implementation of LSHR operator for negative byte/short elements

2022-04-19 Thread Jie Fu
On Tue, 19 Apr 2022 17:40:07 GMT, Paul Sandoz wrote: > Not yet talked with John, but i investigated further. The implementation of > the `LSHR` operation is behaving as intended, but is under specified with > regards to `byte` and `short` as you noted in #8291. > > This is a subtle area, but

Re: RFR: 8285001: Simplify StringLatin1.regionMatches

2022-04-19 Thread Claes Redestad
On Tue, 19 Apr 2022 08:50:09 GMT, Claes Redestad wrote: > There is no pair of character values in the latin1 range (0-255) that will > make the condition at line 401 in `StringLatin1.java` true, so this test can > be removed. > > Added a test and a microbenchmark (which as expected sees a few

Integrated: 8285001: Simplify StringLatin1.regionMatches

2022-04-19 Thread Claes Redestad
On Tue, 19 Apr 2022 08:50:09 GMT, Claes Redestad wrote: > There is no pair of character values in the latin1 range (0-255) that will > make the condition at line 401 in `StringLatin1.java` true, so this test can > be removed. > > Added a test and a microbenchmark (which as expected sees a few

Re: RFR: 6478546: FileInputStream.read() throws OutOfMemoryError when there is plenty available

2022-04-19 Thread Brian Burkhalter
On Thu, 14 Apr 2022 06:23:24 GMT, Alan Bateman wrote: >> Modify native multi-byte read-write code used by the `java.io` classes to >> limit the size of the allocated native buffer thereby decreasing off-heap >> memory footprint and increasing throughput. > >

Re: RFR: 8284780: Need methods to create pre-sized HashSet and LinkedHashSet [v4]

2022-04-19 Thread liach
On Tue, 19 Apr 2022 20:15:08 GMT, XenoAmess wrote: >> as title. > > XenoAmess has refreshed the contents of this pull request, and previous > commits have been removed. The incremental views will show differences > compared to the previous content of the PR. The pull request contains two new

RFR: JDK-8280594: Refactor annotation invocation handler handling to use Objects.toIdentityString

2022-04-19 Thread Joe Darcy
Simple refactoring to use new-in19 library code. - Commit messages: - JDK-8280594: Refactor annotation invocation handler handling to use Objects.toIdentityString Changes: https://git.openjdk.java.net/jdk/pull/8310/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk=8310=00

Re: RFR: 8284992: Fix misleading Vector API doc for LSHR operator

2022-04-19 Thread Jie Fu
On Tue, 19 Apr 2022 16:11:37 GMT, Paul Sandoz wrote: > I need to think a little more about this. The specification is not accurate > and likely requires a CSR. > > My initial thoughts are I would prefer the operation to retain reference to > the succinct definition using the logical right

Re: RFR: 8285001: Simplify StringLatin1.regionMatches [v2]

2022-04-19 Thread Claes Redestad
> There is no pair of character values in the latin1 range (0-255) that will > make the condition at line 401 in `StringLatin1.java` true, so this test can > be removed. > > Added a test and a microbenchmark (which as expected sees a few ns/op > improvement from this change). Took the

Re: RFR: 8284880: Re-examine sun.invoke.util.Wrapper hash tables [v3]

2022-04-19 Thread Claes Redestad
> This patch examines and optimizes `Wrapper` lookups. > > First wrote a few simple microbenchmarks to verify there are actual speedups > from using perfect hash tables in `sun.invoke.util.Wrapper` compared to > simpler lookup mechanisms (such as if-else or switch). Turns out there _is_ a >

Integrated: 8284880: Re-examine sun.invoke.util.Wrapper hash tables

2022-04-19 Thread Claes Redestad
On Thu, 14 Apr 2022 11:19:04 GMT, Claes Redestad wrote: > This patch examines and optimizes `Wrapper` lookups. > > First wrote a few simple microbenchmarks to verify there are actual speedups > from using perfect hash tables in `sun.invoke.util.Wrapper` compared to > simpler lookup mechanisms

Re: RFR: 8284880: Re-examine sun.invoke.util.Wrapper hash tables [v2]

2022-04-19 Thread Claes Redestad
On Thu, 14 Apr 2022 13:59:57 GMT, Claes Redestad wrote: >> This patch examines and optimizes `Wrapper` lookups. >> >> First wrote a few simple microbenchmarks to verify there are actual speedups >> from using perfect hash tables in `sun.invoke.util.Wrapper` compared to >> simpler lookup

Re: RFR: 6478546: FileInputStream.read() throws OutOfMemoryError when there is plenty available

2022-04-19 Thread Brian Burkhalter
On Thu, 14 Apr 2022 05:57:54 GMT, Daniel JeliƄski wrote: > The benchmark results are quite unexpected. Would we benefit from reducing > the buffer size even further? I tested with smaller and smaller buffer sizes until the performance started to be affected which was about 64 KB. I have not

Re: RFR: 8178355: IdentityHashMap uses identity-based comparison for values everywhere except remove(K,V) and replace(K,V,V)

2022-04-19 Thread liach
On Fri, 15 Apr 2022 05:58:32 GMT, liach wrote: > Explicitly implement `remove` and `replace` in `IdentityHashMap` to compare > values by identity. Updated API documentation of these two methods >

Re: RFR: 8284638: store skip buffers in InputStream Object [v7]

2022-04-19 Thread jmehrens
On Tue, 19 Apr 2022 18:04:03 GMT, XenoAmess wrote: > no, we use other way, but yes for we take care of thread safety. Fair enough. > Don't think it necessary... I think making it cannot touched by other object > (with security manager on) is enough. I was thinking more for heapdumps due to

Re: RFR: 8284638: store skip buffers in InputStream Object [v7]

2022-04-19 Thread liach
On Fri, 15 Apr 2022 18:56:37 GMT, XenoAmess wrote: >> @jmehrens what about this then? >> I think it safe now(actually this mechanism is learned from Reader) > > XenoAmess has updated the pull request incrementally with one additional > commit since the last revision: > > change to liach

RFR: 8284930: Re-examine FilterInputStream mark/reset

2022-04-19 Thread Brian Burkhalter
Remove the `synchronized` keyword from the `mark(int)` and `reset()` methods of `java.io.FilterInputStream`. - Commit messages: - 8284930: Re-examine FilterInputStream mark/reset Changes: https://git.openjdk.java.net/jdk/pull/8309/files Webrev:

Re: RFR: 8284932: [Vector API] Incorrect implementation of LSHR operator for negative byte/short elements

2022-04-19 Thread Jie Fu
On Wed, 20 Apr 2022 00:25:26 GMT, Paul Sandoz wrote: > I am yet to be convinced we a 3rd vector right shift operator. We are talking > about narrow cases of correct use which i believe can be supported with the > existing operators. The user needs to think very careful when deviating from >

Re: RFR: 8284992: Fix misleading Vector API doc for LSHR operator

2022-04-19 Thread Paul Sandoz
On Tue, 19 Apr 2022 08:41:50 GMT, Jie Fu wrote: > Hi all, > > The Current Vector API doc for `LSHR` is > > Produce a>>>(n&(ESIZE*8-1)). Integral only. > > > This is misleading which may lead to bugs for Java developers. > This is because for negative byte/short elements, the results computed

Re: RFR: JDK-8281006 Module::getResourceAsStream should check if the resource is open unconditionally when caller is null [v5]

2022-04-19 Thread Tim Prinzing
> Created a test called NullCallerGetResource to test > Module::getResourceAsStream and Class::getResourceAsStream from the native > level. > > At the java level the test builds a test module called 'n' which opens the > package 'open' to everyone. There is also a package 'closed' which is

RFR: 8283660: Convert com/sun/jndi/ldap/AbstractLdapNamingEnumeration.java finalizer to Cleaner

2022-04-19 Thread Brent Christian
Please review this change to replace the finalizer in `AbstractLdapNamingEnumeration` with a Cleaner. The pieces of state required for cleanup (`LdapCtx homeCtx`, `LdapResult res`, and `LdapClient enumClnt`) are moved to a static inner class . From there, the change is fairly mechanical.

Re: RFR: 8283667: [vectorapi] Vectorization for masked load with IOOBE with predicate feature

2022-04-19 Thread Xiaohong Gong
On Sat, 9 Apr 2022 00:10:40 GMT, Sandhya Viswanathan wrote: >> Currently the vector load with mask when the given index happens out of the >> array boundary is implemented with pure java scalar code to avoid the IOOBE >> (IndexOutOfBoundaryException). This is necessary for architectures that

Re: RFR: 8283667: [vectorapi] Vectorization for masked load with IOOBE with predicate feature

2022-04-19 Thread Xiaohong Gong
On Mon, 11 Apr 2022 09:04:36 GMT, Jatin Bhateja wrote: >> The optimization for masked store is recorded to: >> https://bugs.openjdk.java.net/browse/JDK-8284050 > >> The blend should be with the intended-to-store vector, so that masked lanes >> contain the need-to-store elements and unmasked

Re: RFR: 8284932: [Vector API] Incorrect implementation of LSHR operator for negative byte/short elements

2022-04-19 Thread Paul Sandoz
On Sun, 17 Apr 2022 14:35:14 GMT, Jie Fu wrote: > Hi all, > > According to the Vector API doc, the `LSHR` operator computes > `a>>>(n&(ESIZE*8-1))`. > However, current implementation is incorrect for negative bytes/shorts. > > The background is that one of our customers try to vectorize

Re: RFR: 8284992: Fix misleading Vector API doc for LSHR operator

2022-04-19 Thread Jie Fu
On Wed, 20 Apr 2022 00:46:32 GMT, Paul Sandoz wrote: > The intended pattern for the operator tokens is to present a short symbolic > description using Java operators and common methods. It would be good to try > and keep with this pattern, and clarify for the extra cases. Here's what i > had