Merge
authorthartmann
Thu, 21 Apr 2016 09:29:54 +0000
changeset 38056 033ebbb3746e
parent 38054 3a22f46fb514 (current diff)
parent 38055 9dddf9056918 (diff)
child 38057 1eba14626850
child 38129 7adeefaa6d1d
Merge
--- a/hotspot/src/share/vm/code/codeCache.cpp	Thu Apr 21 09:21:48 2016 +0200
+++ b/hotspot/src/share/vm/code/codeCache.cpp	Thu Apr 21 09:29:54 2016 +0000
@@ -336,7 +336,7 @@
   if (!SegmentedCodeCache) {
     // No segmentation: use a single code heap
     return (code_blob_type == CodeBlobType::All);
-  } else if (Arguments::mode() == Arguments::_int) {
+  } else if (Arguments::is_interpreter_only()) {
     // Interpreter only: we don't need any method code heaps
     return (code_blob_type == CodeBlobType::NonNMethod);
   } else if (TieredCompilation && (TieredStopAtLevel > CompLevel_simple)) {
--- a/hotspot/src/share/vm/runtime/arguments.cpp	Thu Apr 21 09:21:48 2016 +0200
+++ b/hotspot/src/share/vm/runtime/arguments.cpp	Thu Apr 21 09:29:54 2016 +0000
@@ -2620,6 +2620,12 @@
     }
     FLAG_SET_CMDLINE(bool, BackgroundCompilation, false);
   }
+  if (UseCompiler && is_interpreter_only()) {
+    if (!FLAG_IS_DEFAULT(UseCompiler)) {
+      warning("UseCompiler disabled due to -Xint.");
+    }
+    FLAG_SET_CMDLINE(bool, UseCompiler, false);
+  }
   return status;
 }
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/test/compiler/arguments/TestUseCompiler.java	Thu Apr 21 09:29:54 2016 +0000
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * @test TestUseCompiler
+ * @bug 8086068
+ * @summary Tests execution with inconsistent UseCompiler flag combination.
+ * @run main/othervm -Xint -XX:+UseCompiler TestUseCompiler
+ * @run main/othervm -XX:+UseCompiler -Xint TestUseCompiler
+ */
+
+public class TestUseCompiler {
+
+    public static void main(String args[]) {
+        System.out.println("Passed");
+    }
+}
+