[aarch64-port-dev ] RFR: aarch64: jdk8: large code cache support
Edward Nevill
edward.nevill at gmail.com
Wed Dec 9 14:10:42 UTC 2015
Hi,
The following webrev
http://cr.openjdk.java.net/~enevill/jdk8_largecode/webrev
backports large code cache support from JDK 9 to JDK 8
This incorporates the fix to pd_call_destination
http://cr.openjdk.java.net/~enevill/8144498/webrev.2
I have also updated the jdk8 patch to reflect the setting of CODE_CACHE_SIZE_LIMIT in jdk9, so that jdk8 and jdk9 are the same.
One change I am not so sure about is the following in jdk9
@@ -868,7 +867,7 @@
// blrt rscratch1
CodeBlob *cb = CodeCache::find_blob(_entry_point);
if (cb) {
- return NativeInstruction::instruction_size;
+ return MacroAssembler::far_branch_size();
} else {
return 6 * NativeInstruction::instruction_size;
whereas in jdk8 we have
- return 4;
+ return MacroAssembler::far_branch_size();
} else {
// A 48-bit address. See movptr().
- return 16;
+ // then a blrt
+ // return 16;
+ return 4 * NativeInstruction::instruction_size;
IE. 4 * instruction_size instead of 6 * instruction_size
This is because in jdk9, aarch64_enc_java_to_runtime does
__ adr(rscratch2, retaddr);
__ lea(rscratch1, RuntimeAddress(entry));
// Leave a breadcrumb for JavaThread::pd_last_frame().
__ stp(zr, rscratch2, Address(__ pre(sp, -2 * wordSize)));
__ blrt(rscratch1, gpcnt, fpcnt, rtype);
__ bind(retaddr);
__ add(sp, sp, 2 * wordSize);
whereas in jdk8 it just does
__ lea(rscratch1, RuntimeAddress(entry));
__ blrt(rscratch1, gpcnt, fpcnt, rtype);
For the moment I have left this unchanged.
Is this necessary and should I include it in the backport?
I have tested the large code support in jdk8 with jtreg hotspot and langtools with the following results.
Hotspot (original - 128M code cache): Test results: passed: 674; failed: 17; error: 3
Hotspot (patched - 128M code cache): Test results: passed: 674; failed: 17; error: 3
Hotspot (patched- 256M code cache): Test results: passed: 674; failed: 17; error: 3
Langtools (original - 128M code cache): Test results: passed: 3,091
Langtools (patched - 128M code cache): Test results: passed: 3,090
Langtools (patched - 256M code cache): Test results: passed: 3,091
OK to push?
Ed.
More information about the aarch64-port-dev
mailing list