mirror of
https://github.com/openjdk/jdk.git
synced 2026-03-20 04:43:32 +00:00
8366659: Added bool arg to notify_contended_enter
This commit is contained in:
parent
3da084718f
commit
8c82d39c34
@ -515,11 +515,11 @@ bool ObjectMonitor::enter(JavaThread* current, bool post_jvmti_events) {
|
||||
return true;
|
||||
}
|
||||
|
||||
void ObjectMonitor::notify_contended_enter(JavaThread* current) {
|
||||
void ObjectMonitor::notify_contended_enter(JavaThread* current, bool post_jvmti_events) {
|
||||
current->set_current_pending_monitor(this);
|
||||
|
||||
DTRACE_MONITOR_PROBE(contended__enter, this, object(), current);
|
||||
if (JvmtiExport::should_post_monitor_contended_enter()) {
|
||||
if (post_jvmti_events && JvmtiExport::should_post_monitor_contended_enter()) {
|
||||
JvmtiExport::post_monitor_contended_enter(current, this);
|
||||
|
||||
// The current thread does not yet own the monitor and does not
|
||||
@ -554,7 +554,7 @@ void ObjectMonitor::enter_with_contention_mark(JavaThread* current, ObjectMonito
|
||||
ContinuationEntry* ce = current->last_continuation();
|
||||
bool is_virtual = ce != nullptr && ce->is_virtual_thread();
|
||||
if (is_virtual) {
|
||||
notify_contended_enter(current);
|
||||
notify_contended_enter(current, post_jvmti_events);
|
||||
result = Continuation::try_preempt(current, ce->cont_oop(current));
|
||||
if (result == freeze_ok) {
|
||||
bool acquired = vthread_monitor_enter(current);
|
||||
|
||||
@ -364,7 +364,7 @@ class ObjectMonitor : public CHeapObj<mtObjectMonitor> {
|
||||
};
|
||||
|
||||
bool enter_is_async_deflating();
|
||||
void notify_contended_enter(JavaThread *current);
|
||||
void notify_contended_enter(JavaThread *current, bool post_jvmti_events = true);
|
||||
public:
|
||||
void enter_for_with_contention_mark(JavaThread* locking_thread, ObjectMonitorContentionMark& contention_mark);
|
||||
bool enter_for(JavaThread* locking_thread);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user