Using histograms for timing statistics.

  Histogram class and test cases added.
  Modified make file to add test cases and class file.
  Added a guard to avoid race condition in Cumulative logger that
  was possible race between Addlogger and Dump() functions.

Change-Id: I060a0d65648c7120963856624e7008c0aa681eb7
diff --git a/src/compiler.cc b/src/compiler.cc
index 48aa335..580da60 100644
--- a/src/compiler.cc
+++ b/src/compiler.cc
@@ -22,6 +22,7 @@
 #include <unistd.h>
 
 #include "base/stl_util.h"
+#include "base/timing_logger.h"
 #include "class_linker.h"
 #include "jni_internal.h"
 #include "oat_compilation_unit.h"
@@ -43,7 +44,6 @@
 #include "ScopedLocalRef.h"
 #include "thread.h"
 #include "thread_pool.h"
-#include "timing_logger.h"
 #include "verifier/method_verifier.h"
 
 #if defined(__APPLE__)
@@ -489,14 +489,14 @@
   DCHECK(!Runtime::Current()->IsStarted());
 
   UniquePtr<ThreadPool> thread_pool(new ThreadPool(thread_count_));
-  TimingLogger timings("compiler");
+  TimingLogger timings("compiler", false);
 
   PreCompile(class_loader, dex_files, *thread_pool.get(), timings);
 
   Compile(class_loader, dex_files, *thread_pool.get(), timings);
 
   if (dump_timings_ && timings.GetTotalNs() > MsToNs(1000)) {
-    timings.Dump();
+    LOG(INFO) << Dumpable<TimingLogger>(timings);
   }
 
   if (dump_stats_) {
@@ -527,7 +527,7 @@
   dex_files.push_back(dex_file);
 
   UniquePtr<ThreadPool> thread_pool(new ThreadPool(1U));
-  TimingLogger timings("CompileOne");
+  TimingLogger timings("CompileOne", false);
   PreCompile(class_loader, dex_files, *thread_pool.get(), timings);
 
   uint32_t method_idx = method->GetDexMethodIndex();