Re: RFR: 8288425: Footprint regression due MH creation when initializing StringConcatFactory

2022-06-14 Thread Mandy Chung
On Tue, 14 Jun 2022 15:16:27 GMT, Claes Redestad wrote: > Avoid doing MH creation when initializing `StringConcatFactory` by lazily > initializing to a `@Stable` field instead. Marked as reviewed by mchung (Reviewer). - PR: https://git.openjdk.org/jdk/pull/9154

Re: RFR: 8287917: System.loadLibrary does not work on Big Sur if JDK is built with macOS SDK 10.15 and earlier

2022-06-10 Thread Mandy Chung
On Wed, 8 Jun 2022 04:59:07 GMT, Yoshiki Sato wrote: > Please review this PR. > SDK 10.15 and earlier reports os.version as 10.16 on Big Sur. This fix will > check if dynamic linker support, which is supported from Big Sur, is > available or not on the OS even if os.version is reported as

Re: RFR: 8288011: StringConcatFactory: Split application of stringifiers [v2]

2022-06-09 Thread Mandy Chung
On Thu, 9 Jun 2022 16:04:43 GMT, Claes Redestad wrote: >> To take optimal advantage of the pre-existing optimization for repeated >> filters we could split the application of different types of stringifiers. >> >> The resulting difference in order of evaluation is not observable by >>

Re: RFR: JDK-8281001 Class::forName(String) defaults to system class loader if the caller is null [v6]

2022-06-08 Thread Mandy Chung
On Wed, 8 Jun 2022 13:07:20 GMT, Tim Prinzing wrote: >> 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

Re: RFR: JDK-8281001 Class::forName(String) defaults to system class loader if the caller is null [v5]

2022-06-07 Thread Mandy Chung
On Wed, 8 Jun 2022 02:40:15 GMT, Tim Prinzing wrote: >> 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

Re: CFV: new Core Libraries Group member: Roger Riggs

2022-06-07 Thread Mandy Chung
Vote: yes Mandy

Re: CVF: new Core Libraries Group member: Naoto Sato

2022-06-07 Thread Mandy Chung
Vote: yes Mandy

Integrated: JDK-8287867: Bad merge of jdk/test/lib/util/ForceGC.java causing test compilation error

2022-06-06 Thread Mandy Chung
On Mon, 6 Jun 2022 21:58:20 GMT, Mandy Chung wrote: > A typo in ForceGC.java causes several test failing due to compilation error. This pull request has now been integrated. Changeset: a50b06e8 Author: Mandy Chung URL: https://git.openjdk.java.net/jdk/com

Re: RFR: JDK-8287867: Bad merge of jdk/test/lib/util/ForceGC.java causing test compilation error

2022-06-06 Thread Mandy Chung
On Mon, 6 Jun 2022 21:58:20 GMT, Mandy Chung wrote: > A typo in ForceGC.java causes several test failing due to compilation error. thanks for the prompt review. - PR: https://git.openjdk.java.net/jdk/pull/9043

RFR: JDK-8287867: Bad merge of jdk/test/lib/util/ForceGC.java causing test compilation error

2022-06-06 Thread Mandy Chung
A typo in ForceGC.java causes several test failing due to compilation error. - Commit messages: - JDK-8287867: Bad merge of jdk/test/lib/util/ForceGC.java causing compilation error Changes: https://git.openjdk.java.net/jdk/pull/9043/files Webrev:

Integrated: JDK-8287671: Adjust ForceGC to invoke System::gc fewer times for negative case

2022-06-06 Thread Mandy Chung
On Fri, 3 Jun 2022 18:05:52 GMT, Mandy Chung wrote: > This reapplies JDK-8287384 and adjust the number of GCs for negative case, > i.e. the condition is never met that is used to verify a reference is not > GC'ed. This pull request has now been integrated. Changeset: 2e332c

Re: RFR: JDK-8287671: Adjust ForceGC to invoke System::gc fewer times for negative case

