Lock ranking fix for monitor IDs.

Free-ing objects holds a lock and so the monitor ID lock needs to be
of a lower rank.

Change-Id: I594ac04c1f76c5d6fd2e752886040565001d4eaf
diff --git a/runtime/locks.h b/runtime/locks.h
index 2f9810d..4343ab4 100644
--- a/runtime/locks.h
+++ b/runtime/locks.h
@@ -46,6 +46,7 @@
   kMarkSweepMarkStackLock,
   kTransactionLogLock,
   kInternTableLock,
+  kMonitorPoolLock,
   kDefaultMutexLevel,
   kMarkSweepLargeObjectLock,
   kPinTableLock,
diff --git a/runtime/monitor_pool.cc b/runtime/monitor_pool.cc
index eadd7a6..19e569d 100644
--- a/runtime/monitor_pool.cc
+++ b/runtime/monitor_pool.cc
@@ -22,7 +22,8 @@
 
 namespace art {
 
-MonitorPool::MonitorPool() : allocated_ids_lock_("allocated monitor ids lock") {
+MonitorPool::MonitorPool() : allocated_ids_lock_("allocated monitor ids lock",
+                                                 LockLevel::kMonitorPoolLock) {
 }
 
 Monitor* MonitorPool::LookupMonitorFromTable(MonitorId mon_id) {