Add a systrace support for lock contention logging.

- Now several ART executables like oatdump need to link with libcutils
  as the mutex code is shared among them.
- The blocking thread ID and lock owner thread ID are passed to
  ScopedContentionRecorder in the correct order.

Bug: 9986464
Change-Id: Id766de23fbc4af1d8ba2de051595e365b04f5ae7
diff --git a/dex2oat/Android.mk b/dex2oat/Android.mk
index 5cfab51..05dcd7b 100644
--- a/dex2oat/Android.mk
+++ b/dex2oat/Android.mk
@@ -22,10 +22,10 @@
 	dex2oat.cc
 
 ifeq ($(ART_BUILD_TARGET_NDEBUG),true)
-  $(eval $(call build-art-executable,dex2oat,$(DEX2OAT_SRC_FILES),libart-compiler,art/compiler,target,ndebug))
+  $(eval $(call build-art-executable,dex2oat,$(DEX2OAT_SRC_FILES),libcutils libart-compiler,art/compiler,target,ndebug))
 endif
 ifeq ($(ART_BUILD_TARGET_DEBUG),true)
-  $(eval $(call build-art-executable,dex2oat,$(DEX2OAT_SRC_FILES),libartd-compiler,art/compiler,target,debug))
+  $(eval $(call build-art-executable,dex2oat,$(DEX2OAT_SRC_FILES),libcutils libartd-compiler,art/compiler,target,debug))
 endif
 
 ifeq ($(WITH_HOST_DALVIK),true)