mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-26 14:24:46 +02:00
7102657: JSR 292: C1 deoptimizes unlinked invokedynamic call sites infinitely
Reviewed-by: never, bdelsart
This commit is contained in:
parent
669fa7396d
commit
6d1f314a4b
7 changed files with 55 additions and 5 deletions
|
@ -681,6 +681,23 @@ JRT_LEAF(void, Runtime1::monitorexit(JavaThread* thread, BasicObjectLock* lock))
|
|||
}
|
||||
JRT_END
|
||||
|
||||
// Cf. OptoRuntime::deoptimize_caller_frame
|
||||
JRT_ENTRY(void, Runtime1::deoptimize(JavaThread* thread))
|
||||
// Called from within the owner thread, so no need for safepoint
|
||||
RegisterMap reg_map(thread, false);
|
||||
frame stub_frame = thread->last_frame();
|
||||
assert(stub_frame.is_runtime_frame(), "sanity check");
|
||||
frame caller_frame = stub_frame.sender(®_map);
|
||||
|
||||
// We are coming from a compiled method; check this is true.
|
||||
assert(CodeCache::find_nmethod(caller_frame.pc()) != NULL, "sanity");
|
||||
|
||||
// Deoptimize the caller frame.
|
||||
Deoptimization::deoptimize_frame(thread, caller_frame.id());
|
||||
|
||||
// Return to the now deoptimized frame.
|
||||
JRT_END
|
||||
|
||||
|
||||
static klassOop resolve_field_return_klass(methodHandle caller, int bci, TRAPS) {
|
||||
Bytecode_field field_access(caller, bci);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue