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

Unified Diff: runtime/vm/flow_graph_compiler_x64.cc

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/flow_graph_compiler_arm.cc ('k') | runtime/vm/intermediate_language.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_compiler_x64.cc
diff --git a/runtime/vm/flow_graph_compiler_x64.cc b/runtime/vm/flow_graph_compiler_x64.cc
index 0944b5e58255808ac1e74c3d3ef734f1ef2e06eb..6738ed1c1cd4b4c2cec84d4887ea7838a0139252 100644
--- a/runtime/vm/flow_graph_compiler_x64.cc
+++ b/runtime/vm/flow_graph_compiler_x64.cc
@@ -19,6 +19,7 @@
#include "vm/stack_frame.h"
#include "vm/stub_code.h"
#include "vm/symbols.h"
+#include "vm/code_statistics.h"
namespace dart {
@@ -982,7 +983,9 @@ void FlowGraphCompiler::CompileGraph() {
#ifdef DART_PRECOMPILER
if (function.IsDynamicFunction()) {
+ SpecialStatsBegin(CombinedCodeStatistics::kTagCheckedEntry);
__ MonomorphicCheckedEntry();
+ SpecialStatsEnd(CombinedCodeStatistics::kTagCheckedEntry);
}
#endif // DART_PRECOMPILER
@@ -991,7 +994,9 @@ void FlowGraphCompiler::CompileGraph() {
return;
}
+ SpecialStatsBegin(CombinedCodeStatistics::kTagFrameEntry);
EmitFrameEntry();
+ SpecialStatsEnd(CombinedCodeStatistics::kTagFrameEntry);
ASSERT(assembler()->constant_pool_allowed());
const int num_fixed_params = function.num_fixed_parameters();
@@ -1007,6 +1012,7 @@ void FlowGraphCompiler::CompileGraph() {
function.IsClosureFunction() && !flow_graph().IsCompiledForOsr();
if (check_arguments) {
__ Comment("Check argument count");
+ SpecialStatsBegin(CombinedCodeStatistics::kTagCheckArgumentCount);
// Check that exactly num_fixed arguments are passed in.
Label correct_num_arguments, wrong_num_arguments;
__ movq(RAX, FieldAddress(R10, ArgumentsDescriptor::count_offset()));
@@ -1021,12 +1027,16 @@ void FlowGraphCompiler::CompileGraph() {
__ Jmp(*StubCode::CallClosureNoSuchMethod_entry());
// The noSuchMethod call may return to the caller, but not here.
__ Bind(&correct_num_arguments);
+ SpecialStatsEnd(CombinedCodeStatistics::kTagCheckArgumentCount);
}
} else if (!flow_graph().IsCompiledForOsr()) {
+ SpecialStatsBegin(CombinedCodeStatistics::kTagCopyParameters);
CopyParameters();
+ SpecialStatsEnd(CombinedCodeStatistics::kTagCopyParameters);
}
if (function.IsClosureFunction() && !flow_graph().IsCompiledForOsr()) {
+ SpecialStatsBegin(CombinedCodeStatistics::kTagLoadClosureContext);
// Load context from the closure object (first argument).
LocalScope* scope = parsed_function().node_sequence()->scope();
LocalVariable* closure_parameter = scope->VariableAt(0);
@@ -1040,6 +1050,7 @@ void FlowGraphCompiler::CompileGraph() {
__ Stop("Incorrect context at entry");
__ Bind(&ok);
#endif
+ SpecialStatsEnd(CombinedCodeStatistics::kTagLoadClosureContext);
}
// In unoptimized code, initialize (non-argument) stack allocated slots to
@@ -1075,7 +1086,10 @@ void FlowGraphCompiler::CompileGraph() {
ASSERT(!block_order().is_empty());
VisitBlocks();
+ SpecialStatsBegin(CombinedCodeStatistics::kDebugAfterBody);
__ int3();
+ SpecialStatsEnd(CombinedCodeStatistics::kDebugAfterBody);
+
ASSERT(assembler()->constant_pool_allowed());
GenerateDeferredCode();
}
« no previous file with comments | « runtime/vm/flow_graph_compiler_arm.cc ('k') | runtime/vm/intermediate_language.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698