8145221: Use trampolines for i2i and i2c entries in Methods that are stored in CDS archive

This optimization reduces the size of the RW region of the CDS archive. It also reduces the amount of pages in the RW region that are actually written into during runtime.

Co-authored-by: Ioi Lam <ioi.lam@oracle.com>
Co-authored-by: Goetz Lindenmaier <goetz.lindenmaier@sap.com>
Reviewed-by: dlong, iklam, jiangli
This commit is contained in:
Calvin Cheung 2016-04-07 22:03:04 -07:00
parent 2d2abce433
commit 28edd79d64
27 changed files with 408 additions and 47 deletions

View file

@ -324,6 +324,16 @@ bool SharedRuntime::is_wide_vector(int size) {
return size > 8;
}
size_t SharedRuntime::trampoline_size() {
return 40;
}
void SharedRuntime::generate_trampoline(MacroAssembler *masm, address destination) {
__ set((intptr_t)destination, G3_scratch);
__ JMP(G3_scratch, 0);
__ delayed()->nop();
}
// The java_calling_convention describes stack locations as ideal slots on
// a frame with no abi restrictions. Since we must observe abi restrictions
// (like the placement of the register window) the slots must be biased by