Re: RFR: 8331264: Reduce java.lang.constant initialization overhead [v3]

2024-04-29 Thread Mandy Chung
On Mon, 29 Apr 2024 12:39:17 GMT, Claes Redestad wrote: >> I'm looking at ways at reducing/eliminating startup overheads the classfile >> API in preparation of #17108, and have pushed a series of enhancements to >> that effect already. This PR is a collection of minor improvements which add

Re: RFR: 8330467: NoClassDefFoundError when lambda is in a hidden class [v4]

2024-04-29 Thread Mandy Chung
ed the pull request incrementally with one additional > commit since the last revision: > > Update > src/java.base/share/classes/java/lang/invoke/InnerClassLambdaMetafactory.java > > Co-authored-by: Mandy Chung HiddenTest is not a hidden class in this test. So

Re: RFR: 8330467: NoClassDefFoundError when lambda is in a hidden class [v4]

2024-04-29 Thread Mandy Chung
ed the pull request incrementally with one additional > commit since the last revision: > > Update > src/java.base/share/classes/java/lang/invoke/InnerClassLambdaMetafactory.java > > Co-authored-by: Mandy Chung `this::toString` references the hidden class by name [1] wh

Re: RFR: 8331264: Reduce java.lang.constant initialization overhead [v3]

2024-04-29 Thread Mandy Chung
On Mon, 29 Apr 2024 12:39:17 GMT, Claes Redestad wrote: >> I'm looking at ways at reducing/eliminating startup overheads the classfile >> API in preparation of #17108, and have pushed a series of enhancements to >> that effect already. This PR is a collection of minor improvements which add

Re: RFR: 8331114: Further improve performance of MethodTypeDesc::descriptorString [v5]

2024-04-26 Thread Mandy Chung
On Fri, 26 Apr 2024 22:27:43 GMT, Claes Redestad wrote: >> When analyzing (startup) performance of the Classfile API I found this >> opportunity to further improve `MethodTypeDescImpl::descriptorString`. >> >> Performance improves across the board in existing microbenchmarks: >> >> Name

Re: RFR: 8331187: Optimize MethodTypeDesc and ClassDesc.ofDescriptor for primitive types [v3]

2024-04-26 Thread Mandy Chung
On Fri, 26 Apr 2024 18:41:18 GMT, Claes Redestad wrote: >> src/java.base/share/classes/sun/invoke/util/Wrapper.java line 384: >> >>> 382: >>> 383: /** A nominal descriptor of the primitive type */ >>> 384: public ClassDesc primitiveClassDescriptor() { return >>> primitiveTypeDesc; }

Re: RFR: 8331114: Further improve performance of MethodTypeDesc::descriptorString [v4]

2024-04-26 Thread Mandy Chung
On Fri, 26 Apr 2024 08:07:04 GMT, Claes Redestad wrote: >> When analyzing (startup) performance of the Classfile API I found this >> opportunity to further improve `MethodTypeDescImpl::descriptorString`. >> >> Performance improves across the board in existing microbenchmarks: >> >> Name

Re: RFR: 8331187: Optimize MethodTypeDesc and ClassDesc.ofDescriptor for primitive types [v3]

2024-04-26 Thread Mandy Chung
On Fri, 26 Apr 2024 11:51:51 GMT, Claes Redestad wrote: >> This PR makes ClassDesc.ofDescriptor return the shared constant for >> primitive descriptor strings ("I" etc..), and leverages this further by >> refactoring `MethodTypeDescImpl.ofDescriptor` to avoid the intermediate >> substring for

Re: RFR: 8331134: Port SimpleStringBuilderStrategy to use ClassFile API [v10]

2024-04-26 Thread Mandy Chung
or a rebase. The pull request now contains 12 commits: > > - Rebase after integration of #18953 > - Nits, clean up constant, introduce missing constant MethodTypeDesc for > toString > - Make Set.of(STRONG) a constant, fix compilation, minor code improvements > - Update

Re: RFR: 8327247: C2 uses up to 2GB of RAM to compile complex string concat in extreme cases [v2]

2024-04-25 Thread Mandy Chung
On Thu, 25 Apr 2024 19:53:46 GMT, Claes Redestad wrote: >> Splitting out the ASM-based version from #18690 to push that first under the >> JBS (to help backporting). Keeping #18690 open to rebase and follow-up on >> this as a subtask. See discussion in that #18690 for more details, >>

Re: RFR: 8327247: C2 uses up to 2GB of RAM to compile complex string concat in extreme cases [v9]

2024-04-25 Thread Mandy Chung
On Wed, 24 Apr 2024 19:13:43 GMT, Claes Redestad wrote: >> This patch suggests a workaround to an issue with huge SCF MH expression >> trees taking excessive JIT compilation resources by reviving (part of) the >> simple bytecode-generating strategy that was originally available as an >>

Re: RFR: 8327247: C2 uses up to 2GB of RAM to compile complex string concat in extreme cases [v2]

2024-04-25 Thread Mandy Chung
On Thu, 25 Apr 2024 19:53:46 GMT, Claes Redestad wrote: >> Splitting out the ASM-based version from #18690 to push that first under the >> JBS (to help backporting). Keeping #18690 open to rebase and follow-up on >> this as a subtask. See discussion in that #18690 for more details, >>

Re: RFR: 8329581: Java launcher no longer prints a stack trace [v5]

