8072428: Enable UseLoopCounter ergonomically if on-stack-replacement is enabled
authorzmajo
Mon, 18 Apr 2016 09:39:55 +0200
changeset 38044 a2a381c8b429
parent 38043 6d3cae25efbb
child 38045 808cbf1958ce
8072428: Enable UseLoopCounter ergonomically if on-stack-replacement is enabled Summary: Set UseLoopCounter ergonomically if on-stack-replacement is enabled. Print warning. Reviewed-by: kvn
hotspot/src/share/vm/runtime/arguments.cpp
--- a/hotspot/src/share/vm/runtime/arguments.cpp	Thu Apr 07 12:33:58 2016 +0200
+++ b/hotspot/src/share/vm/runtime/arguments.cpp	Mon Apr 18 09:39:55 2016 +0200
@@ -4514,6 +4514,11 @@
     warning("Setting CompressedClassSpaceSize has no effect when compressed class pointers are not used");
   }
 
+  if (UseOnStackReplacement && !UseLoopCounter) {
+    warning("On-stack-replacement requires loop counters; enabling loop counters");
+    FLAG_SET_DEFAULT(UseLoopCounter, true);
+  }
+
 #ifndef PRODUCT
   if (!LogVMOutput && FLAG_IS_DEFAULT(LogVMOutput)) {
     if (use_vm_log()) {