8216180: [AOT] compiler/intrinsics/bigInteger/TestMulAdd.java crashed with AOT enabled

Reviewed-by: kvn
This commit is contained in:
Igor Ignatyev 2019-01-23 16:36:45 -08:00
parent 5fc5bf4054
commit 01e4948836
5 changed files with 31 additions and 5 deletions

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -93,6 +93,9 @@
#include "services/memTracker.hpp"
#include "utilities/nativeCallStack.hpp"
#endif // INCLUDE_NMT
#if INCLUDE_AOT
#include "aot/aotLoader.hpp"
#endif // INCLUDE_AOT
#ifdef LINUX
#include "osContainer_linux.hpp"
@ -2118,6 +2121,14 @@ WB_ENTRY(jint, WB_ProtectionDomainRemovedCount(JNIEnv* env, jobject o))
return (jint) SystemDictionary::pd_cache_table()->removed_entries_count();
WB_END
WB_ENTRY(jint, WB_AotLibrariesCount(JNIEnv* env, jobject o))
jint result = 0;
#if INCLUDE_AOT
result = (jint) AOTLoader::heaps_count();
#endif
return result;
WB_END
#define CC (char*)
static JNINativeMethod methods[] = {
@ -2350,6 +2361,7 @@ static JNINativeMethod methods[] = {
{CC"disableElfSectionCache", CC"()V", (void*)&WB_DisableElfSectionCache },
{CC"resolvedMethodRemovedCount", CC"()I", (void*)&WB_ResolvedMethodRemovedCount },
{CC"protectionDomainRemovedCount", CC"()I", (void*)&WB_ProtectionDomainRemovedCount },
{CC"aotLibrariesCount", CC"()I", (void*)&WB_AotLibrariesCount },
};

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@ -59,6 +59,7 @@ requires.properties= \
vm.rtm.cpu \
vm.rtm.compiler \
vm.aot \
vm.aot.enabled \
vm.cds \
vm.cds.custom.loaders \
vm.cds.archived.java.heap \

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -25,6 +25,8 @@
* @test
* @bug 8081778
* @summary Add C2 x86 intrinsic for BigInteger::mulAdd() method
* @comment the test disables intrinsics, so it can't be run w/ AOT'ed java.base
* @requires !vm.aot.enabled
*
* @run main/othervm/timeout=600 -XX:-TieredCompilation -Xbatch
* -XX:+IgnoreUnrecognizedVMOptions -XX:+UnlockDiagnosticVMOptions -XX:-UseSquareToLenIntrinsic -XX:-UseMultiplyToLenIntrinsic

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -86,6 +86,7 @@ public class VMProps implements Callable<Map<String, String>> {
map.put("vm.rtm.cpu", vmRTMCPU());
map.put("vm.rtm.compiler", vmRTMCompiler());
map.put("vm.aot", vmAOT());
map.put("vm.aot.enabled", vmAotEnabled());
// vm.cds is true if the VM is compiled with cds support.
map.put("vm.cds", vmCDS());
map.put("vm.cds.custom.loaders", vmCDSForCustomLoaders());
@ -334,6 +335,13 @@ public class VMProps implements Callable<Map<String, String>> {
return "" + Files.exists(jaotc);
}
/*
* @return true if there is at least one loaded AOT'ed library.
*/
protected String vmAotEnabled() {
return "" + (WB.aotLibrariesCount() > 0);
}
/**
* Check for CDS support.
*

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -549,4 +549,7 @@ public class WhiteBox {
// Protection Domain Table
public native int protectionDomainRemovedCount();
// Number of loaded AOT libraries
public native int aotLibrariesCount();
}