Re: RFR: 8237467: effect of jlink plugins for vendor information and command-line options should be sticky

2022-09-27 Thread Mandy Chung
On Tue, 27 Sep 2022 11:12:57 GMT, Doug Simon wrote: > This PR adds a new jlink plugin (`--save-jlink-argfiles=`) to > support persisting jlink options. > > >> echo "--add-modules jdk.internal.vm.ci --add-options=-Dfoo=xyzzy >> --vendor-version="XyzzyVM 3.14.15" --vendor-bug-url=https://bugs.x

Re: RFR: 8237467: effect of jlink plugins for vendor information and command-line options should be sticky

2022-09-27 Thread Mandy Chung
On Tue, 27 Sep 2022 19:00:01 GMT, Mandy Chung wrote: >> This PR adds a new jlink plugin (`--save-jlink-argfiles=`) to >> support persisting jlink options. >> >> >>> echo "--add-modules jdk.internal.vm.ci --add-options=-Dfoo=xyzzy >>> --vendor-

Re: RFR: 8237467: jlink plugin to save the argument files as input to jlink in the output image [v2]

2022-09-27 Thread Mandy Chung
On Tue, 27 Sep 2022 22:01:40 GMT, Doug Simon wrote: >> This PR adds a new jlink plugin (`--save-jlink-argfiles=`) to >> support persisting jlink options. >> >> >>> echo "--add-modules jdk.internal.vm.ci --add-options=-Dfoo=xyzzy >>> --vendor-version="XyzzyVM 3.14.15" >>> --vendor-bug-url=htt

Re: RFR: 8237467: jlink plugin to save the argument files as input to jlink in the output image [v3]

2022-09-27 Thread Mandy Chung
On Tue, 27 Sep 2022 22:37:16 GMT, Doug Simon wrote: >> This PR adds a new jlink plugin (`--save-jlink-argfiles=`) to >> support persisting jlink options. >> >> >>> echo "--add-modules jdk.internal.vm.ci --add-options=-Dfoo=xyzzy >>> --vendor-version="XyzzyVM 3.14.15" >>> --vendor-bug-url=htt

Re: RFR: JDK-8293701: jdeps InverseDepsAnalyzer runs into NoSuchElementException: No value present [v2]

2022-09-29 Thread Mandy Chung
On Thu, 29 Sep 2022 16:05:44 GMT, Matthias Baesken wrote: >> We noticed that with certain jar file input, jdeps runs into the following >> exception, this happens with jdk11, 17 and 20. >> >> jdeps.exe --multi-release 11 --module-path . --inverse --package >> com.sap.nw.performance.supa.client

Re: RFR: JDK-8293701: jdeps InverseDepsAnalyzer runs into NoSuchElementException: No value present [v3]

2022-09-30 Thread Mandy Chung
On Fri, 30 Sep 2022 10:51:53 GMT, Matthias Baesken wrote: >> We noticed that with certain jar file input, jdeps runs into the following >> exception, this happens with jdk11, 17 and 20. >> >> jdeps.exe --multi-release 11 --module-path . --inverse --package >> com.sap.nw.performance.supa.client

Re: RFR: 8294698: Remove unused 'checkedExceptions' param from MethodAccessorGenerator.generateMethod()

