Move TimingLogger creation to dex2oat

Change-Id: I4fdb6afd4ce2ac0d91c6c968893606d593b6ea18
diff --git a/runtime/common_test.h b/runtime/common_test.h
index 13626a5..09ad7fd 100644
--- a/runtime/common_test.h
+++ b/runtime/common_test.h
@@ -349,7 +349,7 @@
       class_linker_->FixupDexCaches(runtime_->GetResolutionMethod());
       compiler_driver_.reset(new CompilerDriver(compiler_backend, instruction_set,
                                                 true, new CompilerDriver::DescriptorSet,
-                                                2, true, true));
+                                                2, true));
     }
     // We typically don't generate an image in unit tests, disable this optimization by default.
     compiler_driver_->SetSupportBootImageFixup(false);
@@ -473,7 +473,8 @@
 
   void CompileMethod(mirror::AbstractMethod* method) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
     CHECK(method != NULL);
-    compiler_driver_->CompileOne(method);
+    TimingLogger timings("CommonTest::CompileMethod", false);
+    compiler_driver_->CompileOne(method, timings);
     MakeExecutable(method);
   }
 
diff --git a/runtime/image_test.cc b/runtime/image_test.cc
index ee50118..11218ad 100644
--- a/runtime/image_test.cc
+++ b/runtime/image_test.cc
@@ -45,7 +45,8 @@
     {
       jobject class_loader = NULL;
       ClassLinker* class_linker = Runtime::Current()->GetClassLinker();
-      compiler_driver_->CompileAll(class_loader, class_linker->GetBootClassPath());
+      TimingLogger timings("ImageTest::WriteRead", false);
+      compiler_driver_->CompileAll(class_loader, class_linker->GetBootClassPath(), timings);
 
       ScopedObjectAccess soa(Thread::Current());
       VectorOutputStream output_stream(tmp_elf.GetFilename(), oat_contents);
diff --git a/runtime/oat_test.cc b/runtime/oat_test.cc
index 7f24564..9a6bc19 100644
--- a/runtime/oat_test.cc
+++ b/runtime/oat_test.cc
@@ -74,10 +74,11 @@
 #else
   CompilerBackend compiler_backend = kQuick;
 #endif
-  compiler_driver_.reset(new CompilerDriver(compiler_backend, kThumb2, false, NULL, 2, true, true));
+  compiler_driver_.reset(new CompilerDriver(compiler_backend, kThumb2, false, NULL, 2, true));
   jobject class_loader = NULL;
   if (compile) {
-    compiler_driver_->CompileAll(class_loader, class_linker->GetBootClassPath());
+    TimingLogger timings("OatTest::WriteRead", false);
+    compiler_driver_->CompileAll(class_loader, class_linker->GetBootClassPath(), timings);
   }
 
   ScopedObjectAccess soa(Thread::Current());
@@ -99,7 +100,8 @@
   ASSERT_TRUE(success_elf);
 
   if (compile) {  // OatWriter strips the code, regenerate to compare
-    compiler_driver_->CompileAll(class_loader, class_linker->GetBootClassPath());
+    TimingLogger timings("CommonTest::WriteRead", false);
+    compiler_driver_->CompileAll(class_loader, class_linker->GetBootClassPath(), timings);
   }
   UniquePtr<OatFile> oat_file(OatFile::Open(tmp.GetFilename(), tmp.GetFilename(), NULL, false));
   ASSERT_TRUE(oat_file.get() != NULL);