From ed2be1725fb79075892b1a9103487c9d9a95b350 Mon Sep 17 00:00:00 2001 From: Sebastien Hertz Date: Tue, 19 Aug 2014 15:33:43 +0200 Subject: Reduce lock contention when debugging Uses a ReaderWriterMutex for the breakpoint lock to reduce contention during debugging session. Also adds missing thread safety annotations on fields and methods related to instrumentation and debugging. Bug: 16814665 Bug: 11667502 (cherry picked from commit 59d9d668d4f4286813afe2b4e7c6db839222ce96) Change-Id: I5f1156da8c6cc8316d6db16e6cfb2470fe289ad3 --- runtime/base/mutex.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'runtime/base/mutex.h') diff --git a/runtime/base/mutex.h b/runtime/base/mutex.h index fd76629..2a623fd 100644 --- a/runtime/base/mutex.h +++ b/runtime/base/mutex.h @@ -565,7 +565,7 @@ class Locks { static Mutex* jni_libraries_lock_ ACQUIRED_AFTER(thread_list_lock_); // Guards breakpoints. - static Mutex* breakpoint_lock_ ACQUIRED_AFTER(jni_libraries_lock_); + static ReaderWriterMutex* breakpoint_lock_ ACQUIRED_AFTER(jni_libraries_lock_); // Guards lists of classes within the class linker. static ReaderWriterMutex* classlinker_classes_lock_ ACQUIRED_AFTER(breakpoint_lock_); -- cgit v1.1