Index: src/compiler-dispatcher/compiler-dispatcher-tracer.cc |
diff --git a/src/compiler-dispatcher/compiler-dispatcher-tracer.cc b/src/compiler-dispatcher/compiler-dispatcher-tracer.cc |
index 310420a0d51e8d5cae09c0138d3c0c7c0c4ed592..0703e016e98a62984b5e53bfe621832fbc929441 100644 |
--- a/src/compiler-dispatcher/compiler-dispatcher-tracer.cc |
+++ b/src/compiler-dispatcher/compiler-dispatcher-tracer.cc |
@@ -5,6 +5,7 @@ |
#include "src/compiler-dispatcher/compiler-dispatcher-tracer.h" |
#include "src/isolate.h" |
+#include "src/utils.h" |
namespace v8 { |
namespace internal { |
@@ -143,6 +144,17 @@ double CompilerDispatcherTracer::EstimateFinalizeCompilingInMs() const { |
return Average(finalize_compiling_events_); |
} |
+void CompilerDispatcherTracer::DumpStatistics() const { |
+ PrintF( |
+ "CompilerDispatcherTracer: " |
+ "prepare_parsing=%.2lfms parsing=%.2lfms/kb finalize_parsing=%.2lfms " |
+ "prepare_compiling=%.2lfms compiling=%.2lfms/kb " |
+ "finalize_compilig=%.2lfms\n", |
+ EstimatePrepareToParseInMs(), EstimateParseInMs(1 * KB), |
+ EstimateFinalizeParsingInMs(), EstimatePrepareToCompileInMs(), |
+ EstimateCompileInMs(1 * KB), EstimateFinalizeCompilingInMs()); |
+} |
+ |
double CompilerDispatcherTracer::Average( |
const base::RingBuffer<double>& buffer) { |
if (buffer.Count() == 0) return 0.0; |