diff src/share/vm/runtime/arguments.cpp @ 46:8b6e49187640

Merge
author rasbold
date Thu, 13 Mar 2008 05:40:44 -0700
parents 183f41cf8bfe ff5961f4c095
children cd0742ba123c 99269dbf4ba8
line wrap: on
line diff
--- a/src/share/vm/runtime/arguments.cpp	Tue Mar 11 14:19:53 2008 -0700
+++ b/src/share/vm/runtime/arguments.cpp	Thu Mar 13 05:40:44 2008 -0700
@@ -1262,6 +1262,22 @@
 
 // Aggressive optimization flags  -XX:+AggressiveOpts
 void Arguments::set_aggressive_opts_flags() {
+#ifdef COMPILER2
+  if (AggressiveOpts || !FLAG_IS_DEFAULT(AutoBoxCacheMax)) {
+    if (FLAG_IS_DEFAULT(EliminateAutoBox)) {
+      FLAG_SET_DEFAULT(EliminateAutoBox, true);
+    }
+    if (FLAG_IS_DEFAULT(AutoBoxCacheMax)) {
+      FLAG_SET_DEFAULT(AutoBoxCacheMax, 20000);
+    }
+
+    // Feed the cache size setting into the JDK
+    char buffer[1024];
+    sprintf(buffer, "java.lang.Integer.IntegerCache.high=%d", AutoBoxCacheMax);
+    add_property(buffer);
+  }
+#endif
+
   if (AggressiveOpts) {
 NOT_WINDOWS(
     // No measured benefit on Windows