Home
last modified time | relevance | path

Searched refs:mon (Results 1 – 20 of 20) sorted by relevance

/art/test/1934-jvmti-signal-thread/
Dsignal_threads.cc45 NativeMonitor* mon; in Java_art_Test1934_allocNativeMonitor() local
49 reinterpret_cast<unsigned char**>(&mon)))) { in Java_art_Test1934_allocNativeMonitor()
55 &mon->start_monitor))) { in Java_art_Test1934_allocNativeMonitor()
61 &mon->continue_monitor))) { in Java_art_Test1934_allocNativeMonitor()
64 mon->should_continue = false; in Java_art_Test1934_allocNativeMonitor()
65 mon->should_start = false; in Java_art_Test1934_allocNativeMonitor()
66 return static_cast<jlong>(reinterpret_cast<intptr_t>(mon)); in Java_art_Test1934_allocNativeMonitor()
72 NativeMonitor* mon = reinterpret_cast<NativeMonitor*>(static_cast<intptr_t>(id)); in Java_art_Test1934_nativeWaitForOtherThread() local
74 if (JvmtiErrorToException(env, jvmti_env, jvmti_env->RawMonitorEnter(mon->start_monitor))) { in Java_art_Test1934_nativeWaitForOtherThread()
77 mon->should_start = true; in Java_art_Test1934_nativeWaitForOtherThread()
[all …]
/art/runtime/
Dmonitor_pool_test.cc39 static void VerifyMonitor(Monitor* mon, Thread* self) { in VerifyMonitor() argument
41 EXPECT_EQ(MonitorPool::MonitorIdFromMonitor(mon), mon->GetMonitorId()); in VerifyMonitor()
43 EXPECT_EQ(MonitorPool::ComputeMonitorId(mon, self), mon->GetMonitorId()); in VerifyMonitor()
45 EXPECT_EQ(mon, MonitorPool::MonitorFromMonitorId(mon->GetMonitorId())); in VerifyMonitor()
74 Monitor* mon = MonitorPool::CreateMonitor(self, self, nullptr, static_cast<int32_t>(i)); in TEST_F() local
75 monitors.push_back(mon); in TEST_F()
77 VerifyMonitor(mon, self); in TEST_F()
81 Monitor* mon = monitors[index]; in TEST_F() local
85 VerifyMonitor(mon, self); in TEST_F()
87 MonitorPool::ReleaseMonitor(self, mon); in TEST_F()
[all …]
Dmonitor_pool.h51 Monitor* mon = new Monitor(self, owner, obj, hash_code); in CreateMonitor() local
52 DCHECK_ALIGNED(mon, LockWord::kMonitorIdAlignment); in CreateMonitor()
53 return mon; in CreateMonitor()
85 static MonitorId MonitorIdFromMonitor(Monitor* mon) { in MonitorIdFromMonitor() argument
87 return reinterpret_cast<MonitorId>(mon) >> LockWord::kMonitorIdAlignmentShift; in MonitorIdFromMonitor()
89 return mon->GetMonitorId(); in MonitorIdFromMonitor()
93 static MonitorId ComputeMonitorId(Monitor* mon, Thread* self) { in ComputeMonitorId() argument
96 return MonitorIdFromMonitor(mon); in ComputeMonitorId()
98 return GetMonitorPool()->ComputeMonitorIdInPool(mon, self); in ComputeMonitorId()
151 static bool IsInChunk(uintptr_t base_addr, Monitor* mon) { in IsInChunk() argument
[all …]
Dlock_word-inl.h53 inline LockWord::LockWord(Monitor* mon, uint32_t gc_state) in LockWord() argument
54 : value_(mon->GetMonitorId() | (gc_state << kGCStateShift) | (kStateFat << kStateShift)) { in LockWord()
56 DCHECK_ALIGNED(mon, kMonitorIdAlignment); in LockWord()
58 DCHECK_EQ(FatLockMonitor(), mon); in LockWord()
59 DCHECK_LE(mon->GetMonitorId(), static_cast<uint32_t>(kMaxMonitorId)); in LockWord()
Dmonitor.cc1166 Monitor* mon = lock_word.FatLockMonitor(); in MonitorEnter() local
1168 return mon->TryLock(self) ? h_obj.Get() : nullptr; in MonitorEnter()
1170 mon->Lock(self); in MonitorEnter()
1239 Monitor* mon = lock_word.FatLockMonitor(); in MonitorExit() local
1240 return mon->Unlock(self); in MonitorExit()
1296 Monitor* mon = lock_word.FatLockMonitor(); in Wait() local
1297 mon->Wait(self, ms, ns, interruptShouldThrow, why); in Wait()
1322 Monitor* mon = lock_word.FatLockMonitor(); in DoNotify() local
1324 mon->NotifyAll(self); in DoNotify()
1326 mon->Notify(self); in DoNotify()
[all …]
Dmonitor_pool.cc154 for (Monitor* mon : *monitors) { in ReleaseMonitorsToPool()
155 ReleaseMonitorToPool(self, mon); in ReleaseMonitorsToPool()
Druntime_callbacks.h109 virtual void MonitorContendedLocking(Monitor* mon) REQUIRES_SHARED(Locks::mutator_lock_) = 0;
111 virtual void MonitorContendedLocked(Monitor* mon) REQUIRES_SHARED(Locks::mutator_lock_) = 0;
Dlock_word.h247 LockWord(Monitor* mon, uint32_t gc_state);
Druntime_callbacks_test.cc464 void MonitorContendedLocking(Monitor* mon ATTRIBUTE_UNUSED) override in MonitorContendedLocking()
467 void MonitorContendedLocked(Monitor* mon ATTRIBUTE_UNUSED) override in MonitorContendedLocked()
Dmonitor.h212 Monitor* mon)
Dthread.h593 void SetWaitMonitor(Monitor* mon) REQUIRES(wait_mutex_) { in SetWaitMonitor() argument
594 wait_monitor_ = mon; in SetWaitMonitor()
/art/test/1943-suspend-raw-monitor-wait/
Dnative_suspend_monitor.cc33 jrawMonitorID mon; variable
38 env, jvmti_env, jvmti_env->CreateRawMonitor("Test1943 monitor", &mon))) { in Java_art_Test1943_nativeRun()
42 if (JvmtiErrorToException(env, jvmti_env, jvmti_env->RawMonitorEnter(mon))) { in Java_art_Test1943_nativeRun()
46 if (JvmtiErrorToException(env, jvmti_env, jvmti_env->RawMonitorWait(mon, 0))) { in Java_art_Test1943_nativeRun()
49 if (JvmtiErrorToException(env, jvmti_env, jvmti_env->RawMonitorExit(mon))) { in Java_art_Test1943_nativeRun()
61 if (JvmtiErrorToException(env, jvmti_env, jvmti_env->RawMonitorEnter(mon))) { in Java_art_Test1943_nativeNotify()
64 if (JvmtiErrorToException(env, jvmti_env, jvmti_env->RawMonitorNotifyAll(mon))) { in Java_art_Test1943_nativeNotify()
67 if (JvmtiErrorToException(env, jvmti_env, jvmti_env->RawMonitorExit(mon))) { in Java_art_Test1943_nativeNotify()
73 if (JvmtiErrorToException(env, jvmti_env, jvmti_env->RawMonitorEnter(mon))) { in Java_art_Test1943_grabRawMonitor()
76 if (JvmtiErrorToException(env, jvmti_env, jvmti_env->RawMonitorExit(mon))) { in Java_art_Test1943_grabRawMonitor()
/art/test/1942-suspend-raw-monitor-exit/
Dnative_suspend_monitor.cc33 jrawMonitorID mon; variable
41 env, jvmti_env, jvmti_env->CreateRawMonitor("Test1942 monitor", &mon))) { in Java_art_Test1942_nativeRun()
44 if (JvmtiErrorToException(env, jvmti_env, jvmti_env->RawMonitorEnter(mon))) { in Java_art_Test1942_nativeRun()
52 if (JvmtiErrorToException(env, jvmti_env, jvmti_env->RawMonitorExit(mon))) { in Java_art_Test1942_nativeRun()
71 if (JvmtiErrorToException(env, jvmti_env, jvmti_env->RawMonitorEnter(mon))) { in Java_art_Test1942_grabRawMonitor()
74 if (JvmtiErrorToException(env, jvmti_env, jvmti_env->RawMonitorExit(mon))) { in Java_art_Test1942_grabRawMonitor()
/art/test/1921-suspend-native-recursive-monitor/
Dnative_suspend_recursive_monitor.cc39 jrawMonitorID mon; in Java_art_Test1921_nativeSpin() local
41 env, jvmti_env, jvmti_env->CreateRawMonitor("Test1921 monitor", &mon))) { in Java_art_Test1921_nativeSpin()
44 if (JvmtiErrorToException(env, jvmti_env, jvmti_env->RawMonitorEnter(mon))) { in Java_art_Test1921_nativeSpin()
52 if (JvmtiErrorToException(env, jvmti_env, jvmti_env->RawMonitorEnter(mon))) { in Java_art_Test1921_nativeSpin()
56 if (JvmtiErrorToException(env, jvmti_env, jvmti_env->RawMonitorExit(mon))) { in Java_art_Test1921_nativeSpin()
60 if (JvmtiErrorToException(env, jvmti_env, jvmti_env->RawMonitorExit(mon))) { in Java_art_Test1921_nativeSpin()
/art/test/1920-suspend-native-monitor/
Dnative_suspend_monitor.cc39 jrawMonitorID mon; in Java_art_Test1920_nativeSpin() local
41 env, jvmti_env, jvmti_env->CreateRawMonitor("Test1920 monitor", &mon))) { in Java_art_Test1920_nativeSpin()
49 if (JvmtiErrorToException(env, jvmti_env, jvmti_env->RawMonitorEnter(mon))) { in Java_art_Test1920_nativeSpin()
53 if (JvmtiErrorToException(env, jvmti_env, jvmti_env->RawMonitorExit(mon))) { in Java_art_Test1920_nativeSpin()
/art/test/1951-monitor-enter-no-suspend/
Draw_monitor.cc29 using RawMonitorEnterNoSuspend = jvmtiError(*)(jvmtiEnv* env, jrawMonitorID mon);
74 jrawMonitorID mon; in Java_art_Test1951_otherThreadStart() local
75 if (JvmtiErrorToException(env, jvmti_env, jvmti_env->CreateRawMonitor("test 1951", &mon))) { in Java_art_Test1951_otherThreadStart()
84 jvmtiError err = enter_func(jvmti_env, mon); in Java_art_Test1951_otherThreadStart()
87 err = jvmti_env->RawMonitorExit(mon); in Java_art_Test1951_otherThreadStart()
/art/test/1933-monitor-current-contended/src/art/
DTest1933.java39 Object mon = controller1.getWorkerContendedMonitor(); in testNormalWaitMonitor() local
40 for (; mon == null; mon = controller1.getWorkerContendedMonitor()) { Thread.yield(); } in testNormalWaitMonitor()
41 System.out.println("c1 is contending for monitor: " + mon); in testNormalWaitMonitor()
/art/test/1922-owned-monitors-info/
Downed_monitors.cc71 JNIEnv* env, jobject thiz ATTRIBUTE_UNUSED, jobject mon, jobject next) { in Java_art_Test1922_00024Target_lockNative() argument
72 if (doMonitorEnter(env, mon)) { in Java_art_Test1922_00024Target_lockNative()
78 if (doMonitorExit(env, mon)) { in Java_art_Test1922_00024Target_lockNative()
/art/openjdkjvm/
DOpenjdkJvm.cc138 JNIEXPORT void JVM_RawMonitorDestroy(void* mon) { in JVM_RawMonitorDestroy() argument
140 (reinterpret_cast<pthread_mutex_t*>(mon)), in JVM_RawMonitorDestroy()
142 free(mon); in JVM_RawMonitorDestroy()
145 JNIEXPORT jint JVM_RawMonitorEnter(void* mon) { in JVM_RawMonitorEnter() argument
146 return pthread_mutex_lock(reinterpret_cast<pthread_mutex_t*>(mon)); in JVM_RawMonitorEnter()
149 JNIEXPORT void JVM_RawMonitorExit(void* mon) { in JVM_RawMonitorExit() argument
151 (reinterpret_cast<pthread_mutex_t*>(mon)), in JVM_RawMonitorExit()
/art/openjdkjvmti/
Devents.cc349 ScopedLocalRef<jobject> mon(jnienv, AddLocalRef<jobject>(jnienv, m->GetObject())); in MonitorContendedLocking() local
354 mon.get()); in MonitorContendedLocking()
363 ScopedLocalRef<jobject> mon(jnienv, AddLocalRef<jobject>(jnienv, m->GetObject())); in MonitorContendedLocked() local
368 mon.get()); in MonitorContendedLocked()
377 ScopedLocalRef<jobject> mon(jnienv, AddLocalRef<jobject>(jnienv, obj.Get())); in ObjectWaitStart() local
382 mon.get(), in ObjectWaitStart()
404 ScopedLocalRef<jobject> mon(jnienv, AddLocalRef<jobject>(jnienv, m->GetObject())); in MonitorWaitFinished() local
409 mon.get(), in MonitorWaitFinished()