8292891: ifdef-out some CDS-only functions

Reviewed-by: coleenp, ccheung, dholmes
This commit is contained in:
Ioi Lam 2022-08-29 23:20:21 +00:00
parent adb3d4f14a
commit 40b0ed5657
16 changed files with 45 additions and 23 deletions

View file

@ -401,6 +401,7 @@ void Method::metaspace_pointers_do(MetaspaceClosure* it) {
NOT_PRODUCT(it->push(&_name);)
}
#if INCLUDE_CDS
// Attempt to return method to original state. Clear any pointers
// (to objects outside the shared spaces). We won't be able to predict
// where they should point in a new JVM. Further initialize some
@ -411,6 +412,11 @@ void Method::remove_unshareable_info() {
JFR_ONLY(REMOVE_METHOD_ID(this);)
}
void Method::restore_unshareable_info(TRAPS) {
assert(is_method() && is_valid_method(this), "ensure C++ vtable is restored");
}
#endif
void Method::set_vtable_index(int index) {
if (is_shared() && !MetaspaceShared::remapped_readwrite() && method_holder()->verified_at_dump_time()) {
// At runtime initialize_vtable is rerun as part of link_class_impl()
@ -1259,10 +1265,6 @@ address Method::make_adapters(const methodHandle& mh, TRAPS) {
return adapter->get_c2i_entry();
}
void Method::restore_unshareable_info(TRAPS) {
assert(is_method() && is_valid_method(this), "ensure C++ vtable is restored");
}
address Method::from_compiled_entry_no_trampoline() const {
CompiledMethod *code = Atomic::load_acquire(&_code);
if (code) {