diff mbox

Restrict ReservedCodeCache to 128M

Message ID 1404812123.11399.18.camel@localhost.localdomain
State New
Headers show

Commit Message

Edward Nevill July 8, 2014, 9:35 a.m. UTC
Hi,

The following patch restricts the default code cache to 128M.

I have chosen to only restrict the default code cache size so it can still be overridden with -XX:ReservedCodeCacheSize

Regards,
Ed.

--- CUT HERE ---
# HG changeset patch
# User Edward Nevill edward.nevill@linaro.org
# Date 1404811944 -3600
#      Tue Jul 08 10:32:24 2014 +0100
# Node ID f60e306e9ec6f570bba3bdc4a8b65dd459888092
# Parent  2a489b2bb083062d3356ee6c470aaf4d2d0a481d
Restrict default ReservedCodeCacheSize to 128M

Comments

Andrew Haley July 8, 2014, 9:43 a.m. UTC | #1
On 07/08/2014 10:35 AM, Edward Nevill wrote:
> I have chosen to only restrict the default code cache size so it can still be overridden with -XX:ReservedCodeCacheSize

Err, this should at least be conditionalized on AARCH64.

Couldn't we do it in the back end?

Andrew.
diff mbox

Patch

diff -r 2a489b2bb083 -r f60e306e9ec6 src/share/vm/runtime/arguments.cpp
--- a/src/share/vm/runtime/arguments.cpp	Tue Jul 08 05:25:15 2014 -0400
+++ b/src/share/vm/runtime/arguments.cpp	Tue Jul 08 10:32:24 2014 +0100
@@ -1130,7 +1130,7 @@ 
   }
   // Increase the code cache size - tiered compiles a lot more.
   if (FLAG_IS_DEFAULT(ReservedCodeCacheSize)) {
-    FLAG_SET_DEFAULT(ReservedCodeCacheSize, ReservedCodeCacheSize * 5);
+    FLAG_SET_DEFAULT(ReservedCodeCacheSize, MIN2(ReservedCodeCacheSize * 5, 128*M));
   }
   if (!UseInterpreter) { // -Xcomp
     Tier3InvokeNotifyFreqLog = 0;
--- CUT HERE ---