RFR: 8234185: Cleanup usage of canonicalize function between libjava, hotspot and libinstrument

David Holmes david.holmes at oracle.com
Mon Nov 18 04:00:24 UTC 2019


Hi Christoph,

This all seems fine to me. One clarification:

- /* The appropriate location of getPrefixed() should be io_util_md.c, but
-    java.lang.instrument package has hardwired canonicalize_md.c into their
-    dll, to avoid complicate solution such as including io_util_md.c into
-    that package, as a workaround we put this method here.
-  */

I assume this hardwired usage was removed some time ago?

Thanks,
David

On 15/11/2019 1:37 am, Langer, Christoph wrote:
> Hi,
> 
> please review this cleanup change regarding function "canonicalize" of libjava.
> 
> Bug: https://bugs.openjdk.java.net/browse/JDK-8234185
> Webrev: http://cr.openjdk.java.net/~clanger/webrevs/8234185.0/
> 
> 
> The goal is to cleanup how this function is defined and used. One thing is, that there was an unnecessary wrapper function "Canonicalize" in jni_util.c. It wrapped the call to "canonicalize". We can get rid of this wrapper. Unfortunately, it is not possible to just export "canonicalize" since this will conflict with a method signature from the math library, at least on modern Linuxes. So I decided to call the method JDK_Canonicalize and will correctly define it in jdk_util.h which can be included everywhere.
> 
> 
> 
> Hotspot's classloader.cpp will dynamically resolve this method, so I add a local declaration of the function pointer in there.
> 
> 
> 
> This change shall be predecessor of JDK-8223261, where a review was already started here: https://mail.openjdk.java.net/pipermail/core-libs-dev/2019-November/063398.html
> 
> Thanks
> Christoph
> 


More information about the hotspot-runtime-dev mailing list