2022-06-06 Thread Mandy Chung
On Fri, 3 Jun 2022 18:05:52 GMT, Mandy Chung wrote: > This reapplies JDK-8287384 and adjust the number of GCs for negative case, > i.e. the condition is never met that is used to verify a reference is not > GC'ed. JDK-8287384 affects the tests using ForceGC for negative c

Re: RFR: 8287810: Reduce runtime of java.lang microbenchmarks

2022-06-03 Thread Mandy Chung
On Fri, 3 Jun 2022 15:05:33 GMT, Claes Redestad wrote: > - Reduce runtime by providing explicit configurations that try to run the > micros as fast as possible while giving enough time for warmup. > - Remove some excessive parameters > - Remove some benchmarks testing experimental features >

Re: RFR: 8287785: Reduce runtime of java.lang.invoke microbenchmarks [v2]

2022-06-03 Thread Mandy Chung
On Fri, 3 Jun 2022 12:53:38 GMT, Claes Redestad wrote: >> - Add explicit run configurations to java.lang.invoke micros, aiming to >> reduce runtime while maintaining a decently high confidence that there's >> enough warmup to produce good enough data. >> >> - Remove several trivial baseline

Re: RFR: 8287798: Reduce runtime of java.lang.reflect/runtime microbenchmarks

2022-06-03 Thread Mandy Chung
On Fri, 3 Jun 2022 12:46:31 GMT, Claes Redestad wrote: > Add explicit run configurations to java.lang.reflect and .runtime micros, > aiming to reduce runtime while maintaining a decently high confidence that > there's enough warmup to produce good enough data. > > Roughly halves runtime of

RFR: JDK-8287671: Adjust ForceGC to invoke System::gc fewer times for negative case

2022-06-03 Thread Mandy Chung
This reapplies JDK-8287384 and adjust the number of GCs for negative case, i.e. the condition is never met that is used to verify a reference is not GC'ed. - Commit messages: - JDK-8287671: Adjust ForceGC to invoke System::gc fewer times for negative case Changes:

Integrated: 8287746: ProblemList jni/nullCaller/NullCallerTest.java

2022-06-02 Thread Mandy Chung
On Thu, 2 Jun 2022 18:57:36 GMT, Mandy Chung wrote: > 8287746: ProblemList jni/nullCaller/NullCallerTest.java This pull request has now been integrated. Changeset: 37e1835b Author: Mandy Chung URL: https://git.openjdk.java.net/jdk/commit/37e1835be76f5f141ba0dc067578bfe767ca9

Re: RFR: 8287746: ProblemList jni/nullCaller/NullCallerTest.java

2022-06-02 Thread Mandy Chung
On Thu, 2 Jun 2022 19:12:18 GMT, Daniel D. Daugherty wrote: >> 8287746: ProblemList jni/nullCaller/NullCallerTest.java > > test/jdk/ProblemList.txt line 500: > >> 498: java/lang/invoke/lambda/LambdaFileEncodingSerialization.java8249079 >> linux-x64 >> 499:

RFR: 8287746: ProblemList jni/nullCaller/NullCallerTest.java

2022-06-02 Thread Mandy Chung
8287746: ProblemList jni/nullCaller/NullCallerTest.java - Commit messages: - 8287746: ProblemList jni/nullCaller/NullCallerTest.java Changes: https://git.openjdk.java.net/jdk/pull/9002/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk=9002=00 Issue:

Re: RFR: 8287522: StringConcatFactory: Add in prependers and mixers in batches [v4]

2022-06-01 Thread Mandy Chung
On Wed, 1 Jun 2022 13:31:27 GMT, Claes Redestad wrote: >> When generating `MethodHandle`-based concatenation expressions in >> `StringConcatFactory` we can reduce the number of classes generated at >> runtime by creating small batches of prependers and mixers before binding >> them into the

Re: RFR: 8287596: Reorg jdk.test.lib.util.ForceGC [v2]

