[aarch64-port-dev ] Restrict ReservedCodeCache to 128M
Edward Nevill
edward.nevill at linaro.org
Tue Jul 8 18:05:17 UTC 2014
On 8 July 2014 10:43, Andrew Haley <aph at redhat.com> wrote:
> 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.
>
Yes, sorry.
>
> Couldn't we do it in the back end?
>
I can see no obvious way to do it in the back end.
The code in vm_version_aarch64.cpp where other arch dependant stuff is done
like UseCRC32 is called too late, IE. it is called after
ReservedCodeCacheSize has already been used to initialise the code heap.
Patch below conditionalises on AARCH_ONLY
The alternative would be to set ReservedCodeCacheSize to 25M in c2_globals
instead of 48M so that 5*ReservedCodeCacheSize < 128M. This would mean
however that -XX:-TieredCompilation would only get a heap of 25M.
Which is best?
Ed.
--- CUT HERE ---
# HG changeset patch
# User Edward Nevill edward.nevill at linaro.org
# Date 1404842629 -3600
# Tue Jul 08 19:03:49 2014 +0100
# Node ID 6c07d806085bdc65a6a99a8e1394d1890a66c6cb
# Parent 5ed1bb528b990f293f6abbef834f7c4bf0dea406
Restrict default ReservedCodeCacheSize to 128M
diff -r 5ed1bb528b99 -r 6c07d806085b src/share/vm/runtime/arguments.cpp
--- a/src/share/vm/runtime/arguments.cpp Tue Jul 08 08:29:51 2014 -0400
+++ b/src/share/vm/runtime/arguments.cpp Tue Jul 08 19:03:49 2014 +0100
@@ -1131,6 +1131,7 @@
// Increase the code cache size - tiered compiles a lot more.
if (FLAG_IS_DEFAULT(ReservedCodeCacheSize)) {
FLAG_SET_DEFAULT(ReservedCodeCacheSize, ReservedCodeCacheSize * 5);
+ AARCH64_ONLY(FLAG_SET_DEFAULT(ReservedCodeCacheSize,
MIN2(ReservedCodeCacheSize, 128*M)));
}
if (!UseInterpreter) { // -Xcomp
Tier3InvokeNotifyFreqLog = 0;
--- CUT HERE ---
More information about the aarch64-port-dev
mailing list