Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(810)

Unified Diff: src/compiler-dispatcher/compiler-dispatcher-tracer.cc

Issue 2618503002: Add a flag for printf debugging the compiler dispatcher (Closed)
Patch Set: updates Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler-dispatcher/compiler-dispatcher-tracer.h ('k') | src/flag-definitions.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « src/compiler-dispatcher/compiler-dispatcher-tracer.h ('k') | src/flag-definitions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698