ART: Add method names to lock-contention samples

Obfuscators and optimizers will strip reliable source info from
dex files, making the traditional source file name and line number
emitted in lock-contention samples not very useful.

Add the method names to the sample. While this significantly
increases the size of the sample, it allows mapping obfuscated
code back to the source, pinpointing the involved locks.

Contention samples:
Before:
[com.google.android.gms,1,main,956,:com.google.android.gms,6,AssetManager.java,-2,100]
After:
[com.google.android.gms,1,main,956,:com.google.android.gms,6,bzv com.google.android.chimera.container.ConfigurationManager.b(),AssetManager.java,-2,int android.content.res.AssetManager.getStringBlockCount(),100]

Bug: 62241642
Test: m
Test: m test-art-host
Test: Device boots
Test: Manual inspection of reports
Change-Id: I8d7a65e16e022d53aba1ced2fdb202f24bced516
diff --git a/runtime/monitor_android.cc b/runtime/monitor_android.cc
index 7ba3652..74623da 100644
--- a/runtime/monitor_android.cc
+++ b/runtime/monitor_android.cc
@@ -15,7 +15,6 @@
  */
 
 #include "monitor.h"
-#include "thread.h"
 
 #include <fcntl.h>
 #include <sys/stat.h>
@@ -24,6 +23,9 @@
 #include <log/log.h>
 #include <log/log_event_list.h>
 
+#include "art_method.h"
+#include "thread.h"
+
 #define EVENT_LOG_TAG_dvm_lock_sample 20003
 
 namespace art {
@@ -77,6 +79,9 @@
 
     // Emit the source code line number.
     ctx << line_number;
+
+    // Emit the method name.
+    ctx << ArtMethod::PrettyMethod(m);
   }
 
   // Emit the lock owner source code file name.
@@ -91,6 +96,9 @@
   // Emit the source code line number.
   ctx << owner_line_number;
 
+  // Emit the owner method name.
+  ctx << ArtMethod::PrettyMethod(owner_method);
+
   // Emit the sample percentage.
   ctx << sample_percent;