2022-06-01 Thread Mandy Chung
On Wed, 1 Jun 2022 21:07:16 GMT, Xue-Lei Andrew Fan wrote: >> This is a follow up update per comments in [JDK-8287384 >> PR](https://github.com/openjdk/jdk/pull/8907). The tier1 and tier2 test in >> open part looks good to me. Please help to run Mach5 just case the closed >> test cases are

Re: RFR: 8287522: StringConcatFactory: Add in prependers and mixers in batches [v2]

2022-06-01 Thread Mandy Chung
On Mon, 30 May 2022 20:23:40 GMT, Claes Redestad wrote: >> When generating `MethodHandle`-based concatenation expressions in >> `StringConcatFactory` we can reduce the number of classes generated at >> runtime by creating small batches of prependers and mixers before binding >> them into the

Re: RFR: 8287522: StringConcatFactory: Add in prependers and mixers in batches [v4]

2022-06-01 Thread Mandy Chung
On Wed, 1 Jun 2022 13:31:27 GMT, Claes Redestad wrote: >> When generating `MethodHandle`-based concatenation expressions in >> `StringConcatFactory` we can reduce the number of classes generated at >> runtime by creating small batches of prependers and mixers before binding >> them into the

Re: RFR: 8287596: Reorg jdk.test.lib.util.ForceGC

2022-06-01 Thread Mandy Chung
On Wed, 1 Jun 2022 19:08:03 GMT, Xue-Lei Andrew Fan wrote: > This is a follow up update per comments in [JDK-8287384 > PR](https://github.com/openjdk/jdk/pull/8907). The tier1 and tier2 test in > open part looks good to me. Please help to run Mach5 just case the closed > test cases are

Re: RFR: 8287171: Refactor null caller tests to a single directory [v8]

2022-06-01 Thread Mandy Chung
On Wed, 1 Jun 2022 19:27:33 GMT, Tim Prinzing wrote: >> Created a test at test/jdk/jdk/nullCaller called NullCallerTest that creates >> a test module with some resources in it for the actual tests that occur at >> the native level. The native part was switched to c++ instead of c to make >>

Re: RFR: 8287171: Refactor null caller tests to a single directory [v6]

2022-06-01 Thread Mandy Chung
On Wed, 1 Jun 2022 03:01:35 GMT, Tim Prinzing wrote: >> Created a test at test/jdk/jdk/nullCaller called NullCallerTest that creates >> a test module with some resources in it for the actual tests that occur at >> the native level. The native part was switched to c++ instead of c to make >>

Re: RFR: 8287171: Refactor null caller tests to a single directory [v4]

2022-05-31 Thread Mandy Chung
On Wed, 1 Jun 2022 00:59:33 GMT, Tim Prinzing wrote: >> Created a test at test/jdk/jdk/nullCaller called NullCallerTest that creates >> a test module with some resources in it for the actual tests that occur at >> the native level. The native part was switched to c++ instead of c to make >>

Re: RFR: 8287496: Alternative virtual thread implementation that maps to OS thread [v2]

2022-05-31 Thread Mandy Chung
On Tue, 31 May 2022 15:39:39 GMT, Alan Bateman wrote: >> This patch adds an alternative virtual thread implementation where each >> virtual thread is backed by an OS thread. It doesn't scale but it can be >> used by ports that don't have continuations support in the VM. Aside from >>

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

2022-05-31 Thread Mandy Chung
On Thu, 26 May 2022 23:20:27 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: 8287171: Refactor null caller tests to a single directory [v3]

2022-05-31 Thread Mandy Chung
On Mon, 30 May 2022 00:10:50 GMT, Tim Prinzing wrote: >> Created a test at test/jdk/jdk/nullCaller called NullCallerTest that creates >> a test module with some resources in it for the actual tests that occur at >> the native level. The native part was switched to c++ instead of c to make >>

Re: RFR: 8287171: Refactor null caller tests to a single directory [v3]

2022-05-31 Thread Mandy Chung
On Mon, 30 May 2022 05:37:16 GMT, Alan Bateman wrote: > I don't think jdk/nullCaller is right location for this. Maybe jni/nullCaller > could work. You'll probably need to add the location to an appropriate > group/tier in test/jdk/TEST.groups, otherwise it won't be run. I also think

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

2022-05-31 Thread Mandy Chung
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 Marked as reviewed by mchung (Reviewer). - PR:

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

2022-05-31 Thread Mandy Chung
On Thu, 26 May 2022 21:40:42 GMT, Xue-Lei Andrew Fan 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: Hmm... one benefit of Cleaner is the ease of use to

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

2022-05-31 Thread Mandy Chung
On Tue, 31 May 2022 13:26:17 GMT, Daniel Fuchs 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 > > test/lib/jdk/test/lib/util/ForceGC.java line 50: > >> 48:

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

2022-05-31 Thread Mandy Chung
On Wed, 25 May 2022 00:35:24 GMT, Joe Darcy wrote: >> This is an early review of changes to better model JVM access flags, that is >> "modifiers" like public, protected, etc. but explicitly at a VM level. >> >> Language level modifiers and JVM level access flags are closely related, but >>

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

2022-05-27 Thread Mandy Chung
On Wed, 25 May 2022 00:35:24 GMT, Joe Darcy wrote: >> This is an early review of changes to better model JVM access flags, that is >> "modifiers" like public, protected, etc. but explicitly at a VM level. >> >> Language level modifiers and JVM level access flags are closely related, but >>

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

2022-05-27 Thread Mandy Chung
On Wed, 25 May 2022 00:35:24 GMT, Joe Darcy wrote: >> This is an early review of changes to better model JVM access flags, that is >> "modifiers" like public, protected, etc. but explicitly at a VM level. >> >> Language level modifiers and JVM level access flags are closely related, but >>

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 [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 [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 [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 [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 [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: 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: 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: 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

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

2022-05-25 Thread Mandy Chung
On Tue, 17 May 2022 20:16:48 GMT, Tim Prinzing wrote: >> 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

Re: RFR: 8287206: Use WrongThreadException for confinement errors

2022-05-24 Thread Mandy Chung
On Tue, 24 May 2022 09:26:44 GMT, Maurizio Cimadamore wrote: > This patch tweaks the foreign API to use the newly added > `WrongThreadException` instead of `IllegalStateException` to report > confinement errors. Marked as reviewed by mchung (Reviewer). - PR:

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

2022-05-19 Thread Mandy Chung
On Thu, 19 May 2022 23:44:12 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 [v2]

2022-05-19 Thread Mandy Chung
On Thu, 21 Apr 2022 03:44:18 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: 8286858: Remove dead code in sun.reflect.misc.MethodUtil

2022-05-17 Thread Mandy Chung
On Sun, 15 May 2022 12:47:10 GMT, Andrey Turbanov wrote: > They are unused and leftover since JDK 7. It's good to remove them. Looks good. Do you know why there are test failures (they look unrelated)? - Marked as reviewed by mchung (Reviewer). PR:

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

2022-05-17 Thread Mandy Chung
On Tue, 17 May 2022 16:55:14 GMT, Tim Prinzing wrote: > I like the idea of moving all the null caller tests to a clearly named > directory to avoid duplication. +1. You can do this refactoring in a separate JBS issue and then update this PR when the tests are moved. - PR:

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

2022-05-16 Thread Mandy Chung
On Sat, 14 May 2022 00:30:00 GMT, Tim Prinzing wrote: > 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.

Re: Unused method sun.reflect.misc.MethodUtil.getPublicMethods

2022-05-11 Thread Mandy Chung
They are unused and leftover since JDK 7. It's good to remove them. Thanks Mandy On 4/30/22 7:48 AM, Andrey Turbanov wrote: Hello. I found a few methods in MethodUtil class which seem unused to me: getPublicMethods, getInterfaceMethods, getInternalPublicMethods ,addMethod. Are they somehow

Re: RFR: 8282701: Use Class.getInterfaces(false) where possible to reduce allocation pressure [v2]

2022-05-10 Thread Mandy Chung
On Wed, 4 May 2022 09:46:00 GMT, Сергей Цыпанов wrote: >> `Class.getInterfaces(false)` does not clone underlying array and can be used >> in cases when the returned array is only read from. > > Сергей Цыпанов has updated the pull request incrementally with one additional > commit since the

Re: RFR: 8286474: Drop --enable-preview from Sealed Classes related tests [v2]

2022-05-10 Thread Mandy Chung
On Tue, 10 May 2022 14:58:15 GMT, Aleksey Shipilev wrote: >> There are plenty of tests failing on many architectures due to >> `--enable-preview` VM code introduced by Loom. This improvement eliminates >> some of the redundant `--enable-preview` clauses from the Sealed Classes >> tests, since

Re: RFR: 8286473: Drop --enable-preview from Record related tests [v2]

2022-05-10 Thread Mandy Chung
On Tue, 10 May 2022 14:54:39 GMT, Aleksey Shipilev wrote: >> There are plenty of tests failing on many architectures due to >> `--enable-preview` VM code introduced by Loom. This improvements eliminates >> some of the redundant `--enable-preview` clauses from the Record tests, >> since

Re: RFR: 8286298: Remove unused methods in sun.invoke.util.VerifyType [v2]

2022-05-09 Thread Mandy Chung
On Mon, 9 May 2022 10:12:36 GMT, Claes Redestad wrote: >> A few untested and unused methods in `VerifyType` which can be removed. >> (Possibly used by native JSR 292 implementations in JDK 7). > > Claes Redestad has updated the pull request incrementally with one additional > commit since the

Re: RFR: JDK-8286347: incorrect use of `{@link}`

2022-05-06 Thread Mandy Chung
On Fri, 6 May 2022 23:30:44 GMT, Jonathan Gibbons wrote: > Please review a small doc fix to update incorrect use of `{@link}` on arrays > of primitive types. Marked as reviewed by mchung (Reviewer). - PR: https://git.openjdk.java.net/jdk/pull/8584

Re: RFR: 8282191: Implementation of Foreign Function & Memory API (Preview) [v41]

2022-05-06 Thread Mandy Chung
On Fri, 6 May 2022 16:48:11 GMT, Maurizio Cimadamore wrote: >> This PR contains the API and implementation changes for JEP-424 [1]. A more >> detailed description of such changes, to avoid repetitions during the review >> process, is included as a separate comment. >> >> [1] -

Re: RFR: 8282191: Implementation of Foreign Function & Memory API (Preview) [v39]

2022-05-05 Thread Mandy Chung
On Thu, 5 May 2022 20:54:53 GMT, Maurizio Cimadamore wrote: >> This PR contains the API and implementation changes for JEP-424 [1]. A more >> detailed description of such changes, to avoid repetitions during the review >> process, is included as a separate comment. >> >> [1] -

Re: RFR: 8282191: Implementation of Foreign Function & Memory API (Preview) [v37]

2022-05-05 Thread Mandy Chung
On Thu, 5 May 2022 16:22:41 GMT, Mandy Chung wrote: >> Looking deeper, `System::loadLibrary` seems to search the boot loader >> libraries when invoked with a `null` caller class, so replicating that >> behavior should be safe. > > `BootLoader` is what you want i

Re: RFR: 8282191: Implementation of Foreign Function & Memory API (Preview) [v37]

2022-05-05 Thread Mandy Chung
On Wed, 4 May 2022 23:44:08 GMT, Maurizio Cimadamore wrote: >> Another option would be to treat calls to `ensureNativeAccess` with `null` >> caller class as coming from unnamed module. > > Looking deeper, `System::loadLibrary` seems to search the boot loader > libraries when invoked with a

Re: RFR: 8282701: Use Class.getInterfaces(false) where possible to reduce allocation pressure

2022-05-02 Thread Mandy Chung
On Sat, 5 Mar 2022 13:07:56 GMT, Сергей Цыпанов wrote: > `Class.getInterfaces(false)` does not clone underlying array and can be used > in cases when the returned array is only read from. For the `checkPackageAccess` case, I don't think it worths fixing; not only that security manager is

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

2022-04-29 Thread Mandy Chung
On Sat, 5 Mar 2022 19:54:44 GMT, Joe Darcy wrote: >> This is an early review of changes to better model JVM access flags, that is >> "modifiers" like public, protected, etc. but explicitly at a VM level. >> >> Language level modifiers and JVM level access flags are closely related, but >>

Re: RFR: 8285890: Fix some @param tags

2022-04-29 Thread Mandy Chung
On Fri, 29 Apr 2022 09:03:58 GMT, Pavel Rappo wrote: > * Syntactically improves a few cases from 8285676 > (https://github.com/openjdk/jdk/pull/8410) > * Fixes a few misspelled `@param` tags for elements that, although are not > included in the API Documentation, are visible in and processed

Re: RFR: JDK-8285676: Add missing @param tags for type parameters on classes and interfaces [v5]

2022-04-28 Thread Mandy Chung
On Thu, 28 Apr 2022 18:24:33 GMT, Andrey Turbanov wrote: >> Joe Darcy 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

Re: RFR: JDK-8285676: Add missing @param tags for type parameters on classes and interfaces [v4]

2022-04-28 Thread Mandy Chung
On Thu, 28 Apr 2022 16:58:40 GMT, Joe Darcy wrote: >> To enable more complete doclint checking (courtesy @jonathan-gibbons), >> please review this PR to add type-level @param tags where they are missing. >> >> To the maintainers of java.util.concurrent, those changes could be separated >> out

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

2022-04-27 Thread Mandy Chung
On Wed, 27 Apr 2022 14:24:20 GMT, Alan Bateman wrote: >> This is the implementation of JEP 425: Virtual Threads (Preview); TBD which >> JDK version to target. >> >> We will refresh this PR periodically to pick up changes and fixes from the >> loom repo. >> >> Most of the new mechanisms in

Re: RFR: 8285690: CloneableReference subtest should not throw CloneNotSupportedException [v2]

2022-04-27 Thread Mandy Chung
On Wed, 27 Apr 2022 18:19:57 GMT, Kim Barrett wrote: >> test/jdk/java/lang/ref/ReferenceClone.java line 52: >> >>> 50: } catch (CloneNotSupportedException e) { >>> 51: throw new RuntimeException("CloneableReference::clone >>> should not throw CloneNotSupportedException");

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

2022-04-27 Thread Mandy Chung
On Wed, 27 Apr 2022 18:13:15 GMT, Paul Sandoz wrote: >> src/java.base/share/classes/java/lang/PinnedThreadPrinter.java line 58: >> >>> 56: >>> 57: // maps a class to the hashes of stack traces pinned by that code >>> in that class >>> 58: private static final Map, Hashes>

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

2022-04-27 Thread Mandy Chung
On Wed, 27 Apr 2022 14:24:20 GMT, Alan Bateman wrote: >> This is the implementation of JEP 425: Virtual Threads (Preview); TBD which >> JDK version to target. >> >> We will refresh this PR periodically to pick up changes and fixes from the >> loom repo. >> >> Most of the new mechanisms in

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

2022-04-27 Thread Mandy Chung
On Wed, 27 Apr 2022 14:24:20 GMT, Alan Bateman wrote: >> This is the implementation of JEP 425: Virtual Threads (Preview); TBD which >> JDK version to target. >> >> We will refresh this PR periodically to pick up changes and fixes from the >> loom repo. >> >> Most of the new mechanisms in

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

2022-04-27 Thread Mandy Chung
On Wed, 27 Apr 2022 14:24:20 GMT, Alan Bateman wrote: >> This is the implementation of JEP 425: Virtual Threads (Preview); TBD which >> JDK version to target. >> >> We will refresh this PR periodically to pick up changes and fixes from the >> loom repo. >> >> Most of the new mechanisms in

Re: RFR: 8285690: CloneableReference subtest should not throw CloneNotSupportedException [v2]

2022-04-27 Thread Mandy Chung
On Wed, 27 Apr 2022 10:11:15 GMT, Kim Barrett wrote: >> Please review this fix to test/jdk/java/lang/ref/ReferenceClone.java. It was >> passing if CloneableReference::clone were to throw >> CloneNotSupportedException. >> That should be a failure. >> >> Testing: >> Locally (linux-x64) verified

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

2022-04-20 Thread Mandy Chung
On Wed, 20 Apr 2022 01:03:23 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: 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: 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: 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: 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`

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: 8284161: Implementation of Virtual Threads (Preview) [v4]

2022-04-18 Thread Mandy Chung
On Sun, 17 Apr 2022 16:03:30 GMT, Alan Bateman wrote: >> This is the implementation of JEP 425: Virtual Threads (Preview); TBD which >> JDK version to target. >> >> We will refresh this PR periodically to pick up changes and fixes from the >> loom repo. >> >> Most of the new mechanisms in

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

2022-04-18 Thread Mandy Chung
On Sun, 17 Apr 2022 16:03:30 GMT, Alan Bateman wrote: >> This is the implementation of JEP 425: Virtual Threads (Preview); TBD which >> JDK version to target. >> >> We will refresh this PR periodically to pick up changes and fixes from the >> loom repo. >> >> Most of the new mechanisms in

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

2022-04-18 Thread Mandy Chung
On Sun, 17 Apr 2022 16:03:30 GMT, Alan Bateman wrote: >> This is the implementation of JEP 425: Virtual Threads (Preview); TBD which >> JDK version to target. >> >> We will refresh this PR periodically to pick up changes and fixes from the >> loom repo. >> >> Most of the new mechanisms in

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

2022-04-18 Thread Mandy Chung
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: 8284579: Improve VarHandle checks for interpreter [v3]

2022-04-12 Thread Mandy Chung
On Mon, 11 Apr 2022 10:13:40 GMT, Claes Redestad wrote: >> A few additional enhancements aiming to improve VH performance in the >> interpreter: >> >> - Flatten `TypeAndInvokers`: adds a pointer to `VarHandle` (a small increase >> 40->48) but removes an object and an indirection on any

Re: RFR: 8284579: Improve VarHandle checks for interpreter [v3]

2022-04-11 Thread Mandy Chung
On Mon, 11 Apr 2022 10:13:40 GMT, Claes Redestad wrote: >> A few additional enhancements aiming to improve VH performance in the >> interpreter: >> >> - Flatten `TypeAndInvokers`: adds a pointer to `VarHandle` (a small increase >> 40->48) but removes an object and an indirection on any

Re: RFR: 8284579: Improve VarHandle checks for interpreter [v2]

2022-04-08 Thread Mandy Chung
On Fri, 8 Apr 2022 12:20:32 GMT, Claes Redestad wrote: >> A few additional enhancements aiming to improve VH performance in the >> interpreter: >> >> - Flatten `TypeAndInvokers`: adds a pointer to `VarHandle` (a small increase >> 40->48) but removes an object and an indirection on any

Re: RFR: 8284361: Updating ASM to 9.3 for JDK 19

2022-04-08 Thread Mandy Chung
On Thu, 7 Apr 2022 03:33:02 GMT, Vicente Romero wrote: > We recently updated our ASM version to 9.2 and just this week version 9.3 was > announced with support for JDK19 so it makes sense to update to this last > version. > > Thanks in advance for the reviews, > Vicente Looks okay. Most of

Integrated: 8283470: Update java.lang.invoke.VarHandle to use sealed classes

2022-03-30 Thread Mandy Chung
On Wed, 23 Mar 2022 16:27:29 GMT, Mandy Chung wrote: > This patch changes VarHandle and its implementation hierarchy to use sealed > classes. All VarHandle permitted classes are package-private and either > final or sealed abstract classes. > > Please also review

Re: RFR: 8283060: RawNativeLibraries should allow multiple clients to load/unload the same library

2022-03-30 Thread Mandy Chung
On Wed, 30 Mar 2022 13:21:41 GMT, Jaikiran Pai wrote: >> A small improvement to `RawNativeLibraries`. `RawNativeLibraries::load` >> returns the same `NativeLibrary` instance of a given path if it's called >> multiple times. This means that multiple clients have to coordinate that the >>

RFR: 8283060: RawNativeLibraries should allow multiple clients to load/unload the same library

2022-03-29 Thread Mandy Chung
A small improvement to `RawNativeLibraries`. `RawNativeLibraries::load` returns the same `NativeLibrary` instance of a given path if it's called multiple times. This means that multiple clients have to coordinate that the last one using the loaded library is the one to close the library by

Integrated: JDK-8282776: Bad NullPointerException message when invoking an interface MethodHandle on a null receiver

2022-03-29 Thread Mandy Chung
On Wed, 9 Mar 2022 22:52:41 GMT, Mandy Chung wrote: > A simple patch to call `Objects.requireNonNull(recv)` for an explicit null > receiver check rather than NPE thrown by `Object::getClass`. The message of > NPE generated by JEP 358 (Helpful NullPointerExceptions) is

Re: RFR: JDK-8282776: Bad NullPointerException message when invoking an interface MethodHandle on a null receiver [v5]

2022-03-29 Thread Mandy Chung
> A simple patch to call `Objects.requireNonNull(recv)` for an explicit null > receiver check rather than NPE thrown by `Object::getClass`. The message of > NPE generated by JEP 358 (Helpful NullPointerExceptions) is supposed to be > helpful but not in this case. Mandy Chung

Re: RFR: 8283715: Update ObjectStreamClass to be final [v2]

2022-03-29 Thread Mandy Chung
On Tue, 29 Mar 2022 16:07:18 GMT, Stuart Marks wrote: >> Pretty much just what it says. > > Stuart Marks has updated the pull request incrementally with one additional > commit since the last revision: > > Adjust nonfinal CSMs and rework error reporting in CheckCSMs.java test Looks good.

Re: RFR: 8283715: Update ObjectStreamClass to be final [v2]

2022-03-29 Thread Mandy Chung
On Tue, 29 Mar 2022 16:07:18 GMT, Stuart Marks wrote: >> Pretty much just what it says. > > Stuart Marks has updated the pull request incrementally with one additional > commit since the last revision: > > Adjust nonfinal CSMs and rework error reporting in CheckCSMs.java test Marked as

Re: RFR: 8283846: Remove unused jdk.internal.reflect.SignatureIterator

2022-03-29 Thread Mandy Chung
On Tue, 29 Mar 2022 09:15:01 GMT, Andrey Turbanov wrote: > It was no longer used due to JDK-4479184 long ago. Marked as reviewed by mchung (Reviewer). - PR: https://git.openjdk.java.net/jdk/pull/8013

Re: RFR: JDK-8283416: Update java.lang.invoke.MethodHandle to use sealed classes [v2]

2022-03-24 Thread Mandy Chung
On Thu, 24 Mar 2022 18:58:43 GMT, Joe Darcy wrote: >> Small refactoring to use sealed classes in the MethodHandle implementation >> hierarchy. >> >> DelegatingMethodHandle is non-sealed rather than sealed since it has two >> subclasses, one defined as a nested class and only a separate type

Re: RFR: JDK-8282776: Bad NullPointerException message when invoking an interface MethodHandle on a null receiver [v3]

2022-03-23 Thread Mandy Chung
On Wed, 23 Mar 2022 03:37:01 GMT, Mandy Chung wrote: >> src/java.base/share/classes/java/lang/invoke/DirectMethodHandle.java line >> 424: >> >>> 422: throw new IncompatibleClassChangeError(msg); >>> 423: } else { &g

Re: RFR: JDK-8282776: Bad NullPointerException message when invoking an interface MethodHandle on a null receiver [v4]

2022-03-23 Thread Mandy Chung
> A simple patch to call `Objects.requireNonNull(recv)` for an explicit null > receiver check rather than NPE thrown by `Object::getClass`. The message of > NPE generated by JEP 358 (Helpful NullPointerExceptions) is supposed to be > helpful but not in this case. Mandy Chung

  1   2   3   4   5   6   7   8   9   10   >