2024-04-24 Thread Mandy Chung
On Wed, 24 Apr 2024 14:49:55 GMT, Sonia Zaldana Calles wrote: >> Hi folks, >> >> This PR aims to fix >> [JDK-8329581](https://bugs.openjdk.org/browse/JDK-8329581). >> >> I think the regression got introduced in >> [JDK-8315458](https://bugs.openjdk.org/browse/JDK-8315458). >> >> In the

Re: RFR: 8327247: C2 uses up to 2GB of RAM to compile complex string concat in extreme cases [v8]

2024-04-24 Thread Mandy Chung
On Wed, 24 Apr 2024 10:08:42 GMT, Claes Redestad wrote: >> This patch suggests a workaround to an issue with huge SCF MH expression >> trees taking excessive JIT compilation resources by reviving (part of) the >> simple bytecode-generating strategy that was originally available as an >>

Re: RFR: 8327247: C2 uses up to 2GB of RAM to compile complex string concat in extreme cases [v6]

2024-04-23 Thread Mandy Chung
On Thu, 18 Apr 2024 14:50:30 GMT, Claes Redestad wrote: >> This patch suggests a workaround to an issue with huge SCF MH expression >> trees taking excessive JIT compilation resources by reviving (part of) the >> simple bytecode-generating strategy that was originally available as an >>

Re: RFR: 8329581: Java launcher no longer prints a stack trace [v4]

2024-04-23 Thread Mandy Chung
On Tue, 23 Apr 2024 18:21:42 GMT, Sonia Zaldana Calles wrote: >> Hi folks, >> >> This PR aims to fix >> [JDK-8329581](https://bugs.openjdk.org/browse/JDK-8329581). >> >> I think the regression got introduced in >> [JDK-8315458](https://bugs.openjdk.org/browse/JDK-8315458). >> >> In the

Re: RFR: 8327247: C2 uses up to 2GB of RAM to compile complex string concat in extreme cases [v6]

2024-04-23 Thread Mandy Chung
On Mon, 22 Apr 2024 08:59:33 GMT, Claes Redestad wrote: > @mlchung @asotona: Alan asked me to use the ClassFile API here. As it's only > used in what's effectively a slow path it shouldn't be blocked by the startup > investigations we're doing there, right? I agree that this should not be

Re: RFR: 8329581: Java launcher no longer prints a stack trace [v3]

2024-04-22 Thread Mandy Chung
On Fri, 19 Apr 2024 19:39:09 GMT, Sonia Zaldana Calles wrote: >> Hi folks, >> >> This PR aims to fix >> [JDK-8329581](https://bugs.openjdk.org/browse/JDK-8329581). >> >> I think the regression got introduced in >> [JDK-8315458](https://bugs.openjdk.org/browse/JDK-8315458). >> >> In the

Re: RFR: 8330802: Desugar switch in Locale::createLocale [v2]

2024-04-22 Thread Mandy Chung
On Mon, 22 Apr 2024 14:11:41 GMT, Claes Redestad wrote: >> This switch expression in `Locale::createLocale` is causing a somewhat large >> startup regression on my local system. Desugaring to if statements seem like >> the right thing to do while we investigate ways to further reduce overheads

Re: RFR: 8330595: Invoke ObjectMethods::bootstrap method exactly [v3]

2024-04-19 Thread Mandy Chung
On Fri, 19 Apr 2024 07:42:19 GMT, Claes Redestad wrote: >> Investigating a recent regression in mainline I realized we have an >> opportunity to improve the bootstrap overheads of ObjectMethods::bootstrap >> by using `invokeExact` in a way similar to what we already do for LMF and >> SCF

Re: RFR: 8329581: Java launcher no longer prints a stack trace

2024-04-19 Thread Mandy Chung
On Thu, 18 Apr 2024 20:41:05 GMT, Sonia Zaldana Calles wrote: > Just to clarify, this would still mean converting “isStatic” and “noArgs” > from local variables to fields so I am able to read them on the C side of > things. Did I understand this correctly? I'm okay with adding static boolean

Re: RFR: 8330681: Explicit hashCode and equals for java.lang.runtime.SwitchBootstraps$TypePairs

2024-04-19 Thread Mandy Chung
On Fri, 19 Apr 2024 13:23:53 GMT, Claes Redestad wrote: > We can reduce overhead of first use of a switch bootstrap by moving > `typePairToName` into `TypePairs` and by explicitly overriding `hashCode` and > `equals`. The first change avoids loading and initializing the `TypePairs` > class in

Re: RFR: 8330467: NoClassDefFoundError when lambda is in a hidden class [v3]

2024-04-17 Thread Mandy Chung
On Wed, 17 Apr 2024 16:08:31 GMT, Adam Sotona wrote: >> Current implementation of `LambdaMetafactory` does not allow to use lambdas >> in hidden classes. Invocation throws `NoClassDefFoundError` instead. >> >> This patch includes lambda implementation in a hidden class under the >> special

Re: RFR: 8294960: Convert java.base/java.lang.invoke package to use the Classfile API to generate lambdas and method handles [v6]

2024-04-17 Thread Mandy Chung
On Wed, 17 Apr 2024 15:21:32 GMT, Adam Sotona wrote: >> java.base java.lang.invoke package heavily uses ASM to generate lambdas and >> method handles. >> >> This patch converts ASM calls to Classfile API. >> >> This PR is continuation of https://github.com/openjdk/jdk/pull/12945 >> >> Any

Re: RFR: 8319516: AIX System::loadLibrary needs support to load a shared library from an archive object [v29]

2024-04-17 Thread Mandy Chung
On Wed, 17 Apr 2024 11:20:24 GMT, Suchismith Roy wrote: >> Allow support for both .a and .so files in AIX. >> If .so file is not found, allow fallback to .a extension. >> JBS Issue: [JDK-8319516](https://bugs.openjdk.org/browse/JDK-8319516) > > Suchismith Roy has updated the pull request

Re: RFR: 8294960: Convert java.base/java.lang.invoke package to use the Classfile API to generate lambdas and method handles [v5]

2024-04-16 Thread Mandy Chung
On Thu, 4 Apr 2024 09:20:39 GMT, Adam Sotona wrote: >> java.base java.lang.invoke package heavily uses ASM to generate lambdas and >> method handles. >> >> This patch converts ASM calls to Classfile API. >> >> This PR is continuation of https://github.com/openjdk/jdk/pull/12945 >> >> Any

Re: RFR: 8311302: Allow for jlinking a custom runtime without packaged modules being present [v23]

2024-04-16 Thread Mandy Chung
On Wed, 3 Apr 2024 22:31:39 GMT, Mandy Chung wrote: >> Severin Gehwolf has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Move CreateLinkableRuntimePlugin to build folder >> >> Keep runtim

Re: RFR: 8329581: Java launcher no longer prints a stack trace

2024-04-15 Thread Mandy Chung
On Mon, 15 Apr 2024 18:25:02 GMT, Sonia Zaldana Calles wrote: > Hi folks, > > This PR aims to fix > [JDK-8329581](https://bugs.openjdk.org/browse/JDK-8329581). > > I think the regression got introduced in > [JDK-8315458](https://bugs.openjdk.org/browse/JDK-8315458). > > In the issue

Re: RFR: 8319516: AIX System::loadLibrary needs support to load a shared library from an archive object [v27]

2024-04-15 Thread Mandy Chung
On Mon, 15 Apr 2024 16:10:38 GMT, Suchismith Roy wrote: >> Allow support for both .a and .so files in AIX. >> If .so file is not found, allow fallback to .a extension. >> JBS Issue: [JDK-8319516](https://bugs.openjdk.org/browse/JDK-8319516) > > Suchismith Roy has updated the pull request

Re: RFR: 8330196: Make java/lang/invoke/defineHiddenClass/BasicTest release agnostic

2024-04-13 Thread Mandy Chung
On Fri, 12 Apr 2024 23:55:01 GMT, Joe Darcy wrote: > Straightforward test update so it doesn't have to be trivially updated for > each JDK version. LGTM. Thanks for fixing this. - Marked as reviewed by mchung (Reviewer). PR Review:

Re: RFR: JDK-8319516 - Native library suffix impact on the library loading in AIX- Java Class Loader [v13]

2024-04-05 Thread Mandy Chung
On Fri, 5 Apr 2024 18:14:36 GMT, Suchismith Roy wrote: >> Allow support for both .a and .so files in AIX. >> If .so file is not found, allow fallback to .a extension. >> JBS Issue: [JDK-8319516](https://bugs.openjdk.org/browse/JDK-8319516) > > Suchismith Roy has updated the pull request

Re: RFR: JDK-8319516 - Native library suffix impact on the library loading in AIX- Java Class Loader [v12]

2024-04-05 Thread Mandy Chung
On Fri, 5 Apr 2024 17:44:22 GMT, Suchismith Roy wrote: >> Allow support for both .a and .so files in AIX. >> If .so file is not found, allow fallback to .a extension. >> JBS Issue: [JDK-8319516](https://bugs.openjdk.org/browse/JDK-8319516) > > Suchismith Roy has updated the pull request

Re: RFR: JDK-8319516 - Native library suffix impact on the library loading in AIX- Java Class Loader [v12]

2024-04-05 Thread Mandy Chung
On Fri, 5 Apr 2024 17:41:36 GMT, Suchismith Roy wrote: >> Allow support for both .a and .so files in AIX. >> If .so file is not found, allow fallback to .a extension. >> JBS Issue: [JDK-8319516](https://bugs.openjdk.org/browse/JDK-8319516) > > Suchismith Roy has updated the pull request

Re: RFR: JDK-8319516 - Native library suffix impact on the library loading in AIX- Java Class Loader [v11]

2024-04-05 Thread Mandy Chung
On Fri, 5 Apr 2024 08:58:34 GMT, Suchismith Roy wrote: >> Allow support for both .a and .so files in AIX. >> If .so file is not found, allow fallback to .a extension. >> JBS Issue: [JDK-8319516](https://bugs.openjdk.org/browse/JDK-8319516) > > Suchismith Roy has updated the pull request

Re: RFR: JDK-8319516 - Native library suffix impact on the library loading in AIX- Java Class Loader [v11]

2024-04-05 Thread Mandy Chung
On Fri, 5 Apr 2024 08:58:34 GMT, Suchismith Roy wrote: >> Allow support for both .a and .so files in AIX. >> If .so file is not found, allow fallback to .a extension. >> JBS Issue: [JDK-8319516](https://bugs.openjdk.org/browse/JDK-8319516) > > Suchismith Roy has updated the pull request

Re: RFR: JDK-8319516 - Native library suffix impact on the library loading in AIX- Java Class Loader [v10]

2024-04-05 Thread Mandy Chung
On Fri, 5 Apr 2024 08:08:27 GMT, Suchismith Roy wrote: >> The test should verify if `/usr/lib/libperstat.a` is present and also >> `/usr/lib/libperfstat.so` is not present. >> >> Do you expect all AIX machines do not have `/usr/lib/libperfstat.so`? > > Yes it is expected. the hotspot code has

Re: RFR: JDK-8319516 - Native library suffix impact on the library loading in AIX- Java Class Loader [v10]

2024-04-04 Thread Mandy Chung
On Thu, 4 Apr 2024 17:35:43 GMT, Mandy Chung wrote: >> Suchismith Roy has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Add jtreg test case > > test/jdk/java/lang/RuntimeTests/loadLibrary/LoadLibrary

Re: RFR: JDK-8319516 - Native library suffix impact on the library loading in AIX- Java Class Loader [v10]

2024-04-04 Thread Mandy Chung
On Thu, 4 Apr 2024 11:13:43 GMT, Suchismith Roy wrote: >> Allow support for both .a and .so files in AIX. >> If .so file is not found, allow fallback to .a extension. >> JBS Issue: [JDK-8319516](https://bugs.openjdk.org/browse/JDK-8319516) > > Suchismith Roy has updated the pull request

Re: RFR: 8328366: Thread.setContextClassloader from thread in FJP commonPool task no longer works after JDK-8327501

2024-04-04 Thread Mandy Chung
On Tue, 19 Mar 2024 12:16:29 GMT, Viktor Klang wrote: > This is a draft PR with a potential solution to 8328366 without regressing > 8327501. > > @DougLea To avoid regressions in the future, where would regression tests for > this ideally be located? Marked as reviewed by mchung (Reviewer).

Re: RFR: 8328366: Thread.setContextClassloader from thread in FJP commonPool task no longer works after JDK-8327501

2024-04-04 Thread Mandy Chung
On Thu, 4 Apr 2024 14:46:11 GMT, Viktor Klang wrote: >> src/java.base/share/classes/java/util/concurrent/ForkJoinPool.java line 1143: >> >>> 1141: @SuppressWarnings("removal") >>> 1142: SecurityManager sm = System.getSecurityManager(); >>> 1143: if (sm !=

Re: RFR: JDK-8319516 - Native library suffix impact on the library loading in AIX- Java Class Loader [v10]

2024-04-04 Thread Mandy Chung
On Thu, 4 Apr 2024 11:13:43 GMT, Suchismith Roy wrote: >> Allow support for both .a and .so files in AIX. >> If .so file is not found, allow fallback to .a extension. >> JBS Issue: [JDK-8319516](https://bugs.openjdk.org/browse/JDK-8319516) > > Suchismith Roy has updated the pull request

Re: RFR: 8311302: Allow for jlinking a custom runtime without packaged modules being present [v23]

2024-04-03 Thread Mandy Chung
On Tue, 19 Mar 2024 16:55:14 GMT, Severin Gehwolf wrote: >> Please review this patch which adds a jlink mode to the JDK which doesn't >> need the packaged modules being present. A.k.a run-time image based jlink. >> Fundamentally this patch adds an option to use `jlink` even though your JDK >>

Re: RFR: JDK-8319516 - Native library suffix impact on the library loading in AIX- Java Class Loader [v9]

2024-04-03 Thread Mandy Chung
On Wed, 3 Apr 2024 12:32:21 GMT, Suchismith Roy wrote: >> Allow support for both .a and .so files in AIX. >> If .so file is not found, allow fallback to .a extension. >> JBS Issue: [JDK-8319516](https://bugs.openjdk.org/browse/JDK-8319516) > > Suchismith Roy has updated the pull request

Integrated: 8326979: (jdeps) improve the error message for FindException caused by InvalidModuleDescriptorException

2024-04-02 Thread Mandy Chung
On Thu, 14 Mar 2024 17:35:22 GMT, Mandy Chung wrote: > Trivial fix. Improve the error message to print the cause of the module > resolution failure if present. This pull request has now been integrated. Changeset: 044f4ed5 Author: Mandy Chung URL: https://git.openjdk.o

Re: RFR: JDK-8319516 - Native library suffix impact on the library loading in AIX- Java Class Loader [v8]

2024-04-01 Thread Mandy Chung
On Mon, 1 Apr 2024 17:07:47 GMT, Suchismith Roy wrote: >> Allow support for both .a and .so files in AIX. >> If .so file is not found, allow fallback to .a extension. >> JBS Issue: [JDK-8319516](https://bugs.openjdk.org/browse/JDK-8319516) > > Suchismith Roy has updated the pull request

Re: RFR: JDK-8319516 - Native library suffix impact on the library loading in AIX- Java Class Loader [v8]

2024-04-01 Thread Mandy Chung
On Mon, 1 Apr 2024 17:07:47 GMT, Suchismith Roy wrote: >> Allow support for both .a and .so files in AIX. >> If .so file is not found, allow fallback to .a extension. >> JBS Issue: [JDK-8319516](https://bugs.openjdk.org/browse/JDK-8319516) > > Suchismith Roy has updated the pull request

Re: RFR: JDK-8319516 - Native library suffix impact on the library loading in AIX- Java Class Loader [v8]

2024-04-01 Thread Mandy Chung
On Mon, 1 Apr 2024 18:02:26 GMT, Martin Doerr wrote: > Now, I'm getting "java.lang.UnsatisfiedLinkError: no libname.a in > java.library.path" when trying `System.loadLibrary("libname.a")` even though > the file exists in the library path. Is this intended? To load a library file, you should

Re: RFR: JDK-8319516 - Native library suffix impact on the library loading in AIX- Java Class Loader [v8]

2024-04-01 Thread Mandy Chung
On Mon, 1 Apr 2024 18:24:53 GMT, Mandy Chung wrote: >> Suchismith Roy has updated the pull request incrementally with one >> additional commit since the last revision: >> >> spaces > > src/java.base/aix/classes/jdk/internal/loader/ClassLoaderHelper.java lin

Re: RFR: JDK-8319516 - Native library suffix impact on the library loading in AIX- Java Class Loader [v8]

2024-04-01 Thread Mandy Chung
On Mon, 1 Apr 2024 17:07:47 GMT, Suchismith Roy wrote: >> Allow support for both .a and .so files in AIX. >> If .so file is not found, allow fallback to .a extension. >> JBS Issue: [JDK-8319516](https://bugs.openjdk.org/browse/JDK-8319516) > > Suchismith Roy has updated the pull request

Re: RFR: JDK-8319516 - Native library suffix impact on the library loading in AIX- Java Class Loader [v6]

2024-03-28 Thread Mandy Chung
On Wed, 27 Mar 2024 17:23:50 GMT, Suchismith Roy wrote: >> Allow support for both .a and .so files in AIX. >> If .so file is not found, allow fallback to .a extension. >> JBS Issue: [JDK-8319516](https://bugs.openjdk.org/browse/JDK-8319516) > > Suchismith Roy has updated the pull request with a

Re: RFR: JDK-8319516 - Native library suffix impact on the library loading in AIX- Java Class Loader [v5]

2024-03-27 Thread Mandy Chung
On Wed, 27 Mar 2024 17:40:09 GMT, Suchismith Roy wrote: >> AFAICT from your fix for >> [JDK-8320005](https://bugs.openjdk.org/browse/JDK-8320005) commit >> [e85355ad](https://github.com/openjdk/jdk/commit/e85355ada4ac1061c49ee9f1247d37a437c7b5ab). >> >> But it needs verification as I suggest

Re: RFR: JDK-8319516 - Native library suffix impact on the library loading in AIX- Java Class Loader [v5]

2024-03-27 Thread Mandy Chung
On Wed, 27 Mar 2024 17:30:13 GMT, Suchismith Roy wrote: >>> Because of the VM support, we can remove `mapAlternativeName` completely. >> >> Does VM provide support for mapping .so to .a files ? We still have cases >> where the entire .a file is shared and don't need to mention the member. > >

Re: RFR: JDK-8319516 - Native library suffix impact on the library loading in AIX- Java Class Loader [v5]

2024-03-27 Thread Mandy Chung
On Wed, 27 Mar 2024 17:18:10 GMT, Mandy Chung wrote: >> I think we both mean that the `if (name.contains("("))` block should get >> removed. > >> We are not supporting that. Are you referring to the comment in the code ? >> Yeah it should be resconstructi

Re: RFR: JDK-8319516 - Native library suffix impact on the library loading in AIX- Java Class Loader [v5]

2024-03-27 Thread Mandy Chung
On Wed, 27 Mar 2024 17:06:49 GMT, Martin Doerr wrote: >>> > So we should keep the mapAlternativeName for atleast .so to .a >>> > mapping(without any members mentioned). >>> >>> "libname.so(member_name)" is not a valid library name. No reason why >>> `System.load` has to support it. >> >> We

Re: RFR: JDK-8319516 - Native library suffix impact on the library loading in AIX- Java Class Loader [v5]

2024-03-27 Thread Mandy Chung
On Wed, 27 Mar 2024 08:47:10 GMT, Martin Doerr wrote: >> @mlchung The first name constructed by Classloader is always lib.so. >> So we need a way to map it to lib.a . Else it will search for .so and >> fail. > > Right, the `loadLibraryOnlyIfPresent` change is sufficient for >

Re: RFR: JDK-8319516 - Native library suffix impact on the library loading in AIX- Java Class Loader [v5]

2024-03-26 Thread Mandy Chung
On Mon, 25 Mar 2024 09:46:50 GMT, Suchismith Roy wrote: >> Allow support for both .a and .so files in AIX. >> If .so file is not found, allow fallback to .a extension. >> JBS Issue: [JDK-8319516](https://bugs.openjdk.org/browse/JDK-8319516) > > Suchismith Roy has updated the pull request

Re: RFR: JDK-8319516 - Native library suffix impact on the library loading in AIX- Java Class Loader [v5]

2024-03-26 Thread Mandy Chung
On Tue, 26 Mar 2024 20:59:54 GMT, Martin Doerr wrote: >> Suchismith Roy has updated the pull request incrementally with four >> additional commits since the last revision: >> >> - coding style >> - set false >> - restore fil >> - remove member check code > >

Re: RFR: JDK-8319516 - Native library suffix impact on the library loading in AIX- Java Class Loader [v5]

2024-03-25 Thread Mandy Chung
On Mon, 25 Mar 2024 18:56:21 GMT, Suchismith Roy wrote: > And it has been in J9 for long time for the exact same reason, which > actually brought out the issue for dcstartup in OpenJDK. dcstartup fails because it fails to load an agent library specified via `-agentlib:am_ibm_16` that was

Re: RFR: JDK-8319516 - Native library suffix impact on the library loading in AIX- Java Class Loader [v5]

2024-03-25 Thread Mandy Chung
On Mon, 25 Mar 2024 09:46:50 GMT, Suchismith Roy wrote: >> Allow support for both .a and .so files in AIX. >> If .so file is not found, allow fallback to .a extension. >> JBS Issue: [JDK-8319516](https://bugs.openjdk.org/browse/JDK-8319516) > > Suchismith Roy has updated the pull request

Re: RFR: JDK-8319516 - Native library suffix impact on the library loading in AIX- Java Class Loader [v4]

2024-03-21 Thread Mandy Chung
On Mon, 18 Mar 2024 17:43:45 GMT, Suchismith Roy wrote: >> Allow support for both .a and .so files in AIX. >> If .so file is not found, allow fallback to .a extension. >> JBS Issue: [JDK-8319516](https://bugs.openjdk.org/browse/JDK-8319516) > > Suchismith Roy has updated the pull request

Re: RFR: JDK-8319516 - Native library suffix impact on the library loading in AIX- Java Class Loader [v4]

2024-03-21 Thread Mandy Chung
On Mon, 18 Mar 2024 17:43:45 GMT, Suchismith Roy wrote: >> Allow support for both .a and .so files in AIX. >> If .so file is not found, allow fallback to .a extension. >> JBS Issue: [JDK-8319516](https://bugs.openjdk.org/browse/JDK-8319516) > > Suchismith Roy has updated the pull request

Re: RFR: 8311302: Allow for jlinking a custom runtime without packaged modules being present [v23]

2024-03-20 Thread Mandy Chung
On Wed, 20 Mar 2024 10:24:23 GMT, Severin Gehwolf wrote: > What we really want is some form of API to extend/patch an existing jimage > preserving everything else. Perhaps I should look into that. Would that be > worth doing? I think avoiding the plugin pipeline in creating a linkable image

Re: RFR: 8328366: Thread.setContextClassloader from thread in FJP commonPool task no longer works after JDK-8327501

2024-03-20 Thread Mandy Chung
On Tue, 19 Mar 2024 12:16:29 GMT, Viktor Klang wrote: > This is a draft PR with a potential solution to 8328366 without regressing > 8327501. > > @DougLea To avoid regressions in the future, where would regression tests for > this ideally be located?

Re: CFV: New Core Libraries Group Member: Per-Ake Minborg

2024-03-19 Thread mandy . chung
Vote: yes Mandy On 3/19/24 8:19 AM, Daniel Fuchs wrote: Hi, I hereby nominate Per-Ake Minborg (pminborg) [1] to Membership in the Core Libraries Group [4]. Per-Ake is an OpenJDK Reviewer, a committer in the Leyden and Panama projects, and a member of Oracle’s Java Core Libraries team.

Re: RFR: 8311302: Allow for jlinking a custom runtime without packaged modules being present [v23]

2024-03-19 Thread Mandy Chung
On Tue, 19 Mar 2024 16:55:14 GMT, Severin Gehwolf wrote: >> Please review this patch which adds a jlink mode to the JDK which doesn't >> need the packaged modules being present. A.k.a run-time image based jlink. >> Fundamentally this patch adds an option to use `jlink` even though your JDK >>

Integrated: 8328261: public lookup fails with IllegalAccessException when used while module system is being initialized

2024-03-19 Thread Mandy Chung
On Mon, 18 Mar 2024 17:40:26 GMT, Mandy Chung wrote: > A simple fix. This is caused by a bug in `VerifyAccess::isClassAccessible` > that checks if a class is exported from `java.base` before the exports are > fully setup.It should check if the module system is fully initialized

Re: RFR: 8311302: Allow for jlinking a custom runtime without packaged modules being present [v21]

2024-03-18 Thread Mandy Chung
On Fri, 15 Mar 2024 15:19:17 GMT, Severin Gehwolf wrote: >> Please review this patch which adds a jlink mode to the JDK which doesn't >> need the packaged modules being present. A.k.a run-time image based jlink. >> Fundamentally this patch adds an option to use `jlink` even though your JDK >>

Re: RFR: 8311302: Allow for jlinking a custom runtime without packaged modules being present [v20]

2024-03-18 Thread Mandy Chung
On Mon, 18 Mar 2024 13:01:10 GMT, Severin Gehwolf wrote: > Yes we do. The main reason being that the `jdk` image has more to it than > just the image. `src.zip`, CDS data, `demo` and so on. We don't want to > duplicate that. To us, including the `jmods` folder is something that comes > into

RFR: 8328261: public lookup fails with IllegalAccessException when used while module system is being initialized

2024-03-18 Thread Mandy Chung
A simple fix. This is caused by a bug in `VerifyAccess::isClassAccessible` that checks if a class is exported from `java.base` before the exports are fully setup.It should check if the module system is fully initialized before checking the module exports instead. - Commit

Re: RFR: 8311302: Allow for jlinking a custom runtime without packaged modules being present [v20]

2024-03-16 Thread Mandy Chung
On Fri, 15 Mar 2024 10:53:29 GMT, Severin Gehwolf wrote: > Wasn't the intention to make "creating a linkable runtime image" a build only > decision and make the relevant infrastructure classes build-only artefacts? Build-only decision means that the linkable runtime image is only produced by

Re: RFR: 8311302: Allow for jlinking a custom runtime without packaged modules being present [v20]

2024-03-16 Thread Mandy Chung
On Fri, 15 Mar 2024 09:55:15 GMT, Severin Gehwolf wrote: > > If `--enable-runtime-link-image` is enabled, the JDK image does not include > > the packaged modules. > > That's not true. Right now `--enable-runtime-link-image` modifies how the > `lib/modules` image looks like (adds a bunch of

Re: RFR: 8311302: Allow for jlinking a custom runtime without packaged modules being present [v20]

2024-03-14 Thread Mandy Chung
On Thu, 14 Mar 2024 14:24:57 GMT, Severin Gehwolf wrote: >> Please review this patch which adds a jlink mode to the JDK which doesn't >> need the packaged modules being present. A.k.a run-time image based jlink. >> Fundamentally this patch adds an option to use `jlink` even though your JDK >>

RFR: 8326979: (jdeps) improve the error message for FindException caused by InvalidModuleDescriptorException

2024-03-14 Thread Mandy Chung
Trivial fix. Improve the error message to print the cause of the module resolution failure if present. - Commit messages: - 8326979: (jdeps) improve the error message for FindException caused by InvalidModuleDescriptorException Changes:

Re: RFR: 8327786: Add fluent setAccessible()

2024-03-11 Thread Mandy Chung
On Thu, 25 Jan 2024 21:35:45 GMT, Sergey wrote: > The feature allows to extract a private field value in a single expression, > like so: > > object.getClass().getDeclaredField().setAccessible().get(object) I agree with the evaluation of

Re: RFR: 8327729: Remove deprecated xxxObject methods from jdk.internal.misc.Unsafe [v3]

2024-03-11 Thread Mandy Chung
On Sun, 10 Mar 2024 13:47:06 GMT, Eirik Bjørsnøs wrote: >> Please review this PR which removes the 19 deprecated `xxObject*` alias >> methods from `jdk.internal.misc.Unsafe`. >> >> These methods were added in JDK-8213043 (JDK 12), presumably to allow >> `jsr166.jar` to be used across JDK

Re: RFR: 8311302: Allow for jlinking a custom runtime without packaged modules being present [v12]

2024-03-08 Thread Mandy Chung
On Fri, 8 Mar 2024 17:19:41 GMT, Severin Gehwolf wrote: >> I tried out the latest commit (a797ea69). >> >> The output "The default module path, '$java.home/jmods' not present. Use >> --verbose to show the full list of plugin options applied" is bit confusing >> as it looks like jlink failed

Re: RFR: 8311302: Allow for jlinking a custom runtime without packaged modules being present [v18]

2024-03-08 Thread Mandy Chung
On Tue, 27 Feb 2024 15:23:09 GMT, Severin Gehwolf wrote: >> Please review this patch which adds a jlink mode to the JDK which doesn't >> need the packaged modules being present. A.k.a run-time image based jlink. >> Fundamentally this patch adds an option to use `jlink` even though your JDK >>

Re: RFR: 8327218: Add an ability to specify modules which should have native access enabled [v2]

2024-03-06 Thread Mandy Chung
On Wed, 6 Mar 2024 19:00:19 GMT, Alan Bateman wrote: >> Native access is needed for modules which calls restricted methods [1]. >> AFAICT, java.base, java.desktop and jdk.incubator.vector use >> java.lang.foreign but I don't know if they call restricted methods or not. >> >>

Re: RFR: 8327218: Add an ability to specify modules which should have native access enabled [v2]

2024-03-06 Thread Mandy Chung
On Wed, 6 Mar 2024 15:02:07 GMT, Jan Lahoda wrote: >>> Many of these modules do not need native access in the current >>> implementation. >> >> In addition this will eventually need jlink support. I view the change to >> ModuleBootstrap initialiser to use ModuleLoaderMap.nativeAccessModules()

Re: RFD: Can we remove the deprecated internal Unsafe *Object* methods?

2024-03-05 Thread mandy . chung
These deprecated methods were added to make jsr166.jar to run on different JDK releases.  I think it's time to remove these deprecated xxxObject* methods as the renames have been done since JDK 12 for 5 years.   I added a comment [1] to confirm with Doug and Martin. Mandy

Re: RFR: 8327218: Add an ability to specify modules which should have native access enabled [v2]

2024-03-05 Thread Mandy Chung
On Tue, 5 Mar 2024 18:43:44 GMT, Alan Bateman wrote: >> Jan Lahoda has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Apply suggestions from code review >> >> Co-authored-by: ExE Boss <3889017+exe-b...@users.noreply.github.com> >>

Re: CFV: New Core Libraries Group Member: Raffaello Giulietti

2024-02-13 Thread mandy . chung
Vote: yes Mandy On 2/13/24 12:25 PM, Brian Burkhalter wrote: I hereby nominate Raffaello Giulietti to Membership in the Core Libraries Group.

Re: RFR: JDK-8322218: Better escaping of single and double quotes in annotation toString() results

2024-02-06 Thread Mandy Chung
On Thu, 1 Feb 2024 01:32:42 GMT, Joe Darcy wrote: > A double quote character doesn't need to be escaped when it is a char literal > and single quote character doesn't need to be escaped when it is in a string. > This change updates the toString() output of annotations to account for the >

Re: RFR: 8321703: jdeps generates illegal dot file containing nodesep=0,500000

2024-02-06 Thread Mandy Chung
On Mon, 5 Feb 2024 20:11:43 GMT, Mandy Chung wrote: > Trivial fix. Call `PrintWriter::format` with null `Locale` to format with no > localization. > > This PR also fixes JDK-8325262 to print `FindException` message without the > stack trace to indicate clearer that the gi

Integrated: 8321703: jdeps generates illegal dot file containing nodesep=0,500000

2024-02-06 Thread Mandy Chung
On Mon, 5 Feb 2024 20:11:43 GMT, Mandy Chung wrote: > Trivial fix. Call `PrintWriter::format` with null `Locale` to format with no > localization. > > This PR also fixes JDK-8325262 to print `FindException` message without the > stack trace to indicate clearer that the gi

RFR: 8321703: jdeps generates illegal dot file containing nodesep=0,500000

2024-02-05 Thread Mandy Chung
Trivial fix. Call `PrintWriter::format` with null `Locale` to format with no localization. This PR also fixes JDK-8325262 to print `FindException` message without the stack trace to indicate clearer that the given module path is incorrect. - Commit messages: - update copyright

Re: RFR: 8323835: Updating ASM to 9.6 for JDK 23

2024-01-25 Thread Mandy Chung
On Tue, 16 Jan 2024 21:18:55 GMT, Vicente Romero wrote: > Updating ASM to version 9.6, > > Thanks in advance for the reviews, > Vicente Looks okay to me. I would rely on your testing for verification. - Marked as reviewed by mchung (Reviewer). PR Review:

Re: RFR: 8323835: Updating ASM to 9.6 for JDK 23

2024-01-22 Thread Mandy Chung
On Tue, 16 Jan 2024 21:18:55 GMT, Vicente Romero wrote: > Updating ASM to version 9.6, > > Thanks in advance for the reviews, > Vicente The change looks okay to me. Most of the changes are doc change. I see many files are updated just to remove the empty line at the end of the file - is

Integrated: 8159927: Add a test to verify JMOD files created in the images do not have debug symbols

2024-01-19 Thread Mandy Chung
On Wed, 17 Jan 2024 20:51:23 GMT, Mandy Chung wrote: > The build excludes the native debug symbols in JMOD files created for JDK > modules (see make/CreateJmods.gmk). This PR adds a test to verify that > native debug symbols are excluded as expected. This pull request has

Re: RFR: 8311302: Allow for jlinking a custom runtime without packaged modules being present [v13]

2024-01-18 Thread Mandy Chung
On Mon, 11 Dec 2023 16:37:38 GMT, Severin Gehwolf wrote: >> Please review this patch which adds a jlink mode to the JDK which doesn't >> need the packaged modules being present. A.k.a run-time image based jlink. >> Fundamentally this patch adds an option to use `jlink` even though your JDK >>

Re: RFR: 8311302: Allow for jlinking a custom runtime without packaged modules being present [v13]

2024-01-18 Thread Mandy Chung
On Mon, 11 Dec 2023 16:37:38 GMT, Severin Gehwolf wrote: >> Please review this patch which adds a jlink mode to the JDK which doesn't >> need the packaged modules being present. A.k.a run-time image based jlink. >> Fundamentally this patch adds an option to use `jlink` even though your JDK >>

Re: RFR: 8311302: Allow for jlinking a custom runtime without packaged modules being present [v13]

2024-01-18 Thread Mandy Chung
On Thu, 18 Jan 2024 13:37:12 GMT, Severin Gehwolf wrote: > > If I read the code correctly, the image created with this option will > > enable multi-hops unconditionally? i.e. no timestamp file created and > > disable the check completely. I think the .stamp file should be present in > > any

RFR: 8159927: Add a test to verify JMOD files created in the images do not have debug symbols

2024-01-17 Thread Mandy Chung
The build excludes the native debug symbols in JMOD files created for JDK modules (see make/CreateJmods.gmk). This PR adds a test to verify that native debug symbols are excluded as expected. - Commit messages: - 8159927: Add a test to verify JMOD files created in the images do

Re: RFR: 8323794: Remove unused jimage compressor plugin configuration [v3]

2024-01-16 Thread Mandy Chung
On Tue, 16 Jan 2024 18:42:59 GMT, Claes Redestad wrote: >> There's an unused concept of a pluginConfig that is passed into the jlink >> compress plugins, however we always pass null here and the code seems broken >> (the pluginConfig wouldn't have been stored properly). This seem to be a >>

Re: RFR: 8323794: Remove unused jimage compressor plugin configuration [v2]

2024-01-16 Thread Mandy Chung
On Tue, 16 Jan 2024 18:03:34 GMT, Claes Redestad wrote: >> There's an unused concept of a pluginConfig that is passed into the jlink >> compress plugins, however we always pass null here and the code seems broken >> (the pluginConfig wouldn't have been stored properly). This seem to be a >>

Re: RFR: 8321620: Optimize JImage decompressors

2024-01-12 Thread Mandy Chung
On Fri, 12 Jan 2024 18:45:39 GMT, Glavo wrote: > I generated runtime images using `jlink --compress 2 --add-modules > java.se,jdk.unsupported,jdk.management` and then ran the following JMH > benchmark: > > > @Warmup(iterations = 10, time = 2) > @Measurement(iterations = 5, time = 3) >

Re: RFR: 8321620: Optimize JImage decompressors

2024-01-12 Thread Mandy Chung
On Wed, 8 Nov 2023 11:55:22 GMT, Glavo wrote: > This PR significantly speeds up decompressing resources in Jimage while > significantly reducing temporary memory allocations in the process. > > This will improve startup speed for runtime images generated using `jlink > --compress 1` and

[jdk22] Integrated: 8323547: tools/jlink/plugins/SystemModuleDescriptors/ModuleMainClassTest.java fails to compile

2024-01-10 Thread Mandy Chung
On Wed, 10 Jan 2024 20:43:19 GMT, Mandy Chung wrote: > `jdk.test.lib.process.ProcessTools::executeTools` was modified to throw > Exception by JDK-8322920 that has only been in the main line. It's a > mistake to backport JDK-8322809 without catching this. Trivial fix

[jdk22] RFR: 8323547: tools/jlink/plugins/SystemModuleDescriptors/ModuleMainClassTest.java fails to compile

2024-01-10 Thread Mandy Chung
`jdk.test.lib.process.ProcessTools::executeTools` was modified to throw Exception by JDK-8322920 that has only been in the main line. It's a mistake to backport JDK-8322809 without catching this. Trivial fix - update the signature to throw Throwable instead. - Commit messages:

[jdk22] Integrated: 8322809: SystemModulesMap::classNames and moduleNames arrays do not match the order

2024-01-10 Thread Mandy Chung
On Tue, 9 Jan 2024 22:16:59 GMT, Mandy Chung wrote: > This pull request contains a backport of commit > [f3be138e](https://github.com/openjdk/jdk/commit/f3be138eb80c9e7f6cc21afb75cda9e49b667c8a) > from the [openjdk/jdk](https://git.openjdk.org/jdk) repository. > > The commit b

  1   2   3   4   5   6   7   8   9   >