2022-10-03 Thread Mandy Chung
On Mon, 3 Oct 2022 11:03:48 GMT, Claes Redestad wrote: > I agree that getting rid of the clone can help -- but since [JEP > 416](https://openjdk.org/jeps/416) the generators modified here is mostly a > fallback and the bulk of the use will use `MethodHandles` (unless you disable > JEP 416 and

Re: RFR: JDK-8293701: jdeps InverseDepsAnalyzer runs into NoSuchElementException: No value present [v4]

2022-10-04 Thread Mandy Chung
On Tue, 4 Oct 2022 08:00:21 GMT, Matthias Baesken wrote: >> We noticed that with certain jar file input, jdeps runs into the following >> exception, this happens with jdk11, 17 and 20. >> >> jdeps.exe --multi-release 11 --module-path . --inverse --package >> com.sap.nw.performance.supa.client

Re: RFR: 8294698: Remove unused 'checkedExceptions' param from MethodAccessorGenerator.generateMethod()

2022-10-04 Thread Mandy Chung
On Sun, 2 Oct 2022 20:45:02 GMT, Сергей Цыпанов wrote: > `checkedExceptions` param of `MethodAccessorGenerator.generateMethod()` is > unused and should be removed in order to prevent allocations from > `Method.getExceptionTypes()` Thanks. This is for serialization and not the use of the core

Re: RFR: JDK-8293701: jdeps InverseDepsAnalyzer runs into NoSuchElementException: No value present [v4]

2022-10-05 Thread Mandy Chung
On Wed, 5 Oct 2022 08:33:40 GMT, Alan Bateman wrote: >> Matthias Baesken has updated the pull request incrementally with one >> additional commit since the last revision: >> >> enhance test > > test/langtools/tools/jdeps/optionalDependency/OptionalDependencyTest.java > line 74: > >> 72:

Re: RFR: 8293810: Remove granting of RuntimePermission("stopThread") from tests

2022-10-05 Thread Mandy Chung
On Wed, 5 Oct 2022 15:01:15 GMT, Alan Bateman wrote: > This is a test only change to remove the granting of > RuntimePermission("stopThread") from the tests. With Thread.stop changed to > throw UOE it means there is nothing that requires this permission. LGTM - Marked as reviewed

RFR: 8295104: Break VarHandle tests into separate @test to reduce test execution time

2022-10-10 Thread Mandy Chung
This separates `@run` into its own `@test` that they can be run concurrently. - Commit messages: - 8295104: Break VarHandle tests into separate @test to reduce test execution time Changes: https://git.openjdk.org/jdk/pull/10641/files Webrev: https://webrevs.openjdk.org/?repo=jdk&p

Re: RFR: 8295104: Break VarHandle tests into separate @test to reduce test execution time

2022-10-11 Thread Mandy Chung
On Mon, 10 Oct 2022 23:16:20 GMT, Mandy Chung wrote: > This separates `@run` into its own `@test` that they can be run concurrently. Ok, thanks for the input. Instead of breaking into separate `@test` blocks, we should look at how these tests can be broken up and which cases really need

Withdrawn: 8295104: Break VarHandle tests into separate @test to reduce test execution time

2022-10-11 Thread Mandy Chung
On Mon, 10 Oct 2022 23:16:20 GMT, Mandy Chung wrote: > This separates `@run` into its own `@test` that they can be run concurrently. This pull request has been closed without being integrated. - PR: https://git.openjdk.org/jdk/pull/10641

Re: RFR: JDK-8295325: tools/jlink/plugins/SaveJlinkArgfilesPluginTest.java fails on Linux ppc64le

2022-10-14 Thread Mandy Chung
On Fri, 14 Oct 2022 11:16:50 GMT, Matthias Baesken wrote: > The test tools/jlink/plugins/SaveJlinkArgfilesPluginTest.java fails on Linux > ppc64le because it assumes that vm.jvmci is > available on all platforms but this is currently not the case on Linux > ppc64le. > Error is : > > Error: Mod

Re: RFR: 8295302: Do not use ArrayList when LambdaForm has a single ClassData [v2]

2022-10-14 Thread Mandy Chung
On Fri, 14 Oct 2022 04:37:22 GMT, Ioi Lam wrote: >> Please review this small optimization. As shown in the JBS issue, most of >> the generated LambdaForm classes have a single ClassData, so we can get a >> small footprint/speed improvement. > > Ioi Lam has updated the pull request incrementally

Re: RFR: 8295302: Do not use ArrayList when LambdaForm has a single ClassData [v2]

2022-10-14 Thread Mandy Chung
On Fri, 14 Oct 2022 16:57:47 GMT, Mandy Chung wrote: >> Ioi Lam has updated the pull request incrementally with one additional >> commit since the last revision: >> >> @iwanowww comments > > src/java.base/share/classes/java/lang/invoke/InvokerBytecodeGenerat

Re: RFR: 8295370: Update java.io.ObjectStreamField to use Class.descriptorString

2022-10-14 Thread Mandy Chung
On Fri, 14 Oct 2022 18:23:58 GMT, Roger Riggs wrote: > The code in ObjectStreamField for constructing type signatures should be > replaced by Class.descriptorString(). > The corresponding change is made in ObjectStreamClass. > There is no change to the contents of the type strings and the exist

Re: RFR: 8295302: Do not use ArrayList when LambdaForm has a single ClassData [v3]

2022-10-17 Thread Mandy Chung
On Mon, 17 Oct 2022 21:48:42 GMT, Ioi Lam wrote: >> Please review this small optimization. As shown in the JBS issue, most of >> the generated LambdaForm classes have a single ClassData, so we can get a >> small footprint/speed improvement. > > Ioi Lam has updated the pull request with a new ta

Re: RFR: 8295302: Do not use ArrayList when LambdaForm has a single ClassData [v3]

2022-10-18 Thread Mandy Chung
On Tue, 18 Oct 2022 05:21:47 GMT, Ioi Lam wrote: >> src/java.base/share/classes/java/lang/invoke/InvokerBytecodeGenerator.java >> line 346: >> >>> 344: >>> 345: /** >>> 346: * Returns an object to pass this.classData to the method >>> of the >> >> What about: >> >> Suggestion: >>

Re: RFR: 8295537: Debug tracing for resolved java.lang.invoke.CallSite [v2]

2022-10-25 Thread Mandy Chung
On Tue, 25 Oct 2022 17:34:15 GMT, Ioi Lam wrote: >> I've added a `java.lang.invoke.MethodHandle.TRACE_CALLSITE` property to show >> how invokedynamic call sites are resolved. >> >> For example: >> >> >> public class StrConcat { >> static String hello = "Hello"; >> static String world

Re: RFR: 8295537: Enhance TRACE_METHOD_LINKAGE to show the target MethodHandle [v4]

2022-10-27 Thread Mandy Chung
On Thu, 27 Oct 2022 05:24:33 GMT, Ioi Lam wrote: >> Improve the handling of the >> `java.lang.invoke.MethodHandle.TRACE_METHOD_LINKAGE` property to print out >> the full graph of MethodHandles that are used at a CallSite. This helps us >> understand how invokedynamic call sites are resolved. F

Re: RFR: 8295673: Deprecate legacy parallel class loading workaround for non-parallel-capable class loaders

2022-11-03 Thread Mandy Chung
On Mon, 24 Oct 2022 12:16:54 GMT, Coleen Phillimore wrote: > This change adds an option **EnableWaitForParallelLoad** to enable the legacy > behavior where the VM will manage synchronization for multiple threads > loading the same class using a non-parallel capable class loader that have > rel

Re: RFR: JDK-8296743: Tighten Class.getModifiers spec for array classes [v2]

2022-11-18 Thread Mandy Chung
On Fri, 18 Nov 2022 17:46:33 GMT, Joe Darcy wrote: >> Update the spec of Class.getModifiers to match long-standing behavior for >> primitive and array classes. Remove unneeded implementation flexibility with >> regard to setting other bit positions. This work was prompted to better >> support

Re: RFR: JDK-8296945: PublicMethodsTest is slow due to dependency verification with debug builds

2022-11-18 Thread Mandy Chung
On Fri, 18 Nov 2022 09:19:26 GMT, Matthias Baesken wrote: > As discussed in https://bugs.openjdk.org/browse/JDK-8296945 , let us switch > off VerifyDependencies in this test because of slow machines when > (fast)debug builds are used, the test sometimes times out after the > [JDK-8266074](htt

Re: RFR: 8297258: Typo in `java -help` referencing -disable-@files instead of --disable-@files

2022-11-18 Thread Mandy Chung
On Fri, 18 Nov 2022 11:57:40 GMT, Adam Sotona wrote: > There is a typo in `java -help` referencing -disable-@files instead of > --disable-@files option. > > Please review. > > Thanks, > Adam I believe there is no need to update the localized versions as they will be updated in bulk toward th

Re: RFR: JDK-8296743: Tighten Class.getModifiers spec for array classes [v3]

2022-11-18 Thread Mandy Chung
On Fri, 18 Nov 2022 18:12:56 GMT, Joe Darcy wrote: >> Update the spec of Class.getModifiers to match long-standing behavior for >> primitive and array classes. Remove unneeded implementation flexibility with >> regard to setting other bit positions. This work was prompted to better >> support

Re: RFR: 8296672: Implementation of Virtual Threads (Second Preview)

2022-11-18 Thread Mandy Chung
On Fri, 18 Nov 2022 09:57:39 GMT, Alan Bateman wrote: > JEP 436 proposes a second preview of Virtual Threads to allow time for more > feedback and to get more experience with this feature. There is no change in > direction, no API changes, and no bulk update of the implementation. For the > im

Re: RFR: 8298875: A module requiring "java.base" with flags ACC_SYNTHETIC should be rejected

2022-12-20 Thread Mandy Chung
On Fri, 16 Dec 2022 19:30:24 GMT, Alan Bateman wrote: > A small oversight with ModuleDescriptor.read when checking the requires table > of a Module attribute. The requires entry for java.base should not have > ACC_SYNTHETIC set. > > A new test is added. Some of the existing tests used > `@Tes

Re: jdeps - option to to analyze package-private API

2023-01-04 Thread mandy . chung
On 12/12/22 7:26 AM, Alan Bateman wrote: On 03/12/2022 18:15, Matej Turcel wrote: : So far, jdeps with the --api-only flag seems like the perfect tool, except there is a little problem -- we have packages (dozens of them) which exist in multiple modules. For example, package `com.foo` exist

RFR: 8299183: Invokers.checkExactType passes parameters to create WMTE in opposite order

2023-01-05 Thread Mandy Chung
Trivial fix. Fix `Invokers.checkExactType` to call `newWrongMethodTypeException(actual, expected)` with parameters in right order. - Commit messages: - 8299183: Invokers.checkExactType passes parameters to create WMTE in opposite order Changes: https://git.openjdk.org/jdk/pull/11

Re: RFR: 8299183: Invokers.checkExactType passes parameters to create WMTE in opposite order

2023-01-06 Thread Mandy Chung
On Fri, 6 Jan 2023 01:05:40 GMT, Jaikiran Pai wrote: >> Trivial fix. Fix `Invokers.checkExactType` to call >> `newWrongMethodTypeException(actual, expected)` with parameters in right >> order. > > Hello Mandy, this looks good to me. The copyright year on the file will need > an update. > > T

Re: RFR: 8299183: Invokers.checkExactType passes parameters to create WMTE in opposite order [v2]

2023-01-06 Thread Mandy Chung
> Trivial fix. Fix `Invokers.checkExactType` to call > `newWrongMethodTypeException(actual, expected)` with parameters in right > order. Mandy Chung has updated the pull request incrementally with two additional commits since the last revision: - Add a regression test - furthe

Re: RFR: 8299183: Invokers.checkExactType passes parameters to create WMTE in opposite order [v2]

2023-01-09 Thread Mandy Chung
On Sat, 7 Jan 2023 10:46:40 GMT, Jaikiran Pai wrote: >> Mandy Chung has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - Add a regression test >> - further cleanup newWrongMethodTypeException for clarity

Re: RFR: 8299183: Invokers.checkExactType passes parameters to create WMTE in opposite order [v3]

2023-01-09 Thread Mandy Chung
> Trivial fix. Fix `Invokers.checkExactType` to call > `newWrongMethodTypeException(actual, expected)` with parameters in right > order. Mandy Chung has updated the pull request incrementally with one additional commit since the last revision: Update VarHandleTestExact test and n

Re: RFR: 8293667: Align jlink's --compress option with jmod's --compress option

2023-01-09 Thread Mandy Chung
On Mon, 12 Dec 2022 14:17:43 GMT, Alan Bateman wrote: > I skimmed through this (not a detailed review) and I think it's mostly okay. > It's --compress 0 and 2 that should be listed as deprecated as --compress 1 > is string sharing rather than zip compression. I also think it's good to deprecat

Re: RFR: 8299498: Usage of constructors of primitive wrapper classes should be avoided in java.lang API docs

2023-01-09 Thread Mandy Chung
On Mon, 9 Jan 2023 21:46:49 GMT, Justin Lu wrote: > The javadocs of the following methods used deprecated constructors of the > primitive wrapper classes: > > java.lang.ArrayStoreException > java.lang.ClassCastException > java.lang.Double.compare(double, double) > java.lang.Float.compare(float,

Integrated: 8299183: Invokers.checkExactType passes parameters to create WMTE in opposite order

2023-01-10 Thread Mandy Chung
On Thu, 5 Jan 2023 20:45:20 GMT, Mandy Chung wrote: > Trivial fix. Fix `Invokers.checkExactType` to call > `newWrongMethodTypeException(actual, expected)` with parameters in right > order. This pull request has now been integrated. Changeset: a86b6f6f Author: Mandy C

Re: RFR: 8299498: Usage of constructors of primitive wrapper classes should be avoided in java.lang API docs [v2]

2023-01-10 Thread Mandy Chung
On Tue, 10 Jan 2023 18:02:22 GMT, Justin Lu wrote: >> The javadocs of the following methods used deprecated constructors of the >> primitive wrapper classes: >> >> java.lang.ArrayStoreException >> java.lang.ClassCastException >> java.lang.Double.compare(double, double) >> java.lang.Float.compar

Re: RFR: 8299498: Usage of constructors of primitive wrapper classes should be avoided in java.lang API docs [v2]

2023-01-10 Thread Mandy Chung
On Tue, 10 Jan 2023 18:02:22 GMT, Justin Lu wrote: >> The javadocs of the following methods used deprecated constructors of the >> primitive wrapper classes: >> >> java.lang.ArrayStoreException >> java.lang.ClassCastException >> java.lang.Double.compare(double, double) >> java.lang.Float.compar

Re: RFR: 8299978: Remove MethodHandleNatives.getMembers

2023-01-11 Thread Mandy Chung
On Wed, 11 Jan 2023 15:13:14 GMT, Claes Redestad wrote: > This removes `MethodHandleNatives.getMembers`, which has fallen into disuse. Marked as reviewed by mchung (Reviewer). - PR: https://git.openjdk.org/jdk/pull/11949

Re: RFR: JDK-8300133: Use generalized see and link tags in core libs

2023-01-13 Thread Mandy Chung
On Fri, 13 Jan 2023 21:30:06 GMT, Joe Darcy wrote: > With generalized see and link tags that can refer to anchors (JDK-8200337), > the see and link tags in core libraries should be updated to use this feature > when possible. This PR covers such updates for java.base. src/java.base/share/class

Re: RFR: JDK-8300133: Use generalized see and link tags in core libs [v2]

2023-01-13 Thread Mandy Chung
On Fri, 13 Jan 2023 22:50:53 GMT, Joe Darcy wrote: >> With generalized see and link tags that can refer to anchors (JDK-8200337), >> the see and link tags in core libraries should be updated to use this >> feature when possible. This PR covers such updates for java.base. > > Joe Darcy has updat

Re: RFR: 8206890: jlink --endian XXX generates unusable image if endian-ness does not match architecture

2023-01-17 Thread Mandy Chung
On Wed, 11 Jan 2023 13:19:32 GMT, Jaikiran Pai wrote: > Can I please get a review for this change which proposes to fix the issue > reported in https://bugs.openjdk.org/browse/JDK-8206890? > > The `jlink` command allows a `--endian` option to specify the byte order in > the generated image. Be

RFR: 8297757: VarHandles.getStaticFieldFromBaseAndOffset should get the receiver type from VarHandle

2023-01-19 Thread Mandy Chung
`VarHandles.getStaticFieldFromBaseAndOffset` maps a base/offset/fieldType to a static `Field`. It's fragile to assume that the location of a static field returned by `Unsafe.staticFieldBase` is a Class object.This changes the VarHandle implementation for static fields (i.e. `FieldStaticRea

RFR: 8300693: Lower the compile threshold and reduce the iterations of warmup loop in VarHandles tests

2023-01-19 Thread Mandy Chung
`java/lang/invoke/VarHandles` tests run with C1, C2 and tiered compilations and the test cases are executed in the warm up loop with 2 iterations to verify C1, C2 intrinsics. Default Tier4CompileThreshold is 15000. This PR proposes to scale the compile threshold to 0.1 such that the warm up

Re: RFR: JDK-8300698: Missing @since tag for ClassFileFormatVersion.RELEASE_21

2023-01-19 Thread Mandy Chung
On Thu, 19 Jan 2023 21:52:16 GMT, Joe Darcy wrote: > The addition of the new enum constant for ClassFileFormatVersion.RELEASE_21 > neglected to include an @since tag; this should be corrected. Marked as reviewed by mchung (Reviewer). - PR: https://git.openjdk.org/jdk/pull/12107

Re: RFR: 8297757: VarHandles.getStaticFieldFromBaseAndOffset should get the receiver type from VarHandle [v2]

2023-01-19 Thread Mandy Chung
tatic fields (i.e. `FieldStaticReadOnly` > and `FieldStaticReadWrite` classes) to include the receiver type in addition > to the base and offset. Mandy Chung has updated the pull request incrementally with one additional commit since the last revision: remove the base parameter which is unused

Re: RFR: 8297757: VarHandles.getStaticFieldFromBaseAndOffset should get the receiver type from VarHandle [v2]

2023-01-19 Thread Mandy Chung
On Thu, 19 Jan 2023 23:01:23 GMT, Paul Sandoz wrote: >> Mandy Chung has updated the pull request incrementally with one additional >> commit since the last revision: >> >> remove the base parameter which is unused > > src/java.base/share/classes/java/lang/i

Integrated: 8297757: VarHandles.getStaticFieldFromBaseAndOffset should get the receiver type from VarHandle

2023-01-20 Thread Mandy Chung
On Thu, 19 Jan 2023 19:14:38 GMT, Mandy Chung wrote: > `VarHandles.getStaticFieldFromBaseAndOffset` maps a base/offset/fieldType to > a static `Field`. It's fragile to assume that the location of a static > field returned by `Unsafe.staticFieldBase` is a Class object.This

Re: RFR: 8300693: Lower the compile threshold and reduce the iterations of warmup loop in VarHandles tests [v2]

2023-01-20 Thread Mandy Chung
; make test-only TEST=open/test/jdk/java/lang/invoke/VarHandles 234.38s user > 13.08s system 535% cpu 46.218 total Mandy Chung has updated the pull request incrementally with one additional commit since the last revision: move the comment to @comment - Changes: - all: https://git

Re: RFR: 8300693: Lower the compile threshold and reduce the iterations of warmup loop in VarHandles tests [v2]

2023-01-20 Thread Mandy Chung
On Fri, 20 Jan 2023 04:53:10 GMT, David Holmes wrote: >> Mandy Chung has updated the pull request incrementally with one additional >> commit since the last revision: >> >> move the comment to @comment > > test/jdk/java/lang/invoke/VarHandles/VarHandleT

Integrated: 8300693: Lower the compile threshold and reduce the iterations of warmup loop in VarHandles tests

2023-01-23 Thread Mandy Chung
On Thu, 19 Jan 2023 20:43:11 GMT, Mandy Chung wrote: > `java/lang/invoke/VarHandles` tests run with C1, C2 and tiered compilations > and the test cases are executed in the warm up loop with 2 iterations to > verify C1, C2 intrinsics. Default Tier4CompileThreshold is 15000. >

Re: [jdk20] RFR: 8300953: ClassDesc::ofInternalName missing @since tag

2023-01-24 Thread Mandy Chung
On Tue, 24 Jan 2023 13:35:14 GMT, Adam Sotona wrote: > ClassDesc::ofInternalName was added in JDK 20, however @since tag is missing. > This patch fixes the javadoc. > > Please review. > > Thanks, > Adam Marked as reviewed by mchung (Reviewer). - PR: https://git.openjdk.org/jdk2

RFR: 8300924: Method::invoke throws wrong exception type when passing wrong number of arguments to method with 4 or more parameters

2023-01-24 Thread Mandy Chung
A simple fix in core reflection to check if the number of actual and formal parameters differ before invoking the method or the constructor regardless of whether it's a specialized case or not. - Commit messages: - 8300924: Method::invoke throws wrong exception type when passing wr

Re: RFR: 8300916: Re-examine the initialization of JNU Charset in StaticProperty [v3]

2023-01-25 Thread Mandy Chung
On Wed, 25 Jan 2023 07:41:52 GMT, Alan Bateman wrote: > A simpler, and more reliable, would be to change Charset.defaultCharset to > use standardProvider.charsetForName with the value of "file.encoding", and > avoid the provider lookup completely. This is a good observation. The change looks

Re: RFR: 8300916: Re-examine the initialization of JNU Charset in StaticProperty [v8]

2023-01-25 Thread Mandy Chung
On Wed, 25 Jan 2023 20:50:21 GMT, Naoto Sato wrote: >> This issue was found during the review of this PR: >> https://github.com/openjdk/jdk/pull/12132 where `Charset` class was >> loaded/initialized at the phase 1 of the startup process. Since `Charset` >> depends on `StaticProperty`, loading

Re: RFR: 8300916: Re-examine the initialization of JNU Charset in StaticProperty [v9]

2023-01-25 Thread Mandy Chung
On Thu, 26 Jan 2023 00:19:45 GMT, Naoto Sato wrote: >> This issue was found during the review of this PR: >> https://github.com/openjdk/jdk/pull/12132 where `Charset` class was >> loaded/initialized at the phase 1 of the startup process. Since `Charset` >> depends on `StaticProperty`, loading

RFR: 8217920: Lookup.defineClass injects a class that can access private members of any class in its own module

2023-01-26 Thread Mandy Chung
Currently, a `Lookup` object with `PACKAGE` access can be used to inject a class in the runtime package of the Lookup's lookup class via `Lookup::defineClass`. The classes that are injected have the same access as other members in the module and can access private members of all types in the

Re: RFR: 8217920: Lookup.defineClass injects a class that can access private members of any class in its own module [v2]

2023-01-26 Thread Mandy Chung
havior and provide better documentation > to help developers to beware of the permissions given out when opening a > package to another module. A class injected in a module has the same > privilege as other module members. Mandy Chung has updated the pull request incrementally wit

Re: RFR: 8217920: Lookup.defineClass injects a class that can access private members of any class in its own module [v2]

2023-01-26 Thread Mandy Chung
On Thu, 26 Jan 2023 21:46:04 GMT, Paul Sandoz wrote: >> Mandy Chung has updated the pull request incrementally with one additional >> commit since the last revision: >> >> review feedback > > src/java.base/share/classes/java/lang/Module.java line

Re: RFR: 8217920: Lookup.defineClass injects a class that can access private members of any class in its own module [v2]

2023-01-26 Thread Mandy Chung
On Thu, 26 Jan 2023 23:03:56 GMT, Paul Sandoz wrote: > Looks good. All changes seem informational explaining the existing behavior > so no CSR? Since that's not spec change, no CSR is my take. - PR: https://git.openjdk.org/jdk/pull/12236

Re: RFR: 8217920: Lookup.defineClass injects a class that can access private members of any class in its own module [v2]

2023-01-27 Thread Mandy Chung
On Fri, 27 Jan 2023 11:44:46 GMT, Alan Bateman wrote: > I wonder if this should be an apiNote rather method description. I considered this and no clear cut on this. I don't have a strong opinion on this. What do you think? - PR: https://git.openjdk.org/jdk/pull/12236

Integrated: 8300924: Method::invoke throws wrong exception type when passing wrong number of arguments to method with 4 or more parameters

2023-01-27 Thread Mandy Chung
On Tue, 24 Jan 2023 18:19:22 GMT, Mandy Chung wrote: > A simple fix in core reflection to check if the number of actual and formal > parameters differ before invoking the method or the constructor regardless of > whether it's a specialized case or not. This pull reques

Re: RFR: 8217920: Lookup.defineClass injects a class that can access private members of any class in its own module [v3]

2023-01-27 Thread Mandy Chung
havior and provide better documentation > to help developers to beware of the permissions given out when opening a > package to another module. A class injected in a module has the same > privilege as other module members. Mandy Chung has updated the pull request incrementally wit

Re: RFR: 8217920: Lookup.defineClass injects a class that can access private members of any class in its own module [v2]

2023-01-27 Thread Mandy Chung
On Fri, 27 Jan 2023 17:07:08 GMT, Mandy Chung wrote: >> src/java.base/share/classes/java/lang/Module.java line 605: >> >>> 603: * {@link java.lang.invoke.MethodHandles.Lookup Lookup} object >>> that is allowed to >>> 604: * {@link &g

Re: RFR: 8217920: Lookup.defineClass injects a class that can access private members of any class in its own module [v4]

2023-01-27 Thread Mandy Chung
havior and provide better documentation > to help developers to beware of the permissions given out when opening a > package to another module. A class injected in a module has the same > privilege as other module members. Mandy Chung has updated the pull request incrementally with o

Integrated: 8217920: Lookup.defineClass injects a class that can access private members of any class in its own module

2023-01-27 Thread Mandy Chung
On Thu, 26 Jan 2023 21:03:59 GMT, Mandy Chung wrote: > Currently, a `Lookup` object with `PACKAGE` access can be used to inject a > class in the runtime package of the Lookup's lookup class via > `Lookup::defineClass`. The classes that are injected have the same access > as

RFR: 8301207: (jdeps) Deprecate jdeps -profile option

2023-01-30 Thread Mandy Chung
jdeps -profile option shows which compact profile of the types that a class depends on instead. By default jdeps shows the types and their modules that a class depend on. Compact profiles becomes legacy since Java SE 9 when modules are defined. The `-profile` option can be deprecated and rem

Integrated: 8301207: (jdeps) Deprecate jdeps -profile option

2023-01-30 Thread Mandy Chung
On Mon, 30 Jan 2023 18:06:12 GMT, Mandy Chung wrote: > jdeps -profile option shows which compact profile of the types that a class > depends on instead. By default jdeps shows the types and their modules that > a class depend on. Compact profiles becomes legacy since Java

Re: RFR: 8301492: Modernize equals() method of ResourceBundle.CacheKey and Bundles.CacheKey

2023-01-31 Thread Mandy Chung
On Tue, 31 Jan 2023 11:40:43 GMT, Sergey Tsypanov wrote: > `ResourceBundle.CacheKey.equals()` and `Bundles.CacheKey.equals()` are quire > outdated. This simple clean-up modernizes them. return moduleRef.refersTo(otherEntry.getModule()) && callerRef.refersTo(otherEntry.getCallerModule())

Re: module opens directive and Lookup::defineClass

2023-01-31 Thread mandy . chung
There is no conflict with JLS 7.2.2 as I can see. Opens `some.package` to `some.other.module` means just one package.  It's true that the open packages can be extended at runtime. For example, `some.other.module` can update this module to open the package to another module at runtime via `Modu

RFR: JDK-8284236: Remove java/lang/ref/ReferenceEnqueue.java from ProblemList-Xcomp.txt

2023-02-01 Thread Mandy Chung
This test failure is no longer reproducible. It was added to the problem list from JDK-8286368 as a clean up after JEP 425 Virtual Threads integration. This PR removes it from the problem list. - Commit messages: - JDK-8284236: Remove java/lang/ref/ReferenceEnqueue.java from Pr

Integrated: JDK-8284236: Remove java/lang/ref/ReferenceEnqueue.java from ProblemList-Xcomp.txt

2023-02-01 Thread Mandy Chung
On Wed, 1 Feb 2023 19:09:48 GMT, Mandy Chung wrote: > This test failure is no longer reproducible. It was added to the problem > list from JDK-8286368 as a clean up after JEP 425 Virtual Threads > integration. This PR removes it from the problem list. This pull request has

RFR: JDK-8301704: Shorten the number of GCs in UnloadingTest.java to verify a class loader not being unloaded

2023-02-02 Thread Mandy Chung
`test/jdk/java/lang/invoke/defineHiddenClass/UnloadingTest.java` defines hidden classes and verify cases that a class loader is not unloaded using `ForceGC::wait`.ForceGC::wait` defaults the timeout to 1000ms * jtreg timeout factor, which is designed to work well to expect an object being r

RFR: JDK-8301462: Convert Permission files to use lambda after JDK-8076596

2023-02-07 Thread Mandy Chung
A trivial fix. Convert the use of anonymous inner classes in a few Permission classes to lambdas to work around JDK-8076596, which has been resolved. - Commit messages: - JDK-8301462: Convert Permission files to use lambda after JDK-8076596 Changes: https://git.openjdk.org/jdk/pu

Re: RFR: 8294961: java.base java.lang.reflect.ProxyGenerator uses ASM to generate proxy classes [v2]

2023-02-07 Thread Mandy Chung
On Fri, 3 Feb 2023 15:11:30 GMT, Adam Sotona wrote: >> java.base java.lang.reflect.ProxyGenerator uses ASM to generate proxy >> classes and this patch converts it to use Classfile API. >> >> This pull request suppose to chain on the 8294982: Implementation of >> Classfile API https://github.co

Re: RFR: 8294961: java.base java.lang.reflect.ProxyGenerator uses ASM to generate proxy classes [v2]

2023-02-07 Thread Mandy Chung
On Fri, 3 Feb 2023 15:11:30 GMT, Adam Sotona wrote: >> java.base java.lang.reflect.ProxyGenerator uses ASM to generate proxy >> classes and this patch converts it to use Classfile API. >> >> This pull request suppose to chain on the 8294982: Implementation of >> Classfile API https://github.co

Re: RFR: JDK-8301462: Convert Permission files to use lambda after JDK-8076596 [v2]

2023-02-07 Thread Mandy Chung
> A trivial fix. Convert the use of anonymous inner classes in a few > Permission classes to lambdas to work around JDK-8076596, which has been > resolved. Mandy Chung has updated the pull request incrementally with one additional commit since the last revision: update copyright

Re: RFR: JDK-8301462: Convert Permission files to use lambda after JDK-8076596 [v2]

2023-02-07 Thread Mandy Chung
On Wed, 8 Feb 2023 01:53:02 GMT, Jaikiran Pai wrote: >> Mandy Chung has updated the pull request incrementally with one additional >> commit since the last revision: >> >> update copyright end year > > Hello Mandy, the changes look fine to me. > > Each

Re: RFR: JDK-8301462: Convert Permission files to use lambda after JDK-8076596 [v2]

2023-02-08 Thread Mandy Chung
On Wed, 8 Feb 2023 03:42:16 GMT, Mandy Chung wrote: >> A trivial fix. Convert the use of anonymous inner classes in a few >> Permission classes to lambdas to work around JDK-8076596, which has been >> resolved. > > Mandy Chung has updated the pull request increment

Re: RFR: JDK-8301462: Convert Permission files to use lambda after JDK-8076596 [v3]

2023-02-08 Thread Mandy Chung
> A trivial fix. Convert the use of anonymous inner classes in a few > Permission classes to lambdas to work around JDK-8076596, which has been > resolved. Mandy Chung has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev exc

Integrated: JDK-8301462: Convert Permission files to use lambda after JDK-8076596

2023-02-08 Thread Mandy Chung
On Tue, 7 Feb 2023 22:25:43 GMT, Mandy Chung wrote: > A trivial fix. Convert the use of anonymous inner classes in a few > Permission classes to lambdas to work around JDK-8076596, which has been > resolved. This pull request has now been integrated. Changeset: 10dd98d0 Author:

Re: RFR: JDK-8301704: Shorten the number of GCs in UnloadingTest.java to verify a class loader not being unloaded

2023-02-08 Thread Mandy Chung
On Thu, 2 Feb 2023 22:19:07 GMT, Roger Riggs wrote: >> `test/jdk/java/lang/invoke/defineHiddenClass/UnloadingTest.java` defines >> hidden classes and verify cases that a class loader is not unloaded using >> `ForceGC::wait`.ForceGC::wait` defaults the timeout to 1000ms * jtreg >> timeout f

Re: RFR: JDK-8301704: Shorten the number of GCs in UnloadingTest.java to verify a class loader not being unloaded [v2]

2023-02-08 Thread Mandy Chung
ake a timeout parameter and > tests can specify the timeout to reduce the time it takes testing a strongly > reachable object not being reclaimed. Mandy Chung has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated change

Integrated: JDK-8301704: Shorten the number of GCs in UnloadingTest.java to verify a class loader not being unloaded

2023-02-08 Thread Mandy Chung
On Thu, 2 Feb 2023 20:09:22 GMT, Mandy Chung wrote: > `test/jdk/java/lang/invoke/defineHiddenClass/UnloadingTest.java` defines > hidden classes and verify cases that a class loader is not unloaded using > `ForceGC::wait`.ForceGC::wait` defaults the timeout to 1000ms * jtreg

Re: RFR: 8302154: Hidden classes created by LambdaMetaFactory can't be unloaded

2023-02-09 Thread Mandy Chung
On Thu, 9 Feb 2023 15:20:23 GMT, Volker Simonis wrote: > 4. the lambda proxy class has the strong relationship with the class loader > (that will share the VM metaspace for its defining loader - implementation > details) A lambda proxy class is the implementation of the lambda/method reference

Re: RFR: 8302154: Hidden classes created by LambdaMetaFactory can't be unloaded

2023-02-09 Thread Mandy Chung
On Thu, 9 Feb 2023 15:20:23 GMT, Volker Simonis wrote: > Prior to > [JDK-8239384](https://bugs.openjdk.org/browse/JDK-8239384)/[JDK-8238358](https://bugs.openjdk.org/browse/JDK-8238358) > LambdaMetaFactory has created VM-anonymous classes which could easily be > unloaded once they were not ref

Re: RFR: 8302154: Hidden classes created by LambdaMetaFactory can't be unloaded [v2]

2023-02-10 Thread Mandy Chung
On Fri, 10 Feb 2023 17:29:37 GMT, Ioi Lam wrote: > Even in JDK 11, a lambda proxy classes that's referenced by the cpCache > (i.e., from a resolved invokedynamic instruction associated with a lamda > expression) is always kept alive. Thanks @iklam. That's exactly what I am trying to confirm

Re: RFR: 8302154: Hidden classes created by LambdaMetaFactory can't be unloaded [v2]

2023-02-10 Thread Mandy Chung
On Fri, 10 Feb 2023 19:00:53 GMT, Volker Simonis wrote: > LambdaGC$$Lambda$1 was also strongly linked to its defining class loader, but > I don't think that's necessary to keep it alive (because it is referenced > from the call site which is referenced from the constant pool cache). True but i

RFR: 8302260: VarHandle.describeConstable() fails to return a nominal descriptor for static public fields

2023-02-13 Thread Mandy Chung
I overlooked in the fix for JDK-8297757 that it should have passed the declaring class of the static fields rather than the reference class passed to `Lookup::findStaticVarHandle`. - Commit messages: - 8302260: VarHandle.describeConstable() fails to return a nominal descriptor for

Re: RFR: 8302260: VarHandle.describeConstable() fails to return a nominal descriptor for static public fields

2023-02-13 Thread Mandy Chung
On Mon, 13 Feb 2023 19:35:52 GMT, Mandy Chung wrote: > I overlooked in the fix for JDK-8297757 that it should have passed the > declaring class of the static fields rather than the reference class passed > to `Lookup::findStaticVarHandle`. `InternalError` is thrown if the field is

RFR: JDK-8301460: Clean up LambdaForm to reference BasicType enums directly

2023-02-13 Thread Mandy Chung
`LambdaForm` declares int constants for `BasicType::ordinal` to workaround JDK-8161245. Now these int constants are no longer needed.This removes these int constants and reference `BasicType` enums directly. - Commit messages: - JDK-8301460: Code in LambdaForm.java still refe

Re: RFR: JDK-8301460: Clean up LambdaForm to reference BasicType enums directly [v2]

2023-02-14 Thread Mandy Chung
> `LambdaForm` declares int constants for `BasicType::ordinal` to workaround > JDK-8161245. Now these int constants are no longer needed.This removes > these int constants and reference `BasicType` enums directly. Mandy Chung has updated the pull request with a new target base

Re: RFR: JDK-8301460: Clean up LambdaForm to reference BasicType enums directly [v2]

2023-02-14 Thread Mandy Chung
On Tue, 14 Feb 2023 11:16:26 GMT, Sergey Tsypanov wrote: >> Mandy Chung 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 contain

Re: RFR: JDK-8301460: Clean up LambdaForm to reference BasicType enums directly [v2]

2023-02-14 Thread Mandy Chung
On Tue, 14 Feb 2023 10:50:12 GMT, Jorn Vernee wrote: >> Mandy Chung 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 addi

Re: RFR: 8293667: Align jlink's --compress option with jmod's --compress option [v6]

2023-02-14 Thread Mandy Chung
On Wed, 8 Feb 2023 23:07:14 GMT, Ian Graves wrote: >> This is an approach to adding a flag to jlink that will allow --compress to >> take the same types of arguments as jmod, thus bringing the two into >> alignment. This likely requires a CSR and a discussion on whether we should >> deprecate

Integrated: 8302260: VarHandle.describeConstable() fails to return a nominal descriptor for static public fields

2023-02-14 Thread Mandy Chung
On Mon, 13 Feb 2023 19:35:52 GMT, Mandy Chung wrote: > I overlooked in the fix for JDK-8297757 that it should have passed the > declaring class of the static fields rather than the reference class passed > to `Lookup::findStaticVarHandle`. This pull request has now been integrated.

Re: RFR: 8292914: Drop the counter from lambda class names

2023-02-15 Thread Mandy Chung
On Wed, 15 Feb 2023 17:32:38 GMT, David M. Lloyd wrote: > The class generated for lambda proxies is now defined as a hidden class. This > means that the counter, which was used to ensure a unique class name and > avoid clashes, is now redundant. In addition to performing redundant work, > this

Re: RFR: 8293667: Align jlink's --compress option with jmod's --compress option [v6]

2023-02-15 Thread Mandy Chung
On Wed, 15 Feb 2023 14:56:27 GMT, Ian Graves wrote: >> src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/CompactConstantPoolsPlugin.java >> line 48: >> >>> 46: >>> 47: public CompactConstantPoolsPlugin() { >>> 48: super("compact-constant-pools"); >> >> This plugin needs

  1   2   3   4   5   6   7   8   9   10   >