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

@ -113,6 +113,7 @@ class AbstractInterpreter: AllStatic {
// method entry points
static address _entry_table[number_of_method_entries]; // entry points for a given method
static address _cds_entry_table[number_of_method_entries]; // entry points for methods in the CDS archive
static address _native_abi_to_tosca[number_of_result_handlers]; // for native method result handlers
static address _slow_signature_handler; // the native method generic (slow) signature handler
@ -132,6 +133,17 @@ class AbstractInterpreter: AllStatic {
static address entry_for_kind(MethodKind k) { assert(0 <= k && k < number_of_method_entries, "illegal kind"); return _entry_table[k]; }
static address entry_for_method(methodHandle m) { return entry_for_kind(method_kind(m)); }
static address entry_for_cds_method(methodHandle m) {
MethodKind k = method_kind(m);
assert(0 <= k && k < number_of_method_entries, "illegal kind");
return _cds_entry_table[k];
}
// used by class data sharing
static void update_cds_entry_table(MethodKind kind) NOT_CDS_RETURN;
static address get_trampoline_code_buffer(AbstractInterpreter::MethodKind kind) NOT_CDS_RETURN_(0);
// used for bootstrapping method handles:
static void set_entry_for_kind(MethodKind k, address e);