Index: runtime/vm/compiler_stats.cc |
diff --git a/runtime/vm/compiler_stats.cc b/runtime/vm/compiler_stats.cc |
index 6448c44effd924b8c8ae5fdf8621f3af7045d348..647f70bf3cd4b6f8a303314e52e0c0169ade106d 100644 |
--- a/runtime/vm/compiler_stats.cc |
+++ b/runtime/vm/compiler_stats.cc |
@@ -10,7 +10,6 @@ |
#include "vm/object_store.h" |
#include "vm/timer.h" |
- |
namespace dart { |
DEFINE_FLAG(bool, compiler_stats, false, "Compiler stat counters."); |
@@ -19,7 +18,6 @@ DEFINE_FLAG(bool, |
false, |
"Compiler stat counters for benchmark."); |
- |
class TokenStreamVisitor : public ObjectVisitor { |
public: |
explicit TokenStreamVisitor(CompilerStats* compiler_stats) |
@@ -48,7 +46,6 @@ class TokenStreamVisitor : public ObjectVisitor { |
CompilerStats* stats_; |
}; |
- |
CompilerStats::CompilerStats(Isolate* isolate) |
: isolate_(isolate), |
#define INITIALIZE_TIMER(timer_name, description) timer_name(true, description), |
@@ -62,10 +59,8 @@ CompilerStats::CompilerStats(Isolate* isolate) |
use_benchmark_output(false) { |
} |
- |
#ifndef PRODUCT |
- |
// Used to aggregate stats. Must be atomic. |
void CompilerStats::Add(const CompilerStats& other) { |
#define ADD_TOTAL(timer_name, literal) timer_name.AddTotal(other.timer_name); |
@@ -80,7 +75,6 @@ void CompilerStats::Add(const CompilerStats& other) { |
#undef ADD_COUNTER |
} |
- |
void CompilerStats::Clear() { |
#define CLEAR_TIMER(timer_name, literal) timer_name.Reset(); |
@@ -93,7 +87,6 @@ void CompilerStats::Clear() { |
#undef CLEAR_COUNTER |
} |
- |
bool CompilerStats::IsCleared() const { |
#define CHECK_TIMERS(timer_name, literal) \ |
if (!timer_name.IsReset()) return false; |
@@ -109,7 +102,6 @@ bool CompilerStats::IsCleared() const { |
return true; |
} |
- |
// This function is used as a callback in the log object to which the |
// compiler stats are printed. It will be called only once, to print |
// the accumulated text when all of the compiler stats values are |
@@ -127,7 +119,6 @@ static void PrintToStats(const char* format, ...) { |
va_end(args); |
} |
- |
void CompilerStats::Update() { |
// Traverse the heap and compute number of tokens in all |
// TokenStream objects. |
@@ -137,13 +128,11 @@ void CompilerStats::Update() { |
Dart::vm_isolate()->heap()->IterateObjects(&visitor); |
} |
- |
void CompilerStats::EnableBenchmark() { |
FLAG_compiler_stats = true; |
use_benchmark_output = true; |
} |
- |
// Generate output for Golem benchmark harness. If the output format |
// changes, the parsing function in Golem must be updated. |
char* CompilerStats::BenchmarkOutput() { |
@@ -198,7 +187,6 @@ char* CompilerStats::BenchmarkOutput() { |
return benchmark_text; |
} |
- |
char* CompilerStats::PrintToZone() { |
if (!FLAG_compiler_stats) { |
return NULL; |