summaryrefslogtreecommitdiff
path: root/runtime/monitor.cc
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/monitor.cc')
-rw-r--r--runtime/monitor.cc8
1 files changed, 2 insertions, 6 deletions
diff --git a/runtime/monitor.cc b/runtime/monitor.cc
index f4bc222d1a..71c866f3d6 100644
--- a/runtime/monitor.cc
+++ b/runtime/monitor.cc
@@ -964,17 +964,13 @@ bool Monitor::MonitorExit(Thread* self, mirror::Object* obj) {
if (!kUseReadBarrier) {
DCHECK_EQ(new_lw.ReadBarrierState(), 0U);
h_obj->SetLockWord(new_lw, true);
- if (ATRACE_ENABLED()) {
- ATRACE_END();
- }
+ AtraceMonitorUnlock();
// Success!
return true;
} else {
// Use CAS to preserve the read barrier state.
if (h_obj->CasLockWordWeakSequentiallyConsistent(lock_word, new_lw)) {
- if (ATRACE_ENABLED()) {
- ATRACE_END();
- }
+ AtraceMonitorUnlock();
// Success!
return true;
}