ART: Change SCOPED_TRACE implementation

Move to a LOG-like usage pattern. This improves usability in the
presence of lock annotations.

Demonstrate in the JIT compiler, where a lambda would require
a REQUIRES_SHARED annotation.

Test: m
Test: manual
Change-Id: I9da2bfb29ed11660dbeb6f114a3d6c7ffef3a26d
diff --git a/compiler/jit/jit_compiler.cc b/compiler/jit/jit_compiler.cc
index 74603c6..88e3e5b 100644
--- a/compiler/jit/jit_compiler.cc
+++ b/compiler/jit/jit_compiler.cc
@@ -23,6 +23,7 @@
 #include "art_method-inl.h"
 #include "base/logging.h"  // For VLOG
 #include "base/stringpiece.h"
+#include "base/systrace.h"
 #include "base/time_utils.h"
 #include "base/timing_logger.h"
 #include "base/unix_file/fd_file.h"
@@ -163,6 +164,8 @@
 }
 
 bool JitCompiler::CompileMethod(Thread* self, ArtMethod* method, bool osr) {
+  SCOPED_TRACE << "JIT compiling " << method->PrettyMethod();
+
   DCHECK(!method->IsProxyMethod());
   DCHECK(method->GetDeclaringClass()->IsResolved());