diff src/share/vm/runtime/arguments.cpp @ 20345:f933a15469d4

8055006: Store original value of Min/MaxHeapFreeRatio Summary: Store the value set by the user and some makefile changes required to change the flags. Reviewed-by: sla, mchung, bchristi, jmasa, dholmes
author jwilhelm
date Mon, 28 Jul 2014 22:43:08 +0200
parents ee019285a52c
children 3374ec4c4448
line wrap: on
line diff
--- a/src/share/vm/runtime/arguments.cpp	Wed Jun 04 10:01:28 2014 +0200
+++ b/src/share/vm/runtime/arguments.cpp	Mon Jul 28 22:43:08 2014 +0200
@@ -98,6 +98,8 @@
 bool   Arguments::_has_profile                  = false;
 size_t Arguments::_conservative_max_heap_alignment = 0;
 uintx  Arguments::_min_heap_size                = 0;
+uintx  Arguments::_min_heap_free_ratio          = 0;
+uintx  Arguments::_max_heap_free_ratio          = 0;
 Arguments::Mode Arguments::_mode                = _mixed;
 bool   Arguments::_java_compiler                = false;
 bool   Arguments::_xdebug_mode                  = false;
@@ -1596,9 +1598,11 @@
     // unless the user actually sets these flags.
     if (FLAG_IS_DEFAULT(MinHeapFreeRatio)) {
       FLAG_SET_DEFAULT(MinHeapFreeRatio, 0);
+      _min_heap_free_ratio = MinHeapFreeRatio;
     }
     if (FLAG_IS_DEFAULT(MaxHeapFreeRatio)) {
       FLAG_SET_DEFAULT(MaxHeapFreeRatio, 100);
+      _max_heap_free_ratio = MaxHeapFreeRatio;
     }
   }
 
@@ -1973,6 +1977,8 @@
                   MaxHeapFreeRatio);
     return false;
   }
+  // This does not set the flag itself, but stores the value in a safe place for later usage.
+  _min_heap_free_ratio = min_heap_free_ratio;
   return true;
 }
 
@@ -1987,6 +1993,8 @@
                   MinHeapFreeRatio);
     return false;
   }
+  // This does not set the flag itself, but stores the value in a safe place for later usage.
+  _max_heap_free_ratio = max_heap_free_ratio;
   return true;
 }