mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
8253920: Share method trampolines in CDS dynamic archive
Reviewed-by: redestad, minqi, iklam
This commit is contained in:
parent
7d41a54188
commit
84e985da4b
8 changed files with 135 additions and 102 deletions
|
@ -1107,17 +1107,9 @@ void Method::unlink_method() {
|
|||
_i2i_entry = Interpreter::entry_for_cds_method(methodHandle(Thread::current(), this));
|
||||
_from_interpreted_entry = _i2i_entry;
|
||||
|
||||
if (DynamicDumpSharedSpaces) {
|
||||
assert(_from_compiled_entry != NULL, "sanity");
|
||||
} else {
|
||||
// TODO: Simplify the adapter trampoline allocation for static archiving.
|
||||
// Remove the use of CDSAdapterHandlerEntry.
|
||||
CDSAdapterHandlerEntry* cds_adapter = (CDSAdapterHandlerEntry*)adapter();
|
||||
constMethod()->set_adapter_trampoline(cds_adapter->get_adapter_trampoline());
|
||||
_from_compiled_entry = cds_adapter->get_c2i_entry_trampoline();
|
||||
assert(*((int*)_from_compiled_entry) == 0,
|
||||
"must be NULL during dump time, to be initialized at run time");
|
||||
}
|
||||
assert(_from_compiled_entry != NULL, "sanity");
|
||||
assert(*((int*)_from_compiled_entry) == 0,
|
||||
"must be NULL during dump time, to be initialized at run time");
|
||||
|
||||
if (is_native()) {
|
||||
*native_function_addr() = NULL;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue