Fix an incorrect use of ScopedContentionRecorder in ReaderWriterMutex.
The TID the blocked (current) thread and the TID of the mutex's
exclusive owner thread should be respectively passed as second
and third arguments to ScopedContentionRecorder's constructor.
Test: art/test.py
Change-Id: Ica37dfb1c15e25cd48fa46f499192de58e8a7e0e
diff --git a/runtime/base/mutex.cc b/runtime/base/mutex.cc
index 8a24daa..3d2226c 100644
--- a/runtime/base/mutex.cc
+++ b/runtime/base/mutex.cc
@@ -763,7 +763,7 @@
#if ART_USE_FUTEXES
void ReaderWriterMutex::HandleSharedLockContention(Thread* self, int32_t cur_state) {
// Owner holds it exclusively, hang up.
- ScopedContentionRecorder scr(this, GetExclusiveOwnerTid(), SafeGetTid(self));
+ ScopedContentionRecorder scr(this, SafeGetTid(self), GetExclusiveOwnerTid());
++num_pending_readers_;
if (UNLIKELY(should_respond_to_empty_checkpoint_request_)) {
self->CheckEmptyCheckpointFromMutex();