Re: [jdk18] RFR: 8276826: Clarify the ModuleDescriptor.Version specification’s treatment of repeated punctuation characters

2021-12-16 Thread Mandy Chung
On Thu, 16 Dec 2021 22:16:26 GMT, Mark Reinhold wrote: > Please review this tiny specification clarification. Marked as reviewed by mchung (Reviewer). - PR: https://git.openjdk.java.net/jdk18/pull/39

Re: [jdk18] RFR: 8278574: update --help-extra message to include default value of --finalization option

2021-12-16 Thread Mandy Chung
On Thu, 16 Dec 2021 06:33:24 GMT, Stuart Marks wrote: > A small modification to the Launcher's help text. Marked as reviewed by mchung (Reviewer). - PR: https://git.openjdk.java.net/jdk18/pull/34

Re: [jdk18] RFR: 8277964: ClassCastException with no stack trace is thrown with -Xcomp in method handle invocation [v2]

2021-12-15 Thread Mandy Chung
On Wed, 15 Dec 2021 17:56:23 GMT, Vladimir Kozlov wrote: >> A proper fix for this is to use the catchException combination. However, >> that introduces significant cold startup performance regression. JDK-8278447 >> tracks the work to address the performance regression using catchException >>

Re: [jdk18] RFR: 8277964: ClassCastException with no stack trace is thrown with -Xcomp in method handle invocation

2021-12-15 Thread Mandy Chung
On Wed, 15 Dec 2021 17:15:46 GMT, Vladimir Kozlov wrote: >> src/hotspot/share/oops/method.cpp line 827: >> >>> 825: */ >>> 826: bool Method::can_omit_stack_trace() { >>> 827: if >>> (method_holder()->class_loader_data()->is_boot_class_loader_data()) { >> >> Do you actually need to check

Re: [jdk18] RFR: 8277964: ClassCastException with no stack trace is thrown with -Xcomp in method handle invocation

2021-12-15 Thread Mandy Chung
On Wed, 15 Dec 2021 05:59:45 GMT, Vladimir Kozlov wrote: > A proper fix for this is to use the catchException combination. However, that > introduces significant cold startup performance regression. JDK-8278447 > tracks the work to address the performance regression using catchException > and

Re: RFR: 8278028: [test-library] Warnings cleanup of the test library

2021-12-13 Thread Mandy Chung
On Wed, 1 Dec 2021 14:47:54 GMT, Roger Riggs wrote: > Compilation warnings of the test library introduce noise in test output and > should be addressed or suppressed. > Changes include: > - SuppressWarnings("deprecation") and SuppressWarnings("removal") > - Adding type parameters to Raw

Re: RFR: 8277863: Deprecate sun.misc.Unsafe methods that return offsets [v2]

2021-12-06 Thread Mandy Chung
On Mon, 6 Dec 2021 18:19:39 GMT, Alan Bateman wrote: >> Deprecate the sun.misc.Unsafe methods that return field offsets. These >> method are an impediment to possible future changes. Layout may not be fixed >> in the future, the VM should be allowed to re-layout dynamically based on >>

Re: RFR: 8276700: Improve java.lang.ref.Cleaner javadocs [v4]

2021-12-02 Thread Mandy Chung
On Wed, 10 Nov 2021 11:59:16 GMT, Hendrik Schreiber wrote: >> Trivial improvement. >> >> Explicitly show how to create a `Cleaner` instance using `Cleaner.create()`. >> Repeat (again) in the code example that the `State` `Runnable `should be >> implemented as static class and not reference

Re: RFR: 8277861: Terminally deprecate Thread.stop

2021-11-30 Thread Mandy Chung
On Tue, 30 Nov 2021 14:52:37 GMT, Alan Bateman wrote: > Thread.stop is inherently unsafe and has been deprecated since Java 1.2 > (1998). It's time to terminally deprecate this method so it can be degraded > and removed in the future. > > This PR does not propose any changes to the JVM TI

Re: RFR: JDK-8277375: jdeps errors on a class path with a file path with no permission

2021-11-29 Thread Mandy Chung
On Wed, 24 Nov 2021 12:32:32 GMT, Michael Hall wrote: > Would there be any need to scan class path at all? That would mean a module > would have a class path dependency wouldn't it? One reason of scanning the class path is to detect any split packages and emit warnings. > Yes, I shouldn't

Re: RFR: 8277165: jdeps --multi-release --print-module-deps fails if module-info.class in different versioned directories [v2]

2021-11-25 Thread Mandy Chung
On Thu, 25 Nov 2021 02:22:20 GMT, Jaikiran Pai wrote: >> Mandy Chung has updated the pull request incrementally with one additional >> commit since the last revision: >> >> minor fix to avoid casting > > Hello Mandy, one small issue - `Class

Integrated: 8277165: jdeps --multi-release --print-module-deps fails if module-info.class in different versioned directories

2021-11-25 Thread Mandy Chung
On Tue, 23 Nov 2021 20:54:55 GMT, Mandy Chung wrote: > jdeps intends to report an error if there are multiple versions of the same > class being parsed. module-info.class should be excluded from such > detection. > > This patch also fixes a data race in `VersionHelper::set` a

Re: RFR: 8277165: jdeps --multi-release --print-module-deps fails if module-info.class in different versioned directories [v2]

2021-11-24 Thread Mandy Chung
ureTask of parsing the classes throws an > exception to report `MultiReleaseException` properly. Mandy Chung has updated the pull request incrementally with one additional commit since the last revision: minor fix to avoid casting - Changes: - all: https://git.openjdk.j

Re: RFR: 8277165: jdeps --multi-release --print-module-deps fails if module-info.class in different versioned directories [v2]

2021-11-24 Thread Mandy Chung
On Wed, 24 Nov 2021 10:05:11 GMT, Alan Bateman wrote: >> Mandy Chung has updated the pull request incrementally with one additional >> commit since the last revision: >> >> minor fix to avoid casting > > src/jdk.jdeps/share/classes/com/sun/tools/jdeps/Dep

RFR: JDK-8277375: jdeps errors on a class path with a file path with no permission

2021-11-23 Thread Mandy Chung
This changes jdeps -cp to ignore files/directories with no permission to access. This is consistent with the runtime behavior. - Commit messages: - JDK-8277375: jdeps errors on a class path with a file path with no permission Changes:

RFR: 8277165: jdeps --multi-release --print-module-deps fails if module-info.class in different versioned directories

2021-11-23 Thread Mandy Chung
jdeps intends to report an error if there are multiple versions of the same class being parsed. module-info.class should be excluded from such detection. This patch also fixes a data race in `VersionHelper::set` and also unwraps the `ExecutionException` when FutureTask of parsing the classes

Re: RFR: 8276764: Enable deterministic file content ordering for Jar and Jmod [v7]

2021-11-23 Thread Mandy Chung
On Tue, 23 Nov 2021 10:04:51 GMT, Andrew Leonard wrote: >> Both jar and jmod utilise java.io file operations whose methods define no >> ordering of the return file lists, and in fact rely on OS query file >> ordering, which can differ by underlying OS architecture. >> This PR adds sort

Integrated: JDK-8277451: java.lang.reflect.Field::set on static field with invalid argument type should throw IAE

2021-11-23 Thread Mandy Chung
On Sat, 20 Nov 2021 19:13:43 GMT, Mandy Chung wrote: > java.lang.reflect.Field::set on static field with invalid argument type > should throw IAE. But this regression is introduced by JEP 416 throwing NPE > instead. > > `ensureObj` is called as the first check of the `Fie

Re: RFR: JDK-8277451: java.lang.reflect.Field::set on static field with invalid argument type should throw IAE [v2]

2021-11-22 Thread Mandy Chung
umentException is thrown first before IllegalAccessException to > keep the existing behavior to avoid duplicated receiver check. Mandy Chung has updated the pull request incrementally with one additional commit since the last revision: Improve the exception message when the type is not

Re: RFR: JDK-8277451: java.lang.reflect.Field::set on static field with invalid argument type should throw IAE [v2]

2021-11-22 Thread Mandy Chung
On Sun, 21 Nov 2021 21:05:19 GMT, Alan Bateman wrote: >> src/java.base/share/classes/jdk/internal/reflect/MethodHandleFieldAccessorImpl.java >> line 72: >> >>> 70: */ >>> 71: protected IllegalArgumentException >>> newGetIllegalArgumentException(Object o) { >>> 72: return new

RFR: JDK-8277451: java.lang.reflect.Field::set on static field with invalid argument type should throw IAE

2021-11-20 Thread Mandy Chung
java.lang.reflect.Field::set on static field with invalid argument type should throw IAE. But this regression is introduced by JEP 416 throwing NPE instead. `ensureObj` is called as the first check of the `Field::set` method to ensure the receiver object is checked first before the argument.

Re: RFR: 8276764: Enable deterministic file content ordering for Jar and Jmod

2021-11-19 Thread Mandy Chung
On Fri, 19 Nov 2021 21:22:28 GMT, Andrew Leonard wrote: > I've added updates to the jar and jmod man pages, as "Notes" about ordering, > does that sound reasonable? The true source of the man pages are still kept in our closed repository. The copy in the jdk repo is generated from our

Re: RFR: JDK-8276447 Deprecate finalization-related methods for removal

2021-11-19 Thread Mandy Chung
On Fri, 19 Nov 2021 18:15:46 GMT, Brent Christian wrote: >> src/java.base/share/classes/java/lang/Object.java line 481: >> >>> 479: * system resources or to perform other cleanup. >>> 480: * >>> 481: * When running in a Java virtual machine in which finalization >>> has been >>

Re: RFR: JDK-8276447 Deprecate finalization-related methods for removal

2021-11-19 Thread Mandy Chung
On Thu, 18 Nov 2021 21:51:30 GMT, Brent Christian wrote: > Here are the code changes for the "Deprecate finalizers in the standard Java > API" portion of JEP 421 ("Deprecate Finalization for Removal") for code > review. > > This change makes the indicated deprecations, and updates the API

Re: RFR: 8276764: Enable deterministic file content ordering for Jar and Jmod [v3]

2021-11-19 Thread Mandy Chung
On Fri, 19 Nov 2021 18:33:31 GMT, Lance Andersen wrote: >> My thought is to remove it from this PR, since we've already determined the >> change has little impact. >> We can raise a new issue if we feel it's needed. > > The benchmark should use JMH. @cl4es, what are your thoughts here? > My

Re: RFR: JDK-8276447 Deprecate finalization-related methods for removal

2021-11-19 Thread Mandy Chung
On Thu, 18 Nov 2021 21:51:30 GMT, Brent Christian wrote: > Here are the code changes for the "Deprecate finalizers in the standard Java > API" portion of JEP 421 ("Deprecate Finalization for Removal") for code > review. > > This change makes the indicated deprecations, and updates the API

Re: RFR: 8272042: java.util.ImmutableCollections$Map1 and MapN should not be @ValueBased

2021-11-19 Thread Mandy Chung
On Fri, 19 Nov 2021 15:50:47 GMT, Roger Riggs wrote: > The `jdk.internal.ValueBased` annotation was incorrectly applied to > subclasses of java.util.AbstractMap. > [ValueBased](https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/doc-files/ValueBased.html) > requires that

Re: RFR: 8276764: Enable deterministic file content ordering for Jar and Jmod [v3]

2021-11-19 Thread Mandy Chung
On Fri, 19 Nov 2021 10:10:33 GMT, Andrew Leonard wrote: >> Both jar and jmod utilise java.io file operations whose methods define no >> ordering of the return file lists, and in fact rely on OS query file >> ordering, which can differ by underlying OS architecture. >> This PR adds sort

Re: RFR: 8276764: Enable deterministic file content ordering for Jar and Jmod

2021-11-18 Thread Mandy Chung
On Thu, 18 Nov 2021 11:40:24 GMT, Magnus Ihse Bursie wrote: >> @magicus >> ah right, got you. So the order of each version's String[] is as ordered on >> the jar cmd line args: >>

Re: RFR: 8276764: Enable deterministic file content ordering for Jar and Jmod

2021-11-18 Thread Mandy Chung
On Mon, 15 Nov 2021 18:47:34 GMT, Andrew Leonard wrote: > Both jar and jmod utilise java.io file operations whose methods define no > ordering of the return file lists, and in fact rely on OS query file > ordering, which can differ by underlying OS architecture. > This PR adds sort processing

Re: RFR: JDK-8276422 Add command-line option to disable finalization [v3]

2021-11-18 Thread Mandy Chung
On Thu, 18 Nov 2021 22:04:52 GMT, Stuart Marks wrote: >> I renamed the function to `is_finalization_enabled` per previous comment, >> and I also made these cleanups. > > Regarding using system properties, my initial prototype did this in the > launcher, and it did run into the problem that the

Re: RFR: JDK-8276422 Add command-line option to disable finalization [v3]

2021-11-18 Thread Mandy Chung
On Thu, 18 Nov 2021 20:05:15 GMT, Stuart Marks wrote: >> Pretty much what it says. The new option controls a static member in >> InstanceKlass that's consulted to determine whether the finalization >> machinery is activated for instances when a class is loaded. A new native >> method is added

Re: RFR: JDK-8276422 Add command-line option to disable finalization [v3]

2021-11-18 Thread Mandy Chung
On Thu, 18 Nov 2021 06:49:03 GMT, Kim Barrett wrote: >> src/hotspot/share/prims/jvm.cpp line 694: >> >>> 692: >>> 693: JVM_ENTRY(jboolean, JVM_IsFinalizationEnabled(JNIEnv * env)) >>> 694: return InstanceKlass::finalization_enabled() ? JNI_TRUE : JNI_FALSE; >> >> missing indentation > > I

Re: RFR: 8276764: Enable deterministic file content ordering for Jar and Jmod

2021-11-17 Thread Mandy Chung
On Mon, 15 Nov 2021 18:47:34 GMT, Andrew Leonard wrote: > Both jar and jmod utilise java.io file operations whose methods define no > ordering of the return file lists, and in fact rely on OS query file > ordering, which can differ by underlying OS architecture. > This PR adds sort processing

Re: RFR: 8271820: Implementation of JEP 416: Reimplement Core Reflection with Method Handle [v16]

2021-11-15 Thread Mandy Chung
On Wed, 27 Oct 2021 20:16:54 GMT, Mandy Chung wrote: >> This reimplements core reflection with method handles. >> >> For `Constructor::newInstance` and `Method::invoke`, the new implementation >> uses `MethodHandle`. For `Field` accessor, the new implementa

Re: RFR: 8271820: Implementation of JEP 416: Reimplement Core Reflection with Method Handle [v16]

2021-11-15 Thread Mandy Chung
On Mon, 15 Nov 2021 07:33:00 GMT, Martin Grigorov wrote: >> Mandy Chung has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains 43 commits: >> >> - fix copyright header and typo >> - improve documentatio

Re: RFR: 8250678: ModuleDescriptor.Version parsing treats empty segments inconsistently

2021-11-08 Thread Mandy Chung
On Fri, 24 Sep 2021 11:28:09 GMT, Masanori Yano wrote: > Could you please review the 8250678 bug fixes? > > The `parse` method of ModuleDescriptor.Version class behaves incorrectly when > the input string contains consecutive delimiters. > > The `parse` method treats strings as three

Re: RFR: 8153133: Thread.dumpStack() can use StackWalker [v3]

2021-11-08 Thread Mandy Chung
On Mon, 8 Nov 2021 16:05:12 GMT, Jaikiran Pai wrote: >> Can I please get a review of this change which seeks to implement the >> enhancement noted in https://bugs.openjdk.java.net/browse/JDK-8153133? >> >> The commit in this PR uses the `StackWalker` API to dump the stacktrace of >> the

Re: RFR: 8276700: Improve java.lang.ref.Cleaner javadocs

2021-11-08 Thread Mandy Chung
On Mon, 8 Nov 2021 13:27:17 GMT, Hendrik Schreiber wrote: >> src/java.base/share/classes/java/lang/ref/Cleaner.java line 93: >> >>> 91: * >>> 92: *// Static state class, capturing information necessary for >>> 93: *// cleanup, but no reference to the instance being cleaned

Re: RFR: 8276700: Improve java.lang.ref.Cleaner javadocs

2021-11-08 Thread Mandy Chung
On Fri, 22 Oct 2021 08:03:34 GMT, Hendrik Schreiber wrote: > Trivial improvement. > > Explicitly show how to create a `Cleaner` instance using `Cleaner.create()`. > Repeat (again) in the code example that the `State` `Runnable `should be > implemented as static class and not reference the

Re: RFR: 8276688: Remove JLinkReproducibleXXXTest from ProblemList.txt

2021-11-05 Thread Mandy Chung
On Fri, 5 Nov 2021 09:03:59 GMT, Jaikiran Pai wrote: > Can I please get a review for this change which removes the > `JLinkReproducibleTest` and `JLinkReproducible3Test` tests from the > `ProblemList.txt`? > > With the fix for https://bugs.openjdk.java.net/browse/JDK-8275509 now merged, > I

Re: RFR: 8250678: ModuleDescriptor.Version parsing treats empty segments inconsistently

2021-11-05 Thread Mandy Chung
On Fri, 24 Sep 2021 11:28:09 GMT, Masanori Yano wrote: > Could you please review the 8250678 bug fixes? > > The `parse` method of ModuleDescriptor.Version class behaves incorrectly when > the input string contains consecutive delimiters. > > The `parse` method treats strings as three

Integrated: JDK-8276650: GenGraphs does not produce deterministic output

2021-11-04 Thread Mandy Chung
On Thu, 4 Nov 2021 19:28:58 GMT, Mandy Chung wrote: > The dot graph should print the edges in alphatical order. A simple fix to > sort the edges before printing them. This pull request has now been integrated. Changeset: e21b5c7b Author: Mandy Chung URL:

Re: RFR: JDK-8276650: GenGraphs does not produce deterministic output

2021-11-04 Thread Mandy Chung
On Thu, 4 Nov 2021 21:46:21 GMT, Anthony Vanelverdinghe wrote: >> The dot graph should print the edges in alphatical order. A simple fix to >> sort the edges before printing them. > > src/jdk.jdeps/share/classes/com/sun/tools/jdeps/ModuleDotGraph.java line 336: > >> 334: private

RFR: JDK-8276650: GenGraphs does not produce deterministic output

2021-11-04 Thread Mandy Chung
The dot graph should print the edges in alphatical order. A simple fix to sort the edges before printing them. - Commit messages: - JDK-8276650: GenGraphs does not produce deterministic output Changes: https://git.openjdk.java.net/jdk/pull/6266/files Webrev:

Re: RFR: JDK-8276652: Missing row headers in MethodHandles.Lookup docs

2021-11-04 Thread Mandy Chung
On Thu, 4 Nov 2021 16:41:11 GMT, Ludvig Janiuk wrote: > Added row headers missing in the table captioned "Access mode summary". This > carries no visual change, but might be useful for screen readers. Looks okay. Thanks for improving the documentation accessibility. - Marked as

Re: RFR: JDK-8276649: MethodHandles.Lookup docs: replace the table in the cross-module access check section with list

2021-11-04 Thread Mandy Chung
On Thu, 4 Nov 2021 16:18:45 GMT, Ludvig Janiuk wrote: > Inferring from the flow of the text, the table should have been a list all > along, so I've made it that way. Before and after for comparison: >

Re: RFR: JDK-8276649: MethodHandles.Lookup docs: table could be list

2021-11-04 Thread Mandy Chung
On Thu, 4 Nov 2021 16:18:45 GMT, Ludvig Janiuk wrote: > Inferring from the flow of the text, the table should have been a list all > along, so I've made it that way. Before and after for comparison: >

Re: RFR: 8276629: Use blessed modifier order in core-libs code

2021-11-04 Thread Mandy Chung
On Thu, 4 Nov 2021 11:09:42 GMT, Magnus Ihse Bursie wrote: > I ran bin/blessed-modifier-order.sh on source owned by core-libs. This > scripts verifies that modifiers are in the "blessed" order, and fixes it > otherwise. I have manually checked the changes made by the script to make > sure

Re: RFR: 8250678: ModuleDescriptor.Version parsing treats empty segments inconsistently

2021-11-02 Thread Mandy Chung
On Fri, 24 Sep 2021 11:28:09 GMT, Masanori Yano wrote: > Could you please review the 8250678 bug fixes? > > The `parse` method of ModuleDescriptor.Version class behaves incorrectly when > the input string contains consecutive delimiters. > > The `parse` method treats strings as three

Re: RFR: 8273101: Eliminate the usage of threadgroup sandboxing in the java.util.logging

2021-10-29 Thread Mandy Chung
On Wed, 1 Sep 2021 06:31:16 GMT, Sergey Bylokhov wrote: > At the time Java supported applets and webstart, a special mechanism for > launching various applications in one JVM was used to reduce memory usage and > each application was isolated from each other. > > This isolation was

Integrated: JDK-8274848: LambdaMetaFactory::metafactory on REF_invokeSpecial impl method has incorrect behavior

2021-10-28 Thread Mandy Chung
On Mon, 11 Oct 2021 20:55:23 GMT, Mandy Chung wrote: > Classes compiled prior to the nestmate support will generate > `REF_invokeSpecial` if the implementation method is a private instance > method. Since a lambda proxy class is a hidden class, a nestmate of the > host class, i

Re: RFR: JDK-8274848: LambdaMetaFactory::metafactory on REF_invokeSpecial impl method has incorrect behavior [v4]

2021-10-28 Thread Mandy Chung
ly to ensure the adjustment is only made if the > implementation method is private method in the host class. Mandy Chung has updated the pull request incrementally with one additional commit since the last revision: convert to TestNG test - Changes: - all: https://git.openjd

Integrated: 8271820: Implementation of JEP 416: Reimplement Core Reflection with Method Handle

2021-10-28 Thread Mandy Chung
On Thu, 5 Aug 2021 23:51:13 GMT, Mandy Chung wrote: > This reimplements core reflection with method handles. > > For `Constructor::newInstance` and `Method::invoke`, the new implementation > uses `MethodHandle`. For `Field` accessor, the new implementation uses

Re: RFR: 8271820: Implementation of JEP 416: Reimplement Core Reflection with Method Handle [v16]

2021-10-28 Thread Mandy Chung
On Wed, 27 Oct 2021 20:16:54 GMT, Mandy Chung wrote: >> This reimplements core reflection with method handles. >> >> For `Constructor::newInstance` and `Method::invoke`, the new implementation >> uses `MethodHandle`. For `Field` accessor, the new implementa

Re: RFR: 8275735: [linux] Remove deprecated Metrics api (kernel memory limit)

2021-10-28 Thread Mandy Chung
On Thu, 28 Oct 2021 13:03:56 GMT, Severin Gehwolf wrote: > Please review this change to remove some API which no longer works as > expected as recent OCI runtimes start to drop support for `--kernel-memory` > switch. See the bug for references. This part of the API is not present in > hotspot

Integrated: JDK-8275703: System.loadLibrary fails on Big Sur for libraries hidden from filesystem

2021-10-28 Thread Mandy Chung
On Tue, 26 Oct 2021 22:51:29 GMT, Mandy Chung wrote: > On, macOS 11.x, system libraries are loaded from dynamic linker cache. The > libraries are no longer present on the filesystem. > `NativeLibraries::loadLibrary` checks for the file existence before calling > `JVM

Re: RFR: JDK-8274848: LambdaMetaFactory::metafactory on REF_invokeSpecial impl method has incorrect behavior [v2]

2021-10-27 Thread Mandy Chung
On Mon, 25 Oct 2021 21:39:34 GMT, Dan Smith wrote: > I'd suggest invoking the LMF API directly instead, testing both private and > non-private invokespecial MethodHandles, just making sure the rules can be > used without error. That's a good idea. I updated the test and see what you think.

Re: RFR: JDK-8274848: LambdaMetaFactory::metafactory on REF_invokeSpecial impl method has incorrect behavior [v3]

2021-10-27 Thread Mandy Chung
ly to ensure the adjustment is only made if the > implementation method is private method in the host class. 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.

Re: RFR: 8271820: Implementation of JEP 416: Reimplement Core Reflection with Method Handle [v16]

2021-10-27 Thread Mandy Chung
> > [1] https://bugs.openjdk.java.net/browse/JDK-8013527 > [2] > https://bugs.openjdk.java.net/browse/JDK-8271820?focusedCommentId=14439430=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14439430 Mandy Chung has updated the pull request with a new target base due to a

Re: RFR: JDK-8275703: System.loadLibrary fails on Big Sur for libraries hidden from filesystem

2021-10-27 Thread Mandy Chung
On Wed, 27 Oct 2021 18:25:40 GMT, Alan Snyder wrote: > I never load system libraries directly. I load my own libraries (that support > JNI entry points) and the system loader loads the necessary system frameworks > that they were linked against. > > What's different in this case that

Re: RFR: JDK-8275703: System.loadLibrary fails on Big Sur for libraries hidden from filesystem [v2]

2021-10-27 Thread Mandy Chung
his proposes > that on macOS >= 11, it will skip the file existence check and attempt to > load a library for each path from java.library.path and system library path. Mandy Chung has updated the pull request incrementally with two additional commits since the last revision: - Adju

Re: RFR: JDK-8275703: System.loadLibrary fails on Big Sur for libraries hidden from filesystem

2021-10-27 Thread Mandy Chung
On Wed, 27 Oct 2021 02:51:24 GMT, Jaikiran Pai wrote: >> On, macOS 11.x, system libraries are loaded from dynamic linker cache. The >> libraries are no longer present on the filesystem. >> `NativeLibraries::loadLibrary` checks for the file existence before calling >> `JVM_LoadLibrary`.

Re: RFR: JDK-8275703: System.loadLibrary fails on Big Sur for libraries hidden from filesystem

2021-10-27 Thread Mandy Chung
On Wed, 27 Oct 2021 03:39:39 GMT, Jaikiran Pai wrote: > So, I think, the whole point of this change in this block is to skip the file > existence check and return back a file path. exactly. - PR: https://git.openjdk.java.net/jdk/pull/6127

Re: RFR: 8271820: Implementation of JEP 416: Reimplement Core Reflection with Method Handle [v15]

2021-10-27 Thread Mandy Chung
On Wed, 27 Oct 2021 14:08:05 GMT, Alan Bateman wrote: >> Mandy Chung has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains 40 commits: >> >> - Fall back to the VM native reflection support if method hand

RFR: JDK-8275703: System.loadLibrary fails on Big Sur for libraries hidden from filesystem

2021-10-26 Thread Mandy Chung
On, macOS 11.x, system libraries are loaded from dynamic linker cache. The libraries are no longer present on the filesystem. `NativeLibraries::loadLibrary` checks for the file existence before calling `JVM_LoadLibrary`. Such check no longer applies on Big Sur. This proposes that on

Re: RFR: 8271820: Implementation of JEP 416: Reimplement Core Reflection with Method Handle [v15]

2021-10-26 Thread Mandy Chung
> > [1] https://bugs.openjdk.java.net/browse/JDK-8013527 > [2] > https://bugs.openjdk.java.net/browse/JDK-8271820?focusedCommentId=14439430=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14439430 Mandy Chung has updated the pull request with a new target base due to

Re: RFR: 8271820: Implementation of JEP 416: Reimplement Core Reflection with Method Handle [v14]

2021-10-26 Thread Mandy Chung
On Mon, 25 Oct 2021 22:39:47 GMT, intrigus wrote: > Question: Can someone confirm that `Method.invoke` will still work with 255 > parameters after this PR gets merged? Thanks for the test case. For the case when method handles cannot be created due to the arity limit, it can fall back to the

Re: RFR: 8275512: Upgrade required version of jtreg to 6.1 [v2]

2021-10-19 Thread Mandy Chung
On Tue, 19 Oct 2021 17:24:17 GMT, Weijun Wang wrote: >> As a follow up of JEP 411, we will soon disallow security manager by >> default. jtreg 6.1 does not set its own security manager if JDK version is >> >= 18. > > Weijun Wang has updated the pull request incrementally with one additional >

Re: RFR: 8271820: Implementation of JEP 416: Reimplement Core Reflection with Method Handle [v14]

2021-10-18 Thread Mandy Chung
> > [1] https://bugs.openjdk.java.net/browse/JDK-8013527 > [2] > https://bugs.openjdk.java.net/browse/JDK-8271820?focusedCommentId=14439430=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14439430 Mandy Chung has updated the pull request incrementally with one addit

Re: RFR: 8271820: Implementation of JEP 416: Reimplement Core Reflection with Method Handle [v13]

2021-10-16 Thread Mandy Chung
On Fri, 15 Oct 2021 15:09:23 GMT, Peter Levart wrote: >> It's not driven by performance data. It's part of Peter's contribution. >> I also prefer it without the packing. I propose to keep the parameter >> count as a separate field and examine it when there is footprint issue. > > The

Re: RFR: 8271820: Implementation of JEP 416: Reimplement Core Reflection with Method Handle [v13]

2021-10-14 Thread Mandy Chung
On Wed, 13 Oct 2021 18:53:22 GMT, Mandy Chung wrote: >> This reimplements core reflection with method handles. >> >> For `Constructor::newInstance` and `Method::invoke`, the new implementation >> uses `MethodHandle`. For `Field` accessor, the new implementa

Re: RFR: 8271820: Implementation of JEP 416: Reimplement Core Reflection with Method Handle [v13]

2021-10-14 Thread Mandy Chung
On Thu, 14 Oct 2021 00:23:29 GMT, Maurizio Cimadamore wrote: > I noted that in the static case, Poly does regress for fields - do we know > why instance Poly is better than static Poly? That seems surprising. I think you're asking why the regression of instance Poly is smaller than that of

Re: RFR: 8275145: file.encoding system property has an incorrect value on Windows

2021-10-14 Thread Mandy Chung
On Thu, 14 Oct 2021 15:50:28 GMT, Naoto Sato wrote: > Fixing a regression in which `file.encoding` was initialized by > `sprops->encoding` instead of `sprops->sun_jnu_encoding` on non macOS > platforms. tier1-3 tests passed on all platforms. Marked as reviewed by mchung (Reviewer).

Re: RFR: 8271820: Implementation of JEP 416: Reimplement Core Reflection with Method Handle [v13]

2021-10-14 Thread Mandy Chung
On Wed, 13 Oct 2021 23:53:17 GMT, Maurizio Cimadamore wrote: >> Mandy Chung has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Minor cleanup. Improve javadoc in CallerSensitiveAdapter > > src/java.base/shar

Re: RFR: 8271820: Implementation of JEP 416: Reimplement Core Reflection with Method Handle [v13]

2021-10-13 Thread Mandy Chung
On Wed, 13 Oct 2021 23:49:19 GMT, Maurizio Cimadamore wrote: >> Mandy Chung has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Minor cleanup. Improve javadoc in CallerSensitiveAdapter > > src/java.base/shar

Re: RFR: 8271820: Implementation of JEP 416: Reimplement Core Reflection with Method Handle [v13]

2021-10-13 Thread Mandy Chung
On Thu, 14 Oct 2021 00:10:50 GMT, Maurizio Cimadamore wrote: >> Mandy Chung has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Minor cleanup. Improve javadoc in CallerSensitiveAdapter > > src/java.base/shar

Re: RFR: 8271820: Implementation of JEP 416: Reimplement Core Reflection with Method Handle [v13]

2021-10-13 Thread Mandy Chung
> > [1] https://bugs.openjdk.java.net/browse/JDK-8013527 > [2] > https://bugs.openjdk.java.net/browse/JDK-8271820?focusedCommentId=14439430=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14439430 Mandy Chung has updated the pull request incrementally

Re: RFR: 8271820: Implementation of JEP 416: Reimplement Core Reflection with Method Handle [v12]

2021-10-12 Thread Mandy Chung
On Fri, 8 Oct 2021 23:31:32 GMT, Mandy Chung wrote: >> This reimplements core reflection with method handles. >> >> For `Constructor::newInstance` and `Method::invoke`, the new implementation >> uses `MethodHandle`. For `Field` accessor, the new implementa

Re: RFR: 8271820: Implementation of JEP 416: Reimplement Core Reflection with Method Handle [v12]

2021-10-12 Thread Mandy Chung
On Tue, 12 Oct 2021 17:44:08 GMT, Peter Levart wrote: >> src/java.base/share/classes/jdk/internal/reflect/MethodHandleCharacterFieldAccessorImpl.java >> line 137: >> >>> 135: { >>> 136: if (isReadOnly()) { >>> 137: ensureObj(obj); // throw NPE if obj is null on >>>

Re: Questions for JDK-4947890

2021-10-12 Thread Mandy Chung
Hi Ichiroh, This behavioral change is not intentional.  It's a bug introduced in JDK-4947890.  I create https://bugs.openjdk.java.net/browse/JDK-8275145 for this issue. Thanks for the investigation. Mandy On 10/12/21 2:44 AM, Ichiroh Takiguchi wrote: I have some questions for JDK-4947890。

Re: RFR: JDK-8274848: LambdaMetaFactory::metafactory on REF_invokeSpecial impl method has incorrect behavior [v2]

2021-10-12 Thread Mandy Chung
On Tue, 12 Oct 2021 10:22:07 GMT, Alan Bateman wrote: >> Mandy Chung has updated the pull request incrementally with one additional >> commit since the last revision: >> >> remove filelist which was added accidentally > > filelist line 1: > >>

Re: RFR: JDK-8274848: LambdaMetaFactory::metafactory on REF_invokeSpecial impl method has incorrect behavior [v2]

2021-10-12 Thread Mandy Chung
ly to ensure the adjustment is only made if the > implementation method is private method in the host class. Mandy Chung has updated the pull request incrementally with one additional commit since the last revision: remove filelist which was added accidentally - Changes: - all

RFR: JDK-8274848: LambdaMetaFactory::metafactory on REF_invokeSpecial impl method has incorrect behavior

2021-10-11 Thread Mandy Chung
Classes compiled prior to the nestmate support will generate `REF_invokeSpecial` if the implementation method is a private instance method. Since a lambda proxy class is a hidden class, a nestmate of the host class, it can invoke the private implementation method but it has to use

Re: RFR: 8271820: Implementation of JEP 416: Reimplement Core Reflection with Method Handle [v12]

2021-10-08 Thread Mandy Chung
On Fri, 8 Oct 2021 23:31:32 GMT, Mandy Chung wrote: >> This reimplements core reflection with method handles. >> >> For `Constructor::newInstance` and `Method::invoke`, the new implementation >> uses `MethodHandle`. For `Field` accessor, the new implementa

Re: RFR: 8271820: Implementation of JEP 416: Reimplement Core Reflection with Method Handle [v12]

2021-10-08 Thread Mandy Chung
> > [1] https://bugs.openjdk.java.net/browse/JDK-8013527 > [2] > https://bugs.openjdk.java.net/browse/JDK-8271820?focusedCommentId=14439430=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14439430 Mandy Chung has updated the pull request incrementally with one addition

Re: RFR: 8271820: Implementation of JEP 416: Reimplement Core Reflection with Method Handle [v11]

2021-10-08 Thread Mandy Chung
> > [1] https://bugs.openjdk.java.net/browse/JDK-8013527 > [2] > https://bugs.openjdk.java.net/browse/JDK-8271820?focusedCommentId=14439430=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14439430 Mandy Chung has updated the pull request incrementally with two addi

Re: RFR: 8271820: Implementation of JEP 416: Reimplement Core Reflection with Method Handle [v10]

2021-10-06 Thread Mandy Chung
> > [1] https://bugs.openjdk.java.net/browse/JDK-8013527 > [2] > https://bugs.openjdk.java.net/browse/JDK-8271820?focusedCommentId=14439430=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14439430 Mandy Chung has updated the pull request with a new target base due to a

Re: RFR: 8274299: Make Method/Constructor/Field accessors @Stable [v5]

2021-10-04 Thread Mandy Chung
On Mon, 4 Oct 2021 22:24:39 GMT, Peter Levart wrote: >> This patch improves reflective access speed as shown by the included >> benchmarks: >> >> https://jmh.morethan.io/?gists=902f4b43519c4f96c7abcd14cdc2d27d,ac490481e3001c710d75d6071c10b23a >> >> ... and is also a prerequisite to make JEP

Re: RFR: 8274299: Make Method/Constructor/Field accessors @Stable [v4]

2021-10-04 Thread Mandy Chung
On Mon, 4 Oct 2021 15:49:43 GMT, Peter Levart wrote: >> This patch improves reflective access speed as shown by the included >> benchmarks: >> >> https://jmh.morethan.io/?gists=902f4b43519c4f96c7abcd14cdc2d27d,ac490481e3001c710d75d6071c10b23a >> >> ... and is also a prerequisite to make JEP

Re: RFR: 8274299: Make Method/Constructor/Field accessors @Stable [v2]

2021-10-04 Thread Mandy Chung
On Mon, 4 Oct 2021 15:51:18 GMT, Peter Levart wrote: > One way this could be improved is to "stamp" the modifiers field with an > additional bit (say 0x8000_) to always hold a non-zero value. > Method::getModifiers() would then clear that bit in a returned value to stay > compatible.

Re: RFR: 8274523: java/lang/management/MemoryMXBean/MemoryTest.java test should handle Shenandoah

2021-09-29 Thread Mandy Chung
On Wed, 29 Sep 2021 17:56:00 GMT, Aleksey Shipilev wrote: > Currently it fails with: > > > $ CONF=linux-x86_64-server-fastdebug make run-test > TEST=java/lang/management/MemoryMXBean/MemoryTest.java > > STDERR: > java.lang.RuntimeException: TEST FAILED: Number of heap pools = 1 but >

Re: RFR: 8274299: Make Method/Constructor/Field accessors @Stable [v2]

2021-09-28 Thread Mandy Chung
On Tue, 28 Sep 2021 08:25:17 GMT, Peter Levart wrote: >> This patch improves reflective access speed as shown by the included >> benchmarks: >> >> https://jmh.morethan.io/?gists=902f4b43519c4f96c7abcd14cdc2d27d,ac490481e3001c710d75d6071c10b23a >> >> ... and is also a prerequisite to make JEP

Re: RFR: 8274394: Use Optional.isEmpty instead of !Optional.isPresent in jdk.jlink

2021-09-28 Thread Mandy Chung
On Sun, 26 Sep 2021 13:58:35 GMT, Andrey Turbanov wrote: > I propose to replace usages of !Optional.isPresent() with Optional.isEmpty > method. > It's makes code a bit easier to read. > Noticing negation before long chain of method calls is hard. LGTM - Marked as reviewed by

Re: RFR: 8274299: Make Method/Constructor/Field accessors @Stable

2021-09-27 Thread Mandy Chung
On Mon, 27 Sep 2021 11:23:43 GMT, Claes Redestad wrote: > A stray thought is why not most fields in `Field`/`Method`/`Constructor` are > `final`, as my IDE suggests. I can't find any hotspot code that injects > values to these fields. Experimentally changing most fields in `Field` to > final

Re: RFR: 8266936: Add a finalization JFR event [v14]

2021-09-27 Thread Mandy Chung
On Sat, 25 Sep 2021 14:22:28 GMT, Markus Grönlund wrote: >> Greetings, >> >> Object.finalize() was deprecated in JDK9. There is an ongoing effort to >> replace and mitigate Object.finalize() uses in the JDK libraries; please see >> https://bugs.openjdk.java.net/browse/JDK-8253568 for more

Re: RFR: 8274367: Re-indent stack-trace examples for Throwable.printStackTrace

2021-09-27 Thread Mandy Chung
On Mon, 27 Sep 2021 12:04:48 GMT, Pavel Rappo wrote: > This PR fixes indentation in the examples in the doc comment for > java.lang.Throwable#printStackTrace(). > > 1. Indentation in stack-trace output is significant. The cause of an > exception is output on the same level of indentation as

Re: RFR: 8274299: Make Method/Constructor/Field accessors @Stable

2021-09-27 Thread Mandy Chung
On Sat, 25 Sep 2021 10:15:11 GMT, Peter Levart wrote: > This patch improves reflective access speed as shown by the included > benchmarks: > > https://jmh.morethan.io/?gists=902f4b43519c4f96c7abcd14cdc2d27d,ac490481e3001c710d75d6071c10b23a > > ... and is also a prerequisite to make JEP 416

Re: RFR: 8274299: Make Method/Constructor/Field accessors @Stable

2021-09-27 Thread Mandy Chung
On Mon, 27 Sep 2021 11:23:43 GMT, Claes Redestad wrote: > This looks good, assuming Mandy is OK with extracting and adding to the > microbenchmarks from JEP 416 I'm okay to include these microbenchmarks in this patch. I will merge the change with JEP 416. > A stray thought is why not most

Re: RFR: 8274299: Make Method/Constructor/Field accessors @Stable

2021-09-27 Thread Mandy Chung
On Sat, 25 Sep 2021 10:15:11 GMT, Peter Levart wrote: > This patch improves reflective access speed as shown by the included > benchmarks: > > https://jmh.morethan.io/?gists=902f4b43519c4f96c7abcd14cdc2d27d,ac490481e3001c710d75d6071c10b23a > > ... and is also a prerequisite to make JEP 416

<    1   2   3   4   5   6   7   8   9   10   >