However, this should not happen in a healthy VM. If a static call (or optimized virtual call) is reachable then the callee class can’t be dead.
Removing this code piece of
The code was implemented for x86 on which the CompiledStaticCalls embed the Method* into the code stream and don't use the oop recorder for it.
Other platforms (e.g. PPC64, AArch64) allocate a metadata slot via oop recorder. The code in question clears the slot in the metadata section, not the replicated value which is actually used by the code. Note that fix_metadata_relocation() does nothing on most platforms! This is a further indication that the code is not needed.
In addition, the Method* null checks in the c2i entry barriers should not be needed.
We should consider reverting the unneeded parts of
- relates to
-
JDK-8299155 C2: SubTypeCheckNode::verify() should not produce dependencies / oop pool entries
- Resolved
-
JDK-8294002 Alignment of static call stubs is inconsistent
- Open
-
JDK-8222841 Incorrect static call stub interactions with class unloading
- Closed
-
JDK-8295097 DirectNativeCallWrapper::verify_resolve_call fails with "assert(db != __null && !db->is_adapter_blob()) failed: must use stub!"
- Closed
- links to
-
Review openjdk/jdk/12802