RFR (s) 8143269: Refactor code in universe_post_init that sets up methods to upcall

Coleen Phillimore coleen.phillimore at oracle.com
Sat Mar 19 12:57:18 UTC 2016


Summary: Deferred code review cleanups

This was a review comment I had when the StackWalk API was integrated.  
There were too many of this same code pattern in the middle of 
universe_post_init.  The only real change here is that if the method 
isn't found and doesn't have the right linkage because of a mismatch in 
JDK version, we can vm_exit_during_initialization() rather than try to 
return JNI_ERR.  This avoids ugly code to check 
initialize_known_method's boolean result for each call.  We can't throw 
an exception here.  Because of the EXCEPTION_MARK in universe_post_init, 
any exception gets turned into vm_exit_during_initialization anyway.  
But this wouldn't be a user error, so vm_exit_during_initialization 
seemed like the cleanest choice.

Also, I want to get the code to not have to include method names (and 
field names) in vmSymbols.cpp.

I verified that this code won't merge conflict with jigsaw.  There are 
many additional cleanups that can be done here. universe_post_init 
should really be a method belonging to Universe since it sets many 
static fields in Universe, but to avoid merge conflicts, I didn't do that.

Tested with JPRT and colocated tests.

open webrev at http://cr.openjdk.java.net/~coleenp/8143269.01/webrev
bug link https://bugs.openjdk.java.net/browse/JDK-8143269

Thanks,
Coleen


More information about the hotspot-runtime-dev mailing list