changeset 23753:f6de9aff9991

set default options for jvmci
author David Leopoldseder <david.d.leopoldseder@oracle.com>
date Wed, 14 Sep 2016 17:39:25 +0200
parents 3337e5a210b8
children d0008e893639
files src/share/vm/runtime/arguments.cpp src/share/vm/runtime/arguments.hpp
diffstat 2 files changed, 36 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/runtime/arguments.cpp	Thu Sep 08 15:13:28 2016 +0200
+++ b/src/share/vm/runtime/arguments.cpp	Wed Sep 14 17:39:25 2016 +0200
@@ -1582,6 +1582,32 @@
   }
 }
 
+
+#if INCLUDE_JVMCI
+void Arguments::set_jvmci_specific_flags() {
+  if (UseJVMCICompiler) {
+    if (FLAG_IS_DEFAULT(TypeProfileWidth)) {
+      FLAG_SET_DEFAULT(TypeProfileWidth, 8);
+    }
+    if (FLAG_IS_DEFAULT(OnStackReplacePercentage)) {
+      FLAG_SET_DEFAULT(OnStackReplacePercentage, 933);
+    }
+    if (FLAG_IS_DEFAULT(ReservedCodeCacheSize)) {
+      FLAG_SET_DEFAULT(ReservedCodeCacheSize, 64*M);
+    }
+    if (FLAG_IS_DEFAULT(InitialCodeCacheSize)) {
+      FLAG_SET_DEFAULT(InitialCodeCacheSize, 16*M);
+    }
+    if (FLAG_IS_DEFAULT(MetaspaceSize)) {
+      FLAG_SET_DEFAULT(MetaspaceSize, 12*M);
+    }
+    if (FLAG_IS_DEFAULT(NewSizeThreadIncrease)) {
+      FLAG_SET_DEFAULT(NewSizeThreadIncrease, 4*K);
+    }
+  }
+}
+#endif
+
 void Arguments::set_ergonomics_flags() {
   select_gc();
 
@@ -4095,6 +4121,11 @@
   // Set flags based on ergonomics.
   set_ergonomics_flags();
 
+#if INCLUDE_JVMCI
+  // Set flags specific to JVMCI. This is done prior to computing NMethodSweepFraction.
+  set_jvmci_specific_flags();
+#endif
+
   set_shared_spaces_flags();
 
   // Check the GC selections again.
--- a/src/share/vm/runtime/arguments.hpp	Thu Sep 08 15:13:28 2016 +0200
+++ b/src/share/vm/runtime/arguments.hpp	Wed Sep 14 17:39:25 2016 +0200
@@ -457,6 +457,11 @@
   static inline bool gc_selected(); // whether a gc has been selected
   static void select_gc_ergonomically();
 
+
+#if INCLUDE_JVMCI
+  static void set_jvmci_specific_flags();
+#endif
+
   // Verifies that the given value will fit as a MinHeapFreeRatio. If not, an error
   // message is returned in the provided buffer.
   static bool verify_MinHeapFreeRatio(FormatBuffer<80>& err_msg, uintx min_heap_free_ratio);