Index: src/compiler.cc |
=================================================================== |
--- src/compiler.cc (revision 5946) |
+++ src/compiler.cc (working copy) |
@@ -113,6 +113,10 @@ |
} |
+static double compilation_time_; |
Kasper Lund
2010/12/08 14:54:15
Convert these to statics inside the if (FLAG_trace
|
+static int compiled_functions_; |
+static int code_size_; |
+ |
static void FinishOptimization(Handle<JSFunction> function, int64_t start) { |
int opt_count = function->shared()->opt_count(); |
function->shared()->set_opt_count(opt_count + 1); |
@@ -123,6 +127,16 @@ |
function->PrintName(); |
PrintF(" / %" V8PRIxPTR, reinterpret_cast<intptr_t>(*function)); |
PrintF(" - took %0.3f ms]\n", ms); |
+ |
+ compilation_time_ += ms; |
+ compiled_functions_++; |
+ code_size_ += function->shared()->SourceSize(); |
+ if (FLAG_trace_opt) { |
+ PrintF("Compiled: %d functions with %d byte source size in %fms.\n", |
+ compiled_functions_, |
+ code_size_, |
+ compilation_time_); |
+ } |
} |