Index: runtime/vm/intermediate_language_arm64.cc |
=================================================================== |
--- runtime/vm/intermediate_language_arm64.cc (revision 36530) |
+++ runtime/vm/intermediate_language_arm64.cc (working copy) |
@@ -21,6 +21,7 @@ |
namespace dart { |
+DECLARE_FLAG(bool, emit_edge_counters); |
DECLARE_FLAG(int, optimization_counter_threshold); |
DECLARE_FLAG(bool, use_osr); |
@@ -4666,7 +4667,9 @@ |
void TargetEntryInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
__ Bind(compiler->GetJumpLabel(this)); |
if (!compiler->is_optimizing()) { |
- compiler->EmitEdgeCounter(); |
+ if (FLAG_emit_edge_counters) { |
+ compiler->EmitEdgeCounter(); |
+ } |
// Add an edge counter. |
// On ARM64 the deoptimization descriptor points after the edge counter |
// code so that we can reuse the same pattern matching code as at call |
@@ -4688,7 +4691,9 @@ |
void GotoInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
if (!compiler->is_optimizing()) { |
- compiler->EmitEdgeCounter(); |
+ if (FLAG_emit_edge_counters) { |
+ compiler->EmitEdgeCounter(); |
+ } |
// Add a deoptimization descriptor for deoptimizing instructions that |
// may be inserted before this instruction. On ARM64 this descriptor |
// points after the edge counter code so that we can reuse the same |