8181823: [AOT] jaotc doesn't work with Graal

Add new flag to indicate when to calculate class fingerprint

Reviewed-by: iklam, iveresov
This commit is contained in:
Vladimir Kozlov 2017-06-21 10:28:27 -07:00
parent 8041519b2e
commit dd676c3a98
4 changed files with 6 additions and 1 deletions

View File

@ -39,6 +39,7 @@ module jdk.internal.vm.compiler {
uses org.graalvm.compiler.debug.TTYStreamProvider;
uses org.graalvm.compiler.hotspot.CompilerConfigurationFactory;
uses org.graalvm.compiler.hotspot.HotSpotBackendFactory;
uses org.graalvm.compiler.hotspot.HotSpotCodeCacheListener;
uses org.graalvm.compiler.options.OptionValuesAccess;
uses org.graalvm.compiler.nodes.graphbuilderconf.NodeIntrinsicPluginFactory;

View File

@ -1954,7 +1954,7 @@ bool InstanceKlass::supers_have_passed_fingerprint_checks() {
bool InstanceKlass::should_store_fingerprint() {
#if INCLUDE_AOT
// We store the fingerprint into the InstanceKlass only in the following 2 cases:
if (EnableJVMCI && !UseJVMCICompiler) {
if (CalculateClassFingerprint) {
// (1) We are running AOT to generate a shared library.
return true;
}

View File

@ -3387,6 +3387,9 @@ public:
diagnostic(bool, UseAOTStrictLoading, false, \
"Exit the VM if any of the AOT libraries has invalid config") \
\
product(bool, CalculateClassFingerprint, false, \
"Calculate class fingerprint") \
\
/* interpreter debugging */ \
develop(intx, BinarySwitchThreshold, 5, \
"Minimal number of lookupswitch entries for rewriting to binary " \

View File

@ -437,6 +437,7 @@ void before_exit(JavaThread* thread) {
Thread* THREAD = thread;
JVMCIRuntime::shutdown(THREAD);
if (HAS_PENDING_EXCEPTION) {
HandleMark hm(THREAD);
Handle exception(THREAD, PENDING_EXCEPTION);
CLEAR_PENDING_EXCEPTION;
java_lang_Throwable::java_printStackTrace(exception, THREAD);