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

Unified Diff: runtime/vm/flow_graph_compiler_arm.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.cc ('k') | runtime/vm/flow_graph_compiler_x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_compiler_arm.cc
diff --git a/runtime/vm/flow_graph_compiler_arm.cc b/runtime/vm/flow_graph_compiler_arm.cc
index 4e613061b79c18a8b2bd186f0460abe07fe75737..9255378f544245b59e770d85dad731980a5616f3 100644
--- a/runtime/vm/flow_graph_compiler_arm.cc
+++ b/runtime/vm/flow_graph_compiler_arm.cc
@@ -20,6 +20,7 @@
#include "vm/stack_frame.h"
#include "vm/stub_code.h"
#include "vm/symbols.h"
+#include "vm/code_statistics.h"
namespace dart {
@@ -990,7 +991,9 @@ void FlowGraphCompiler::CompileGraph() {
#ifdef DART_PRECOMPILER
if (function.IsDynamicFunction()) {
+ SpecialStatsBegin(CombinedCodeStatistics::kTagCheckedEntry);
__ MonomorphicCheckedEntry();
+ SpecialStatsEnd(CombinedCodeStatistics::kTagCheckedEntry);
}
#endif // DART_PRECOMPILER
@@ -999,7 +1002,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();
@@ -1015,6 +1020,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;
__ ldr(R0, FieldAddress(R4, ArgumentsDescriptor::count_offset()));
@@ -1030,17 +1036,22 @@ void FlowGraphCompiler::CompileGraph() {
__ Branch(*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);
__ ldr(CTX, Address(FP, closure_parameter->index() * kWordSize));
__ ldr(CTX, FieldAddress(CTX, Closure::context_offset()));
+ SpecialStatsEnd(CombinedCodeStatistics::kTagLoadClosureContext);
}
// In unoptimized code, initialize (non-argument) stack allocated slots to
« no previous file with comments | « runtime/vm/flow_graph_compiler.cc ('k') | runtime/vm/flow_graph_compiler_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698