Other |
---|
tbdUnresolved |
Relates :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
There are a couple of simplifications that can be done to the transition/transition wrapper code: - Consolidate ThreadBlockInVM and ThreadBlockInVMWithDeadlockCheck - Consolidate ThreadInVMfromJava and ThreadInVMfromJavaNoAsyncException - With little effort maybe we can also get rid of the transitional states (_thread_in_vm_trans, _thread_blocked_trans, etc) since we either are already in a safepoint unsafe state before checking for safepoints/handshakes or we can transition first to the desired safepoint unsafe state and then check for safepoint/handshakes. - Make clear which operations we need to check for when transitioning from one state to another(safepoint/handshake, suspend, async exceptions etc) and adjust wrappers if needed. - We call make_walkable() before transitioning to a safe state, but stack should always be walkable if we are in the vm and there is a last Java frame (_last_Java_sp != NULL). It seems the only issue could come from the compiler, since it can set _last_Java_sp but not _last_Java_pc, expecting it will be retrieved later from _last_Java_sp if we do need to walk the stack. For x86 and aarch64, _last_Java_pc is retrieved by doing _last_Java_pc = _last_Java_sp[-1]).