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
--- 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()) {