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

2022-05-26 Thread Stuart Marks
On Thu, 26 May 2022 18:08:13 GMT, XenoAmess wrote: >> as title. > > XenoAmess has updated the pull request with a new target base due to a merge > or a rebase. The pull request now contains 16 commits: > > - Merge branch 'master' of https://git.openjdk.java.net/jdk into fix_8284780 > - Merge

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

2022-05-26 Thread liach
On Thu, 26 May 2022 18:08:13 GMT, XenoAmess wrote: >> as title. > > XenoAmess has updated the pull request with a new target base due to a merge > or a rebase. The pull request now contains 16 commits: > > - Merge branch 'master' of https://git.openjdk.java.net/jdk into fix_8284780 > - Merge

Re: RFR: 8287073: NPE from CgroupV2Subsystem.getInstance()

2022-05-26 Thread Peter Levart
On Wed, 25 May 2022 15:54:04 GMT, Maxim Kartashev wrote: >> `CgroupV1Subsystem.getInstance(...)` also claims that it never returns >> `null`, but has a code-path that actually returns `null` (when there is no >> active controller). Is this a possible outcome? > > @plevart Are you asking about

Re: RFR: 8284960: Integration of JEP 426: Vector API (Fourth Incubator) [v8]

2022-05-26 Thread Jatin Bhateja
On Wed, 25 May 2022 06:25:53 GMT, Jatin Bhateja wrote: >> src/hotspot/cpu/x86/assembler_x86.cpp line 8173: >> >>> 8171: >>> 8172: void Assembler::vinsertf32x4(XMMRegister dst, XMMRegister nds, >>> XMMRegister src, uint8_t imm8) { >>> 8173: assert(VM_Version::supports_evex(), ""); >> >>

Withdrawn: JDK-8277095 : Empty streams create too many objects

2022-05-26 Thread duke
On Fri, 5 Nov 2021 12:53:46 GMT, kabutz wrote: > This is a draft proposal for how we could improve stream performance for the > case where the streams are empty. Empty collections are common-place. If we > iterate over them with an Iterator, we would have to create one small > Iterator object

Re: RFR: 8287285: Avoid redundant HashMap.containsKey call in java.util.zip.ZipFile.Source.get

2022-05-26 Thread Alan Bateman
On Sat, 30 Apr 2022 08:56:23 GMT, Andrey Turbanov wrote: > The method `java.util.zip.ZipFile.Source#get` could be improved by usage of > `Map.putIfAbsent` instead of separate `containsKey`/`get`/`put` calls. We > known that HashMap `java.util.zip.ZipFile.Source#files` can contain only >

Re: RFR: 8286562: GCC 12 reports some compiler warnings [v10]

2022-05-26 Thread Yasumasa Suenaga
> I saw some compiler warnings when I tried to build OpenJDK with GCC 12.0.1 on > Fedora 36. > As you can see, the warnings spreads several areas. Let me know if I should > separate them by area. > > * -Wstringop-overflow > * src/hotspot/share/oops/array.hpp > * >

Re: RFR: 8286562: GCC 12 reports some compiler warnings [v9]

2022-05-26 Thread Yasumasa Suenaga
On Thu, 26 May 2022 03:48:31 GMT, Kim Barrett wrote: >> Yasumasa Suenaga has updated the pull request incrementally with two >> additional commits since the last revision: >> >> - Change Array::data() implementation >> - Avoid stringop-overflow warning in jfrTraceIdBits.inline.hpp > >

Re: RFR: 8287285: Avoid redundant HashMap.containsKey call in java.util.zip.ZipFile.Source.get

2022-05-26 Thread Jaikiran Pai
On Sat, 30 Apr 2022 08:56:23 GMT, Andrey Turbanov wrote: > The method `java.util.zip.ZipFile.Source#get` could be improved by usage of > `Map.putIfAbsent` instead of separate `containsKey`/`get`/`put` calls. We > known that HashMap `java.util.zip.ZipFile.Source#files` can contain only >

Integrated: 8287244: Add bound check in indexed memory access var handle

2022-05-26 Thread Maurizio Cimadamore
On Tue, 24 May 2022 14:40:56 GMT, Maurizio Cimadamore wrote: > Constructing indexed var handles using the `MemoryLayout` API produces > `VarHandle` which do not check the input indices for out-of-bounds conditions. > While this can never result in a VM crash (after all the memory segment will

Re: RFR: 8287073: NPE from CgroupV2Subsystem.getInstance() [v2]

2022-05-26 Thread Maxim Kartashev
> Following the logic from the comment directly above the changed line, since > it doesn't matter which controller we pick, pick any available controller > instead of the one called "memory" specifically. This way we are guarded > against getting `null` as `anyController`, which is being

Re: RFR: 8287073: NPE from CgroupV2Subsystem.getInstance() [v2]

2022-05-26 Thread Maxim Kartashev
On Thu, 26 May 2022 06:28:22 GMT, Peter Levart wrote: >> @plevart Are you asking about the reason for the crash or about the changes? >> If it's the former, then I believe that the crash comes not from >> `getInstance()` returning `null`, but from further down the stack because >> `null` is

Re: RFR: 8287073: NPE from CgroupV2Subsystem.getInstance() [v2]

2022-05-26 Thread Ioi Lam
On Thu, 26 May 2022 09:42:22 GMT, Maxim Kartashev wrote: >> Following the logic from the comment directly above the changed line, since >> it doesn't matter which controller we pick, pick any available controller >> instead of the one called "memory" specifically. This way we are guarded >>

Re: RFR: 8287073: NPE from CgroupV2Subsystem.getInstance() [v2]

2022-05-26 Thread Maxim Kartashev
On Thu, 26 May 2022 15:25:32 GMT, Ioi Lam wrote: >> Maxim Kartashev has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Removed unnecessary null checks > > src/java.base/linux/classes/jdk/internal/platform/CgroupSubsystemFactory.java >

Re: RFR: 8287073: NPE from CgroupV2Subsystem.getInstance() [v3]

2022-05-26 Thread Ioi Lam
On Thu, 26 May 2022 16:04:17 GMT, Maxim Kartashev wrote: >> Following the logic from the comment directly above the changed line, since >> it doesn't matter which controller we pick, pick any available controller >> instead of the one called "memory" specifically. This way we are guarded >>

Re: RFR: 8287073: NPE from CgroupV2Subsystem.getInstance() [v3]

2022-05-26 Thread Maxim Kartashev
> Following the logic from the comment directly above the changed line, since > it doesn't matter which controller we pick, pick any available controller > instead of the one called "memory" specifically. This way we are guarded > against getting `null` as `anyController`, which is being

Re: RFR: 8287073: NPE from CgroupV2Subsystem.getInstance() [v2]

2022-05-26 Thread Maxim Kartashev
On Thu, 26 May 2022 15:23:35 GMT, Ioi Lam wrote: >> Maxim Kartashev has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Removed unnecessary null checks > > src/java.base/linux/classes/jdk/internal/platform/CgroupSubsystemFactory.java >

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

2022-05-26 Thread XenoAmess
> as title. XenoAmess has updated the pull request incrementally with one additional commit since the last revision: rename items to elements - Changes: - all: https://git.openjdk.java.net/jdk/pull/8302/files - new:

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

2022-05-26 Thread XenoAmess
On Wed, 25 May 2022 05:07:12 GMT, Stuart Marks wrote: >> XenoAmess has updated the pull request incrementally with one additional >> commit since the last revision: >> >> add test for newHashSet and newLinkedHashSet > > src/java.base/share/classes/java/util/HashSet.java line 398: > >> 396:

RFR: 8233760: Result of BigDecimal.toString throws overflow exception on new BigDecimal(str)

2022-05-26 Thread Raffaello Giulietti
BigDecimal(String) currently fails to accept some strings produced by BigDecimal.toString(). This PR removes this limitation. - Commit messages: - 8233760: Result of BigDecimal.toString throws overflow exception on new BigDecimal(str) Changes:

Re: RFR: 8233760: Result of BigDecimal.toString throws overflow exception on new BigDecimal(str)

2022-05-26 Thread Raffaello Giulietti
On Thu, 26 May 2022 18:02:14 GMT, Raffaello Giulietti wrote: > BigDecimal(String) currently fails to accept some strings produced by > BigDecimal.toString(). This PR removes this limitation. This happens because the constructor currently only accepts exponents in the `int` range (more

RFR: 8287384: Speed up ForceGC

2022-05-26 Thread Xue-Lei Andrew Fan
Hi, May I have this test update reviewed? The ForceGC could be enhanced by using smaller wait/sleep time, and shared cleaner. Thanks, Xuelei - Commit messages: - 8287384: Speed up ForceGC Changes: https://git.openjdk.java.net/jdk/pull/8907/files Webrev:

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

2022-05-26 Thread XenoAmess
On Wed, 25 May 2022 04:50:33 GMT, liach wrote: >> XenoAmess has updated the pull request incrementally with one additional >> commit since the last revision: >> >> add test for newHashSet and newLinkedHashSet > > test/jdk/java/util/HashMap/WhiteBoxResizeTest.java line 354: > >> 352:

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

2022-05-26 Thread XenoAmess
> as title. XenoAmess has updated the pull request incrementally with two additional commits since the last revision: - add 8284780 to test - redo the tests - Changes: - all: https://git.openjdk.java.net/jdk/pull/8302/files - new:

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

2022-05-26 Thread XenoAmess
On Wed, 25 May 2022 05:22:44 GMT, Stuart Marks wrote: >> test/jdk/java/util/HashMap/WhiteBoxResizeTest.java line 360: >> >>> 358: throw new RuntimeException(e); >>> 359: } >>> 360: }) >> >> These probably need a 

