Do less work holding thread list lock

Avoid doing stuff that requires access java heap like PrettyMethod.
Fixes lock violation.

Bug: 28268478
Change-Id: Ie090879690df7a6db15a9c8b7e82f3809450d653
diff --git a/runtime/monitor.h b/runtime/monitor.h
index 3d9d10a..8c7496b 100644
--- a/runtime/monitor.h
+++ b/runtime/monitor.h
@@ -211,10 +211,12 @@
       REQUIRES(!monitor_lock_)
       SHARED_REQUIRES(Locks::mutator_lock_);
 
-  static std::string PrettyContentionInfo(Thread* owner,
+  static std::string PrettyContentionInfo(const std::string& owner_name,
+                                          pid_t owner_tid,
                                           ArtMethod* owners_method,
                                           uint32_t owners_dex_pc,
                                           size_t num_waiters)
+      REQUIRES(!Locks::thread_list_lock_)
       SHARED_REQUIRES(Locks::mutator_lock_);
 
   // Wait on a monitor until timeout, interrupt, or notification.  Used for Object.wait() and