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

@ -959,6 +959,16 @@ bool FileMapInfo::is_in_shared_space(const void* p) {
return false;
}
// Check if a given address is within one of the shared regions (ro, rw, md, mc)
bool FileMapInfo::is_in_shared_region(const void* p, int idx) {
assert((idx >= MetaspaceShared::ro) && (idx <= MetaspaceShared::mc), "invalid region index");
char* base = _header->region_addr(idx);
if (p >= base && p < base + _header->_space[idx]._used) {
return true;
}
return false;
}
void FileMapInfo::print_shared_spaces() {
tty->print_cr("Shared Spaces:");
for (int i = 0; i < MetaspaceShared::n_regions; i++) {