Re: RFR: 8349284: Make libExplicitAttach work on static JDK [v5]

2025-02-10 Thread Alan Bateman
On Mon, 10 Feb 2025 17:41:55 GMT, Jiangli Zhou wrote: >> This is similar to https://github.com/openjdk/jdk/pull/23431 change. It >> removes libjvm.so as a recorded dependency for libExplicitAttach.so by not >> explicitly link libExplicitAttach.so with libjvm.so at build time. To do >> that, it

Re: RFR: 8349284: Make libExplicitAttach work on static JDK [v4]

2025-02-10 Thread Jiangli Zhou
On Mon, 10 Feb 2025 04:00:44 GMT, Jiangli Zhou wrote: >> This is similar to https://github.com/openjdk/jdk/pull/23431 change. It >> removes libjvm.so as a recorded dependency for libExplicitAttach.so by not >> explicitly link libExplicitAttach.so with libjvm.so at build time. To do >> that, it

Re: RFR: 8349284: Make libExplicitAttach work on static JDK [v5]

2025-02-10 Thread Jiangli Zhou
> This is similar to https://github.com/openjdk/jdk/pull/23431 change. It > removes libjvm.so as a recorded dependency for libExplicitAttach.so by not > explicitly link libExplicitAttach.so with libjvm.so at build time. To do > that, it also changes libExplicitAttach.c to dynamically lookup the

Re: RFR: 8349284: Make libExplicitAttach work on static JDK [v4]

2025-02-10 Thread Jiangli Zhou
On Mon, 10 Feb 2025 07:26:00 GMT, Alan Bateman wrote: > Can you bump the copyright header date on libExplicitAttach.c before you > integrate. Done. @AlanBateman @dholmes-ora Thanks for the review! - PR Comment: https://git.openjdk.org/jdk/pull/23500#issuecomment-2648775523

Re: RFR: 8349284: Make libExplicitAttach work on static JDK [v4]

2025-02-10 Thread David Holmes
On Mon, 10 Feb 2025 04:00:44 GMT, Jiangli Zhou wrote: >> This is similar to https://github.com/openjdk/jdk/pull/23431 change. It >> removes libjvm.so as a recorded dependency for libExplicitAttach.so by not >> explicitly link libExplicitAttach.so with libjvm.so at build time. To do >> that, it

Re: RFR: 8349284: Make libExplicitAttach work on static JDK [v4]

2025-02-09 Thread Alan Bateman
On Mon, 10 Feb 2025 04:00:44 GMT, Jiangli Zhou wrote: >> This is similar to https://github.com/openjdk/jdk/pull/23431 change. It >> removes libjvm.so as a recorded dependency for libExplicitAttach.so by not >> explicitly link libExplicitAttach.so with libjvm.so at build time. To do >> that, it

Re: RFR: 8349284: Make libExplicitAttach work on static JDK

2025-02-09 Thread Alan Bateman
On Fri, 7 Feb 2025 20:10:08 GMT, Jiangli Zhou wrote: > Done, thanks. Moved `JNI_GetCreatedJavaVMs` lookup into JNI_OnLoad. Good, this is much better. - PR Comment: https://git.openjdk.org/jdk/pull/23500#issuecomment-2647141990

Re: RFR: 8349284: Make libExplicitAttach work on static JDK [v3]

2025-02-09 Thread Jiangli Zhou
> This is similar to https://github.com/openjdk/jdk/pull/23431 change. It > removes libjvm.so as a recorded dependency for libExplicitAttach.so by not > explicitly link libExplicitAttach.so with libjvm.so at build time. To do > that, it also changes libExplicitAttach.c to dynamically lookup the

Re: RFR: 8349284: Make libExplicitAttach work on static JDK [v2]

2025-02-09 Thread Jiangli Zhou
On Sat, 8 Feb 2025 09:29:48 GMT, Alan Bateman wrote: > Is the JavaVM param passed to JNI_OnLoad usable in static builds? If so then > this just needs to be saved, no need to use GetCreatedJavaVMs, right? Yes, on static JDK, `JNI_OnLoad`'s `JavaVM *` argument behaves the same as on regular JDK.

Re: RFR: 8349284: Make libExplicitAttach work on static JDK [v2]

2025-02-08 Thread Alan Bateman
On Fri, 7 Feb 2025 20:10:02 GMT, Jiangli Zhou wrote: >> This is similar to https://github.com/openjdk/jdk/pull/23431 change. It >> removes libjvm.so as a recorded dependency for libExplicitAttach.so by not >> explicitly link libExplicitAttach.so with libjvm.so at build time. To do >> that, it

Re: RFR: 8349284: Make libExplicitAttach work on static JDK

2025-02-07 Thread Jiangli Zhou
On Fri, 7 Feb 2025 10:38:37 GMT, Alan Bateman wrote: > Can you look at adding native init method instead? This could be called from > the System.loadLibraray and avoid introduce a side effect of startThreads > initialising GetCreatedJavaVMs. Done, thanks. Moved `JNI_GetCreatedJavaVMs` lookup i

Re: RFR: 8349284: Make libExplicitAttach work on static JDK [v2]

2025-02-07 Thread Jiangli Zhou
> This is similar to https://github.com/openjdk/jdk/pull/23431 change. It > removes libjvm.so as a recorded dependency for libExplicitAttach.so by not > explicitly link libExplicitAttach.so with libjvm.so at build time. To do > that, it also changes libExplicitAttach.c to dynamically lookup the

Re: RFR: 8349284: Make libExplicitAttach work on static JDK

2025-02-07 Thread Alan Bateman
On Thu, 6 Feb 2025 20:14:36 GMT, Jiangli Zhou wrote: > This is similar to https://github.com/openjdk/jdk/pull/23431 change. It > removes libjvm.so as a recorded dependency for libExplicitAttach.so by not > explicitly link libExplicitAttach.so with libjvm.so at build time. To do > that, it also

RFR: 8349284: Make libExplicitAttach work on static JDK

2025-02-06 Thread Jiangli Zhou
This is similar to https://github.com/openjdk/jdk/pull/23431 change. It removes libjvm.so as a recorded dependency for libExplicitAttach.so by not explicitly link libExplicitAttach.so with libjvm.so at build time. To do that, it also changes libExplicitAttach.c to dynamically lookup the JNI_GetC