mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-18 10:04:42 +02:00
8288040: x86: Loom: Improve cont/monitor-count helper methods
Reviewed-by: coleenp, rpressler
This commit is contained in:
parent
5a89cb01bc
commit
e5b56bafa9
8 changed files with 121 additions and 79 deletions
|
@ -2592,11 +2592,10 @@ void TemplateTable::_return(TosState state) {
|
|||
#endif
|
||||
__ jcc(Assembler::zero, no_safepoint);
|
||||
__ push(state);
|
||||
__ push_cont_fastpath(NOT_LP64(thread) LP64_ONLY(r15_thread));
|
||||
__ push_cont_fastpath();
|
||||
__ call_VM(noreg, CAST_FROM_FN_PTR(address,
|
||||
InterpreterRuntime::at_safepoint));
|
||||
NOT_LP64(__ get_thread(thread);)
|
||||
__ pop_cont_fastpath(NOT_LP64(thread) LP64_ONLY(r15_thread));
|
||||
__ pop_cont_fastpath();
|
||||
__ pop(state);
|
||||
__ bind(no_safepoint);
|
||||
}
|
||||
|
@ -4365,9 +4364,7 @@ void TemplateTable::monitorenter() {
|
|||
__ lock_object(rmon);
|
||||
|
||||
// The object is stored so counter should be increased even if stackoverflow is generated
|
||||
Register rthread = LP64_ONLY(r15_thread) NOT_LP64(rbx);
|
||||
NOT_LP64(__ get_thread(rthread);)
|
||||
__ inc_held_monitor_count(rthread);
|
||||
__ inc_held_monitor_count();
|
||||
|
||||
// check to make sure this monitor doesn't cause stack overflow after locking
|
||||
__ save_bcp(); // in case of exception
|
||||
|
@ -4428,9 +4425,7 @@ void TemplateTable::monitorexit() {
|
|||
__ push_ptr(rax); // make sure object is on stack (contract with oopMaps)
|
||||
__ unlock_object(rtop);
|
||||
|
||||
Register rthread = LP64_ONLY(r15_thread) NOT_LP64(rax);
|
||||
NOT_LP64(__ get_thread(rthread);)
|
||||
__ dec_held_monitor_count(rthread);
|
||||
__ dec_held_monitor_count();
|
||||
|
||||
__ pop_ptr(rax); // discard object
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue