RFR(S): 8232980: Cleanup initialization of function pointers into java.base from classloader.cpp

Calvin Cheung calvin.cheung at oracle.com
Fri Oct 25 16:07:05 UTC 2019

Hi Christoph,

Thanks for doing this cleanup.

I noticed that the following function is not being used. I could build 
hotspot on linux successfully without the function.

1050 jboolean ClassLoader::decompress(void *in, u8 inSize, void *out, u8 
outSize, char **pmsg) {
1051   return (*ZipInflateFully)(in, inSize, out, outSize, pmsg);
1052 }

The setting up of ZipInflateFully could also be removed.



On 10/24/19 8:41 AM, Langer, Christoph wrote:
> Hi,
> please help reviewing a cleanup patch to classLoader.cpp.
> The methods load_zip_library() and load_jimage_library() can be cleaned up a little bit. In my patch, I also extracted the initialization of the one symbol coming from libjava to a new method load_java_library(). However, I'm not fully sure on whether it would be nicer to have all these 3 methods consolidated into one. What do you think?
> In my patch I check for all needed symbols since it's all coming from the JDK and we can assume consistency. Should there be a problem in resolving some symbol, then VM initialization should fail.
> Furthermore, I'm wondering, whether to use guarantee or vm_exit_during_initialization for the NULL checks of the resolved symbols. Currently we have both but I think we should use one consistent approach. I  think vm_exit_during_initialization would be the best fit. Opinions?
> Bug: https://bugs.openjdk.java.net/browse/JDK-8232980
> Webrev: http://cr.openjdk.java.net/~clanger/webrevs/8232980.0/
> Thanks
> Christoph

More information about the hotspot-runtime-dev mailing list