Re: RFR: 8286562: GCC 12 reports some compiler warnings [v10]

2022-05-26 Thread Kim Barrett
On Thu, 26 May 2022 10:55:28 GMT, Yasumasa Suenaga wrote: >> I saw some compiler warnings when I tried to build OpenJDK with GCC 12.0.1 >> on Fedora 36. >> As you can see, the warnings spreads several areas. Let me know if I should >> separate them by area. >> >> * -Wstringop-overflow >>

Integrated: 8287187: Utilize HashMap.newHashMap() in CLDRConverter

2022-05-26 Thread Naoto Sato
On Wed, 25 May 2022 16:43:59 GMT, Naoto Sato wrote: > Refactoring the leftover self-calculations of the optimized `HashMap` initial > value with `newHashMap()` method. Also replaced some string literals using > text blocks for better readability. Confirmed that the output resource bundle >

Re: RFR: JDK-8281001 Examine the behavior of Class::forName if the caller is null [v3]

2022-05-26 Thread Tim Prinzing
> The Class::forName behavior change to match JNI FindClass is a compatible > change and seems pretty attractive as it would be expected that > Class::forName would give the same behavior as FindClass which uses the > system classloader. The test for 8281006 was enhanced to test for this >

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

2022-05-26 Thread XenoAmess
On Wed, 25 May 2022 23:23:13 GMT, Sergey Kuksenko wrote: > Is there any practical scenario where the current code (skip buffer > allocation on each invocation) creates issues? @kuksenko Not found any yet :) - PR: https://git.openjdk.java.net/jdk/pull/5872

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

