changeset 12552:0b7902758a32

8172054: Aot tests should include Java assertions into AOT compiled code Reviewed-by: iveresov
author kvn
date Wed, 04 Jan 2017 11:44:26 -0800
parents c743d0025694
children f99f3a34981a
files src/share/vm/aot/aotCodeHeap.cpp test/compiler/aot/AotCompiler.java test/compiler/aot/cli/jaotc/JaotcTestHelper.java
diffstat 3 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/aot/aotCodeHeap.cpp	Wed Jan 04 10:57:26 2017 -0500
+++ b/src/share/vm/aot/aotCodeHeap.cpp	Wed Jan 04 11:44:26 2017 -0800
@@ -710,7 +710,7 @@
   }
 
   if (_lib->config()->_omitAssertions && JavaAssertions::enabled(kh->name()->as_C_string(), kh->class_loader() == NULL)) {
-    // Assertions are omitted in the compiled code, but are enabled right now. Bail out.
+    log_trace(aot, class, load)("class  %s  in  %s does not have java assertions in compiled code, but assertions are enabled for this execution.", kh->internal_name(), _lib->name());
     sweep_dependent_methods(klass_data);
     return false;
   }
--- a/test/compiler/aot/AotCompiler.java	Wed Jan 04 10:57:26 2017 -0500
+++ b/test/compiler/aot/AotCompiler.java	Wed Jan 04 11:44:26 2017 -0800
@@ -93,6 +93,7 @@
             }
         }
         List<String> args = new ArrayList<>();
+        args.add("--compile-with-assertions");
         args.add("--output");
         args.add(libName);
         if (file != null) {
--- a/test/compiler/aot/cli/jaotc/JaotcTestHelper.java	Wed Jan 04 10:57:26 2017 -0500
+++ b/test/compiler/aot/cli/jaotc/JaotcTestHelper.java	Wed Jan 04 11:44:26 2017 -0800
@@ -44,6 +44,7 @@
         for (String vmOpt : Utils.getTestJavaOpts()) {
             launcher.addVMArg(vmOpt);
         }
+        launcher.addToolArg("--compile-with-assertions");
         for (String arg : args) {
             launcher.addToolArg(arg);
         }