changeset 8430:440fd98d0bd1

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
author dbuck
date Thu, 07 Sep 2017 09:17:43 -0400
parents aea833250879
children 8a06805fcf5d
files src/share/vm/runtime/arguments.cpp
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/runtime/arguments.cpp	Thu Aug 31 21:51:52 2017 -0700
+++ b/src/share/vm/runtime/arguments.cpp	Thu Sep 07 09:17:43 2017 -0400
@@ -4156,6 +4156,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 (CompileTheWorld) {
     // Force NmethodSweeper to sweep whole CodeCache each time.