2022-05-26 Thread XenoAmess
> as title. XenoAmess has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 16 commits: - Merge branch 'master' of https://git.openjdk.java.net/jdk into fix_8284780 - Merge remote-tracking branch 'openjdk/master' into fix_8284780

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

2022-05-26 Thread XenoAmess
> as title. XenoAmess has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 15 commits: - Merge remote-tracking branch 'openjdk/master' into fix_8284780 # Conflicts: #test/jdk/java/util/HashMap/WhiteBoxResizeTest.java - add

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

2022-05-26 Thread XenoAmess
On Wed, 18 May 2022 23:20:45 GMT, Stuart Marks wrote: >>> Need to add apiNote documentation section to capacity-based constructors >>> like for maps. >> >> @liach done. > > @XenoAmess oops, sorry for the delay. I think it would be good to get these > into 19 as companions to

Re: RFR: 8284942: Proxy building can just iterate superinterfaces once [v4]

2022-05-26 Thread Mandy Chung
On Fri, 20 May 2022 02:25:32 GMT, liach wrote: >> Currently, in ProxyBuilder::mapToModule and ProxyBuilder::defineProxyClass, >> the interfaces are iterated twice. The two passes can be merged into one, >> yielding the whole proxy definition context (module, package, whether >> there's

RFR: 8284400: Improve XPath exception handling

2022-05-26 Thread Joe Wang
Address some insufficiency of error handling in the XPath implementation. Some cleanup where appropriate, without attempting to do too much as this is an component that hasn't had much changes for 15 years, a fairly stable application. - Commit messages: - 8284400: Improve XPath

Re: RFR: JDK-8266670: Better modeling of access flags in core reflection [v20]

2022-05-26 Thread Joe Darcy
On Wed, 25 May 2022 19:22:51 GMT, Roger Riggs wrote: > AccessFlags.SUPER can/should be removed; it is unused and will be redefined > in the [Value Objects JEP](https://openjdk.java.net/jeps/8277163). It will be > a cleaner transition if there is no opportunity to create a dependency on the >

RFR: 8287125: [macos] Multiple jpackage tests fail/timeout on same host

2022-05-26 Thread Alexander Matveev
Looks like regression from JDK-8277493. JDK-8277493 will always un-sign app image. Un-signing takes time since we enumerating all files and un-signing binaries one by one. Average increase 2-3 minutes for tests which generates multiple app images. Fixed by increasing timeout for reported tests.

Re: RFR: 8285401: Proxy class initializer should use 3-arg `Class.forName` to avoid unnecessary class initialization [v4]

2022-05-26 Thread Mandy Chung
On Thu, 26 May 2022 20:52:43 GMT, liach wrote: >> Simplify calls `Class.forName(String, boolean, ClassLoader)` instead of >> `Class.forName(String)`. `make test >> TEST="jtreg:test/jdk/java/lang/reflect/Proxy"` passes, with the new >> `LazyInitializationTest` failing the eager initialization

Re: RFR: 8287064: Modernize ProxyGenerator.PrimitiveTypeInfo [v5]

2022-05-26 Thread Mandy Chung
On Fri, 27 May 2022 00:16:00 GMT, liach wrote: >> Simplify opcode handling, use `final` in `PrimitiveTypeInfo`, and replace >> the hash map with a simple lookup, similar to what's done in >> [JDK-8284880](https://bugs.openjdk.java.net/browse/JDK-8284880) (#8242) > > liach has updated the pull

Re: RFR: 8285401: Proxy class initializer should use 3-arg `Class.forName` to avoid unnecessary class initialization [v5]

2022-05-26 Thread liach
> Simplify calls `Class.forName(String, boolean, ClassLoader)` instead of > `Class.forName(String)`. `make test > TEST="jtreg:test/jdk/java/lang/reflect/Proxy"` passes, with the new > `LazyInitializationTest` failing the eager initialization check on the > baseline and passing with this patch.

Re: RFR: 8285401: Proxy class initializer should use 3-arg `Class.forName` to avoid unnecessary class initialization [v4]

2022-05-26 Thread liach
On Fri, 27 May 2022 01:55:25 GMT, Mandy Chung wrote: >> liach 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 eight additional commits >> since

Re: RFR: 8284199: Implementation of Structured Concurrency (Incubator) [v3]

2022-05-26 Thread Joe Darcy
On Tue, 24 May 2022 15:15:43 GMT, Alan Bateman wrote: >> This is the implementation of JEP 428: Structured Concurrency (Incubator). >> >> This is a non-final API that provides a gentle on-ramp to structure a task >> as a family of concurrent subtasks, and to coordinate the subtasks as a unit.

Re: RFR: JDK-8284858: Start of release updates for JDK 20 [v2]

2022-05-26 Thread Iris Clark
On Thu, 26 May 2022 23:05:32 GMT, Joe Darcy wrote: >> Time to start getting ready for JDK 20... > > Joe Darcy has updated the pull request incrementally with one additional > commit since the last revision: > > Respond to review feedback. Marked as reviewed by iris (Reviewer).

Re: RFR: 8284942: Proxy building can just iterate superinterfaces once [v5]

2022-05-26 Thread liach
On Thu, 26 May 2022 21:32:53 GMT, Mandy Chung wrote: >> liach 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 seven additional commits >> since

Re: RFR: 8287384: Speed up jdk.test.lib.util.ForceGC

2022-05-26 Thread Roger Riggs
On Thu, 26 May 2022 18:50:07 GMT, Xue-Lei Andrew Fan wrote: > Hi, > > May I have this test update reviewed? > > The ForceGC could be enhanced by using smaller wait/sleep time, and shared > cleaner. > > Thanks, > Xuelei ok, the updates look fine. - Marked as reviewed by rriggs

RFR: JDK-8284858: Start of release updates for JDK 20

2022-05-26 Thread Joe Darcy
Time to start getting ready for JDK 20... - Commit messages: - Update symbol information for JDK 19 b24. - Merge branch 'master' into JDK-8284858 - Merge branch 'master' into JDK-8284858 - Merge branch 'master' into JDK-8284858 - Merge branch 'master' into JDK-8284858 - Merge

Re: RFR: JDK-8284858: Start of release updates for JDK 20

2022-05-26 Thread Joe Darcy
On Thu, 14 Apr 2022 05:09:14 GMT, Joe Darcy wrote: > Time to start getting ready for JDK 20... The expected kinds of updates to start up JDK 20. - PR: https://git.openjdk.java.net/jdk/pull/8236

Withdrawn: 8283726: x86 intrinsics for compare method in Integer and Long

2022-05-26 Thread duke
On Sun, 27 Mar 2022 06:15:34 GMT, Srinivas Vamsi Parasa wrote: > Implements x86 intrinsics for compare() method in java.lang.Integer and > java.lang.Long. This pull request has been closed without being integrated. - PR: https://git.openjdk.java.net/jdk/pull/7975

Re: RFR: JDK-8284858: Start of release updates for JDK 20

2022-05-26 Thread Kevin Rushforth
On Thu, 14 Apr 2022 05:09:14 GMT, Joe Darcy wrote: > Time to start getting ready for JDK 20... You also need to change the JBS version from 19 to 20 in [`.jcheck/conf`](https://github.com/openjdk/jdk/blob/6a33974a6b8a629744c6d76c3b4fa1f772e52ac8/.jcheck/conf#L4): - PR:

Re: RFR: JDK-8284858: Start of release updates for JDK 20

2022-05-26 Thread David Holmes
On Thu, 14 Apr 2022 05:09:14 GMT, Joe Darcy wrote: > Time to start getting ready for JDK 20... One comment below. I ignored the sym files. Everything else appears okay. Thanks. src/java.base/share/classes/jdk/internal/org/objectweb/asm/Opcodes.java line 312: > 310: int V18 = 0 << 16 |

Re: RFR: JDK-8284858: Start of release updates for JDK 20 [v2]

2022-05-26 Thread Joe Darcy
> Time to start getting ready for JDK 20... Joe Darcy has updated the pull request incrementally with one additional commit since the last revision: Respond to review feedback. - Changes: - all: https://git.openjdk.java.net/jdk/pull/8236/files - new:

Withdrawn: JDK-8282798 java.lang.runtime.Carrier

2022-05-26 Thread duke
On Tue, 8 Mar 2022 14:02:39 GMT, Jim Laskey wrote: > We propose to provide a runtime anonymous carrier class object generator; > java.lang.runtime.Carrier. This generator class is designed to share > anonymous classes when shapes are similar. For example, if several clients > require objects

Re: RFR: JDK-8284858: Start of release updates for JDK 20 [v2]

2022-05-26 Thread Joe Darcy
On Thu, 26 May 2022 22:38:12 GMT, David Holmes wrote: >> Joe Darcy has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Respond to review feedback. > > src/java.base/share/classes/jdk/internal/org/objectweb/asm/Opcodes.java line > 312: >

Re: RFR: JDK-8284858: Start of release updates for JDK 20

2022-05-26 Thread Joe Darcy
On Thu, 26 May 2022 22:40:59 GMT, Kevin Rushforth wrote: > You also need to change the JBS version from 19 to 20 in > [`.jcheck/conf`](https://github.com/openjdk/jdk/blob/6a33974a6b8a629744c6d76c3b4fa1f772e52ac8/.jcheck/conf#L4): Acknowledged; will fix in the next push. Thanks. -

Re: RFR: JDK-8282798 java.lang.runtime.Carrier [v19]

2022-05-26 Thread liach
On Thu, 31 Mar 2022 18:48:39 GMT, Jim Laskey wrote: >> We propose to provide a runtime anonymous carrier class object generator; >> java.lang.runtime.Carrier. This generator class is designed to share >> anonymous classes when shapes are similar. For example, if several clients >> require

Re: RFR: JDK-8284858: Start of release updates for JDK 20 [v2]

2022-05-26 Thread Kevin Rushforth
On Thu, 26 May 2022 23:05:32 GMT, Joe Darcy wrote: >> Time to start getting ready for JDK 20... > > Joe Darcy has updated the pull request incrementally with one additional > commit since the last revision: > > Respond to review feedback. Marked as reviewed by kcr (Author). -

Re: RFR: 8287064: Modernize ProxyGenerator.PrimitiveTypeInfo [v4]

2022-05-26 Thread liach
> Simplify opcode handling, use `final` in `PrimitiveTypeInfo`, and replace the > hash map with a simple lookup, similar to what's done in > [JDK-8284880](https://bugs.openjdk.java.net/browse/JDK-8284880) (#8242) liach has updated the pull request incrementally with one additional commit since

Re: RFR: 8287064: Modernize ProxyGenerator.PrimitiveTypeInfo [v3]

2022-05-26 Thread liach
On Thu, 26 May 2022 22:51:39 GMT, Mandy Chung wrote: >> liach 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 three additional commits >> since

Re: RFR: 8287064: Modernize ProxyGenerator.PrimitiveTypeInfo [v3]

2022-05-26 Thread liach
On Thu, 26 May 2022 22:55:02 GMT, Mandy Chung wrote: >> liach 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 three additional commits >> since

Re: RFR: 8284942: Proxy building can just iterate superinterfaces once [v5]

2022-05-26 Thread Mandy Chung
On Thu, 26 May 2022 22:01:56 GMT, liach wrote: >> src/java.base/share/classes/java/lang/reflect/Proxy.java line 513: >> >>> 511: >>> 512: if (!module.isOpen(pkg, Proxy.class.getModule())) { >>> 513: // Required for default method invocation >> >> Is

Re: RFR: 8287064: Modernize ProxyGenerator.PrimitiveTypeInfo [v3]

2022-05-26 Thread Mandy Chung
On Thu, 26 May 2022 20:55:53 GMT, liach wrote: >> Simplify opcode handling, use `final` in `PrimitiveTypeInfo`, and replace >> the hash map with a simple lookup, similar to what's done in >> [JDK-8284880](https://bugs.openjdk.java.net/browse/JDK-8284880) (#8242) > > liach has updated the pull

Re: RFR: 8284942: Proxy building can just iterate superinterfaces once [v6]

2022-05-26 Thread liach
> Currently, in ProxyBuilder::mapToModule and ProxyBuilder::defineProxyClass, > the interfaces are iterated twice. The two passes can be merged into one, > yielding the whole proxy definition context (module, package, whether there's > package-private interface) when determining the module. >

Re: RFR: 8284942: Proxy building can just iterate superinterfaces once [v5]

2022-05-26 Thread liach
On Thu, 26 May 2022 22:33:29 GMT, Mandy Chung wrote: >> The original check and `Modules.addOpen` calls were added in >> [8159476](https://bugs.openjdk.java.net/browse/JDK-8159746), when the >> `invokeDefault` support was added. >> >> See: >>

Re: RFR: 8283660: Convert com/sun/jndi/ldap/AbstractLdapNamingEnumeration.java finalizer to Cleaner [v6]

2022-05-26 Thread Brent Christian
On Sat, 23 Apr 2022 00:09:48 GMT, Brent Christian wrote: >> src/java.naming/share/classes/com/sun/jndi/ldap/AbstractLdapNamingEnumeration.java >> line 73: >> >>> 71: public void run() { >>> 72: if (enumClnt != null) { >>> 73: enumClnt.clearSearchReply(res,

Re: RFR: 8287064: Modernize ProxyGenerator.PrimitiveTypeInfo [v3]

2022-05-26 Thread Mandy Chung
On Thu, 26 May 2022 23:35:10 GMT, liach wrote: >> src/java.base/share/classes/java/lang/reflect/ProxyGenerator.java line 969: >> >>> 967: // single-char BaseType descriptor (see JVMS section 4.3.2) >>> 968: String baseTypeString = wrapper.basicTypeString(); >>> 969:

Re: RFR: 8287064: Modernize ProxyGenerator.PrimitiveTypeInfo [v4]

2022-05-26 Thread Mandy Chung
On Thu, 26 May 2022 23:42:27 GMT, liach wrote: >> Simplify opcode handling, use `final` in `PrimitiveTypeInfo`, and replace >> the hash map with a simple lookup, similar to what's done in >> [JDK-8284880](https://bugs.openjdk.java.net/browse/JDK-8284880) (#8242) > > liach has updated the pull

Re: RFR: 8287064: Modernize ProxyGenerator.PrimitiveTypeInfo [v5]

2022-05-26 Thread liach
> Simplify opcode handling, use `final` in `PrimitiveTypeInfo`, and replace the > hash map with a simple lookup, similar to what's done in > [JDK-8284880](https://bugs.openjdk.java.net/browse/JDK-8284880) (#8242) liach has updated the pull request incrementally with one additional commit since

Re: RFR: 8287064: Modernize ProxyGenerator.PrimitiveTypeInfo [v3]

2022-05-26 Thread liach
> Simplify opcode handling, use `final` in `PrimitiveTypeInfo`, and replace the > hash map with a simple lookup, similar to what's done in > [JDK-8284880](https://bugs.openjdk.java.net/browse/JDK-8284880) (#8242) liach has updated the pull request with a new target base due to a merge or a

Re: RFR: 8287384: Speed up ForceGC

2022-05-26 Thread Ioi Lam
On Thu, 26 May 2022 18:50:07 GMT, Xue-Lei Andrew Fan wrote: > Hi, > > May I have this test update reviewed? > > The ForceGC could be enhanced by using smaller wait/sleep time, and shared > cleaner. > > Thanks, > Xuelei Please rename the RFE title to be less generic. How about "Speed up

Integrated: 8287285: Avoid redundant HashMap.containsKey call in java.util.zip.ZipFile.Source.get

2022-05-26 Thread Andrey Turbanov
On Sat, 30 Apr 2022 08:56:23 GMT, Andrey Turbanov wrote: > The method `java.util.zip.ZipFile.Source#get` could be improved by usage of > `Map.putIfAbsent` instead of separate `containsKey`/`get`/`put` calls. We > known that HashMap `java.util.zip.ZipFile.Source#files` can contain only >

Re: RFR: 8285401: Proxy class initializer should use 3-arg `Class.forName` to avoid unnecessary class initialization [v4]

2022-05-26 Thread liach
> Simplify calls `Class.forName(String, boolean, ClassLoader)` instead of > `Class.forName(String)`. `make test > TEST="jtreg:test/jdk/java/lang/reflect/Proxy"` passes, with the new > `LazyInitializationTest` failing the eager initialization check on the > baseline and passing with this patch.

Re: RFR: 8287384: Speed up jdk.test.lib.util.ForceGC

2022-05-26 Thread Roger Riggs
On Thu, 26 May 2022 18:50:07 GMT, Xue-Lei Andrew Fan wrote: > Hi, > > May I have this test update reviewed? > > The ForceGC could be enhanced by using smaller wait/sleep time, and shared > cleaner. > > Thanks, > Xuelei Even using a Cleaner is a more overhead than necessary. I would have

Re: RFR: 8282662: Use List.of() factory method to reduce memory consumption [v6]

2022-05-26 Thread Сергей Цыпанов
> `List.of()` along with `Set.of()` create unmodifiable `List/Set` but with > smaller footprint comparing to `Arrays.asList()` / `new HashSet()` when > called with vararg of size 0, 1, 2. > > In general replacement of `Arrays.asList()` with `List.of()` is dubious as > the latter is

Re: RFR: 8284960: Integration of JEP 426: Vector API (Fourth Incubator) [v10]

2022-05-26 Thread Vladimir Kozlov
On Wed, 25 May 2022 06:29:23 GMT, Jatin Bhateja wrote: >> Hi All, >> >> Patch adds the planned support for new vector operations and APIs targeted >> for [JEP 426: Vector API (Fourth >> Incubator).](https://bugs.openjdk.java.net/browse/JDK-8280173) >> >> Following is the brief summary of

Re: RFR: 8284960: Integration of JEP 426: Vector API (Fourth Incubator) [v8]

2022-05-26 Thread Vladimir Kozlov
On Thu, 26 May 2022 06:19:40 GMT, Jatin Bhateja wrote: >> Yes. > >> @jatin-bhateja something wrong with merge. `vpadd()` is removed. It was >> added by #8778 and still is used in `x86.ad`. > > Hi @vnkozlov , after integration of PR 8778 there were there were two copies > of vpadd with same

Re: RFR: 8284942: Proxy building can just iterate superinterfaces once [v5]

2022-05-26 Thread Mandy Chung
On Thu, 26 May 2022 20:53:29 GMT, liach wrote: >> Currently, in ProxyBuilder::mapToModule and ProxyBuilder::defineProxyClass, >> the interfaces are iterated twice. The two passes can be merged into one, >> yielding the whole proxy definition context (module, package, whether >> there's

Re: RFR: 8284942: Proxy building can just iterate superinterfaces once [v5]

2022-05-26 Thread liach
> Currently, in ProxyBuilder::mapToModule and ProxyBuilder::defineProxyClass, > the interfaces are iterated twice. The two passes can be merged into one, > yielding the whole proxy definition context (module, package, whether there's > package-private interface) when determining the module. >

RFR: [CSR] 8287376: BigDecimal(String) must allow a larger range for the exponent

2022-05-26 Thread Raffaello Giulietti
Currently, BigDecimal(String) requires the exponent part to lie in the int range. This CSR [1] removes this limitation, as it otherwise precludes constructing an instance from a string generated by BigDecimal.toString(). Greetings Raffaello [1]

Re: RFR: 8287292: Improve TransformKey to pack more kinds of transforms efficiently [v3]

2022-05-26 Thread Mandy Chung
On Wed, 25 May 2022 14:13:52 GMT, Claes Redestad wrote: >> The bespoke caching scheme in `jl.invoke.LambdaFormEditor.TransformKey` >> allows keys to be compacted when all byte values of the key fit in 4 bits, >> otherwise a byte array is allocated and used. This means that all transforms >>

Re: RFR: 8287384: Speed up jdk.test.lib.util.ForceGC

2022-05-26 Thread Xue-Lei Andrew Fan
On Thu, 26 May 2022 21:22:23 GMT, Roger Riggs wrote: > Even using a Cleaner is a more overhead than necessary. I would have skipped > the overhead of a cleaner and Atomic classes with something more self > contained as a static method: I agreed that the using of Cleaner is still heavy, but