Re: Review Request JDK-8240975: Extend NativeLibraries to support explicit unloading

2020-03-20 Thread Alan Bateman
On 20/03/2020 16:17, Mandy Chung wrote: : I like these shorter names. Updated webrev.02 in place. Looks good.

Re: Review Request JDK-8240975: Extend NativeLibraries to support explicit unloading

2020-03-20 Thread Maurizio Cimadamore
Looks good! Thanks! Maurizio On 20/03/2020 16:17, Mandy Chung wrote: On 3/20/20 6:51 AM, Alan Bateman wrote: On 20/03/2020 03:43, Mandy Chung wrote: Alan, Maurizio, New webrev: http://cr.openjdk.java.net/~mchung/jdk15/webrevs/8240975/webrev.02/ newJavaNativeInterfaceLibraries  creates a

Re: Review Request JDK-8240975: Extend NativeLibraries to support explicit unloading

2020-03-20 Thread Mandy Chung
On 3/20/20 6:51 AM, Alan Bateman wrote: On 20/03/2020 03:43, Mandy Chung wrote: Alan, Maurizio, New webrev: http://cr.openjdk.java.net/~mchung/jdk15/webrevs/8240975/webrev.02/ newJavaNativeInterfaceLibraries  creates a NativeLIbraries for loading JNI native libraries.   - native

Re: Review Request JDK-8240975: Extend NativeLibraries to support explicit unloading

2020-03-20 Thread Alan Bateman
On 20/03/2020 03:43, Mandy Chung wrote: Alan, Maurizio, New webrev: http://cr.openjdk.java.net/~mchung/jdk15/webrevs/8240975/webrev.02/ newJavaNativeInterfaceLibraries  creates a NativeLIbraries for loading JNI native libraries.   - native libraries are unloaded when the class loader is

Re: Review Request JDK-8240975: Extend NativeLibraries to support explicit unloading

2020-03-19 Thread Mandy Chung
Alan, Maurizio, New webrev: http://cr.openjdk.java.net/~mchung/jdk15/webrevs/8240975/webrev.02/ newJavaNativeInterfaceLibraries  creates a NativeLIbraries for loading JNI native libraries.   - native libraries are unloaded when the class loader is reclaimed.   - Support of linking of native

Re: Review Request JDK-8240975: Extend NativeLibraries to support explicit unloading

2020-03-18 Thread Mandy Chung
On 3/18/20 12:13 PM, Maurizio Cimadamore wrote: On 18/03/2020 18:40, Mandy Chung wrote: On 3/18/20 11:16 AM, Maurizio Cimadamore wrote: So, maybe I'm saying something naive, but isn't the difference between the two mechanisms mostly there to distinguish between JNI libraries and non-JNI

Re: Review Request JDK-8240975: Extend NativeLibraries to support explicit unloading

2020-03-18 Thread Maurizio Cimadamore
On 18/03/2020 18:40, Mandy Chung wrote: On 3/18/20 11:16 AM, Maurizio Cimadamore wrote: So, maybe I'm saying something naive, but isn't the difference between the two mechanisms mostly there to distinguish between JNI libraries and non-JNI libraries? I think such distinction is kind of

Re: Review Request JDK-8240975: Extend NativeLibraries to support explicit unloading

2020-03-18 Thread Mandy Chung
On 3/18/20 11:16 AM, Maurizio Cimadamore wrote: So, maybe I'm saying something naive, but isn't the difference between the two mechanisms mostly there to distinguish between JNI libraries and non-JNI libraries? I think such distinction is kind of blurry at the moment.   One thing for

Re: Review Request JDK-8240975: Extend NativeLibraries to support explicit unloading

2020-03-18 Thread Maurizio Cimadamore
So, maybe I'm saying something naive, but isn't the difference between the two mechanisms mostly there to distinguish between JNI libraries and non-JNI libraries? E.g. maybe we should add JNI somewhere in one of the factory (the one used by System.loadLibrary) and then document what are the

Re: Review Request JDK-8240975: Extend NativeLibraries to support explicit unloading

2020-03-18 Thread Mandy Chung
On 3/18/20 8:59 AM, Alan Bateman wrote: On 17/03/2020 23:09, Mandy Chung wrote: I have similar comment to myself and didn't come up good static factory method names.   I give it a try again: what about newNativeLibraries and newNativeLibrariesWithNoAutoUnload? Would

Re: Review Request JDK-8240975: Extend NativeLibraries to support explicit unloading

2020-03-18 Thread Alan Bateman
On 17/03/2020 23:09, Mandy Chung wrote: I have similar comment to myself and didn't come up good static factory method names.   I give it a try again: what about newNativeLibraries and newNativeLibrariesWithNoAutoUnload? Would newTrustedNativeLibraries work? Everything else in the updated

Re: Review Request JDK-8240975: Extend NativeLibraries to support explicit unloading

2020-03-17 Thread Mandy Chung
Hi Alan, Thanks for the comment.  See my comments inlined below. Here is the updated webrev:   http://cr.openjdk.java.net/~mchung/jdk15/webrevs/8240975/webrev.01 On 3/16/20 3:47 AM, Alan Bateman wrote: The difference between the 2 constructors might not be obvious at the use sites. I'm just

Re: Review Request JDK-8240975: Extend NativeLibraries to support explicit unloading

2020-03-16 Thread Alan Bateman
On 13/03/2020 18:16, Mandy Chung wrote: Webrev: http://cr.openjdk.java.net/~mchung/jdk15/webrevs/8240975/webrev.00/ This is a follow-up task for Panama to allow explicit unloading of native library after JDK-8228336.  `NativeLibraries` associated with a class loader has the capability to auto

Review Request JDK-8240975: Extend NativeLibraries to support explicit unloading

2020-03-13 Thread Mandy Chung
Webrev: http://cr.openjdk.java.net/~mchung/jdk15/webrevs/8240975/webrev.00/ This is a follow-up task for Panama to allow explicit unloading of native library after JDK-8228336.  `NativeLibraries` associated with a class loader has the capability to auto unload native libraries when the class