changeset 44320:27047c8fa964

8176573: Do not use FLAG_SET_ERGO to update MaxRAM for emulated client Summary: used FLAG_SET_DEFAULT to update MaxRAM Reviewed-by: kvn
author jcm
date Mon, 13 Mar 2017 23:36:14 -0700
parents 8c42183dbd04
children 1b3fc837aa31
files hotspot/src/share/vm/compiler/compilerDefinitions.cpp
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/hotspot/src/share/vm/compiler/compilerDefinitions.cpp	Mon Mar 13 21:46:37 2017 -0400
+++ b/hotspot/src/share/vm/compiler/compilerDefinitions.cpp	Mon Mar 13 23:36:14 2017 -0700
@@ -100,7 +100,9 @@
     FLAG_SET_ERGO(size_t, MetaspaceSize, 12*M);
   }
   if (FLAG_IS_DEFAULT(MaxRAM)) {
-    FLAG_SET_ERGO(uint64_t, MaxRAM, 1ULL*G);
+    // Do not use FLAG_SET_ERGO to update MaxRAM, as this will impact
+    // heap setting done based on available phys_mem (see Arguments::set_heap_size).
+    FLAG_SET_DEFAULT(MaxRAM, 1ULL*G);
   }
   if (FLAG_IS_DEFAULT(CompileThreshold)) {
     FLAG_SET_ERGO(intx, CompileThreshold, 1500);