changeset 13588:488f0d311b80 mvt

8187820: [MVT] Build failures on 32-bit x86
author thartmann
date Fri, 22 Sep 2017 13:51:12 +0200
parents a72b048d682d
children 06b85e94a022
files src/share/vm/memory/vtBuffer.cpp src/share/vm/runtime/arguments.cpp src/share/vm/runtime/globals.hpp src/share/vm/runtime/thread.cpp
diffstat 4 files changed, 26 insertions(+), 17 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/memory/vtBuffer.cpp	Fri Sep 22 08:08:42 2017 +0200
+++ b/src/share/vm/memory/vtBuffer.cpp	Fri Sep 22 13:51:12 2017 +0200
@@ -435,20 +435,20 @@
   if (ReportVTBufferRecyclingTimes) {
     end = Ticks::now();
     ResourceMark rm(thread);
-    tty->print_cr("VTBufferRecyling: %s : %s.%s %s : %ldus",
+    tty->print_cr("VTBufferRecyling: %s : %s.%s %s : " JLONG_FORMAT "us",
         thread->name(),
         f->interpreter_frame_method()->klass_name()->as_C_string(),
         f->interpreter_frame_method()->name()->as_C_string(),
         f->interpreter_frame_method()->signature()->as_C_string(),
         (end.value() - begin.value()) / 1000);
-    tty->print("Step1 : %6ldns ", step1.value() - begin.value());
-    tty->print("Step2 : %6ldns ", step2.value() - step1.value());
-    tty->print("Step3 : %6ldns ", step3.value() - step2.value());
-    tty->print("Step4 : %6ldns ", step4.value() - step3.value());
-    tty->print("Step5 : %6ldns ", step5.value() - step4.value());
-    tty->print("Step6 : %6ldns ", step6.value() - step5.value());
-    tty->print("Step7 : %6ldns ", step7.value() - step6.value());
-    tty->print("Step8 : %6ldns ", end.value() - step7.value());
+    tty->print("Step1 : " JLONG_FORMAT "ns ", step1.value() - begin.value());
+    tty->print("Step2 : " JLONG_FORMAT "ns ", step2.value() - step1.value());
+    tty->print("Step3 : " JLONG_FORMAT "ns ", step3.value() - step2.value());
+    tty->print("Step4 : " JLONG_FORMAT "ns ", step4.value() - step3.value());
+    tty->print("Step5 : " JLONG_FORMAT "ns ", step5.value() - step4.value());
+    tty->print("Step6 : " JLONG_FORMAT "ns ", step6.value() - step5.value());
+    tty->print("Step7 : " JLONG_FORMAT "ns ", step7.value() - step6.value());
+    tty->print("Step8 : " JLONG_FORMAT "ns ", end.value() - step7.value());
     tty->print_cr("Returned chunks: %d", returned_chunks);
   }
 }
--- a/src/share/vm/runtime/arguments.cpp	Fri Sep 22 08:08:42 2017 +0200
+++ b/src/share/vm/runtime/arguments.cpp	Fri Sep 22 13:51:12 2017 +0200
@@ -2530,12 +2530,15 @@
     warning("ValueTypeReturnedAsFields is not supported on this platform");
   }
 
-  if (FLAG_IS_DEFAULT(TieredCompilation)) {
+  if (EnableMVT || EnableValhalla) {
     // C1 has no support for value types
-    TieredCompilation = false;
-  }
-
-  if(EnableMVT && EnableValhalla) {
+    if (!FLAG_IS_DEFAULT(TieredCompilation)) {
+      warning("TieredCompilation disabled because value types are not supported by C1");
+    }
+    FLAG_SET_CMDLINE(bool, TieredCompilation, false);
+  }
+
+  if (EnableMVT && EnableValhalla) {
     jio_fprintf(defaultStream::error_stream(),
         "Conflicting combination in option list: EnableMVT and EnableValhalla cannot be both enabled at the same time");
   }
@@ -4615,6 +4618,12 @@
     FLAG_SET_DEFAULT(UseLoopCounter, true);
   }
 
+  if ((!EnableMVT && !EnableValhalla) || is_interpreter_only()) {
+    // Disable calling convention optimizations if value types are not supported
+    ValueTypePassFieldsAsArgs = false;
+    ValueTypeReturnedAsFields = false;
+  }
+
 #ifndef PRODUCT
   if (!LogVMOutput && FLAG_IS_DEFAULT(LogVMOutput)) {
     if (use_vm_log()) {
--- a/src/share/vm/runtime/globals.hpp	Fri Sep 22 08:08:42 2017 +0200
+++ b/src/share/vm/runtime/globals.hpp	Fri Sep 22 13:51:12 2017 +0200
@@ -4090,10 +4090,10 @@
   product(bool, EnableMVT, false,                                           \
           "Enable experimental Minimal Value Types")                        \
                                                                             \
-  develop_pd(bool, ValueTypePassFieldsAsArgs,                               \
+  product_pd(bool, ValueTypePassFieldsAsArgs,                               \
              "Pass each value type field as an argument at calls")          \
                                                                             \
-  develop_pd(bool, ValueTypeReturnedAsFields,                               \
+  product_pd(bool, ValueTypeReturnedAsFields,                               \
             "return fields instead of a value type reference")              \
                                                                             \
   product(size_t, BigValueTypeThreshold, 4 * BytesPerLong,                  \
--- a/src/share/vm/runtime/thread.cpp	Fri Sep 22 08:08:42 2017 +0200
+++ b/src/share/vm/runtime/thread.cpp	Fri Sep 22 13:51:12 2017 +0200
@@ -862,7 +862,7 @@
   st->print_cr("\tMax chunks          : %d", vtchunk_max());
   st->print_cr("\tReturned chunks     : %d", vtchunk_total_returned());
   st->print_cr("\tFailed chunk allocs : %d", vtchunk_total_failed());
-  st->print_cr("\tMemory buffered     : %ld", vtchunk_total_memory_buffered());
+  st->print_cr("\tMemory buffered     : " JLONG_FORMAT, vtchunk_total_memory_buffered());
   st->print_cr("");
 }