Index: runtime/vm/flow_graph_compiler.h |
diff --git a/runtime/vm/flow_graph_compiler.h b/runtime/vm/flow_graph_compiler.h |
index afdb4cb0a7bff56de4f7de68e5c6c1d5debc03e6..0d0b1f0e453fc0e674fc97611ed7e3856be95faa 100644 |
--- a/runtime/vm/flow_graph_compiler.h |
+++ b/runtime/vm/flow_graph_compiler.h |
@@ -10,6 +10,7 @@ |
#include "vm/code_descriptors.h" |
#include "vm/code_generator.h" |
#include "vm/intermediate_language.h" |
+#include "vm/code_statistics.h" |
namespace dart { |
@@ -268,7 +269,8 @@ class FlowGraphCompiler : public ValueObject { |
bool is_optimizing, |
const GrowableArray<const Function*>& inline_id_to_function, |
const GrowableArray<TokenPosition>& inline_id_to_token_pos, |
- const GrowableArray<intptr_t>& caller_inline_id); |
+ const GrowableArray<intptr_t>& caller_inline_id, |
+ CodeStatistics* stats = NULL); |
~FlowGraphCompiler(); |
@@ -312,6 +314,22 @@ class FlowGraphCompiler : public ValueObject { |
return ¶llel_move_resolver_; |
} |
+ void StatsBegin(Instruction* instr) { |
+ if (stats_ != NULL) stats_->Begin(instr); |
+ } |
+ |
+ void StatsEnd(Instruction* instr) { |
+ if (stats_ != NULL) stats_->End(instr); |
+ } |
+ |
+ void SpecialStatsBegin(intptr_t tag) { |
+ if (stats_ != NULL) stats_->SpecialBegin(tag); |
+ } |
+ |
+ void SpecialStatsEnd(intptr_t tag) { |
+ if (stats_ != NULL) stats_->SpecialEnd(tag); |
+ } |
+ |
// Constructor is lighweight, major initialization work should occur here. |
// This makes it easier to measure time spent in the compiler. |
void InitCompiler(); |
@@ -792,6 +810,7 @@ class FlowGraphCompiler : public ValueObject { |
const GrowableArray<const Function*>& inline_id_to_function_; |
const GrowableArray<TokenPosition>& inline_id_to_token_pos_; |
const GrowableArray<intptr_t>& caller_inline_id_; |
+ CodeStatistics* stats_; |
DISALLOW_COPY_AND_ASSIGN(FlowGraphCompiler); |
}; |