[aarch64-port-dev ] Restrict ReservedCodeCache to 128M
Andrew Haley
aph at redhat.com
Tue Jul 8 18:27:39 UTC 2014
On 07/08/2014 07:05 PM, Edward Nevill wrote:
> 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?
This patch is best. Please add a comment here
// The maximum B/BL offset range on AArch64 is 128MB
TVM,
Andrew.
> --- 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