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

Unified Diff: runtime/vm/flow_graph_compiler.h

Issue 2584613002: PATCH (not to be comitted): Support for printing instruction statistics
Patch Set: Fixed polymorphic call inside try, added more tags for remaining unknown code Created 4 years 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 | « runtime/vm/code_statistics.cc ('k') | runtime/vm/flow_graph_compiler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 &parallel_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);
};
« no previous file with comments | « runtime/vm/code_statistics.cc ('k') | runtime/vm/flow_graph_compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698