From d9c4fc94fa618617f94e1de9af5f034549100753 Mon Sep 17 00:00:00 2001 From: Ian Rogers Date: Tue, 1 Oct 2013 19:45:43 -0700 Subject: Inflate contended lock word by suspending owner. Bug 6961405. Don't inflate monitors for Notify and NotifyAll. Tidy lock word, handle recursive lock case alongside unlocked case and move assembly out of line (except for ARM quick). Also handle null in out-of-line assembly as the test is quick and the enter/exit code is already a safepoint. To gain ownership of a monitor on behalf of another thread, monitor contenders must not hold the monitor_lock_, so they wait on a condition variable. Reduce size of per mutex contention log. Be consistent in calling thin lock thread ids just thread ids. Fix potential thread death races caused by the use of FindThreadByThreadId, make it invariant that returned threads are either self or suspended now. Code size reduction on ARM boot.oat 0.2%. Old nexus 7 speedup 0.25%, new nexus 7 speedup 1.4%, nexus 10 speedup 2.24%, nexus 4 speedup 2.09% on DeltaBlue. Change-Id: Id52558b914f160d9c8578fdd7fc8199a9598576a --- dalvikvm/Android.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'dalvikvm') diff --git a/dalvikvm/Android.mk b/dalvikvm/Android.mk index 52584cf..a046391 100644 --- a/dalvikvm/Android.mk +++ b/dalvikvm/Android.mk @@ -38,7 +38,7 @@ LOCAL_CPP_EXTENSION := cc LOCAL_SRC_FILES := dalvikvm.cc LOCAL_CFLAGS := $(dalvikvm_cflags) LOCAL_SHARED_LIBRARIES := libnativehelper -LOCAL_LDFLAGS := -ldl +LOCAL_LDFLAGS := -ldl -lpthread LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk include $(BUILD_HOST_EXECUTABLE) ART_HOST_EXECUTABLES += $(HOST_OUT_EXECUTABLES)/$(LOCAL_MODULE) -- cgit v1.1