Index: runtime/vm/intermediate_language_arm.cc |
=================================================================== |
--- runtime/vm/intermediate_language_arm.cc (revision 36530) |
+++ runtime/vm/intermediate_language_arm.cc (working copy) |
@@ -22,6 +22,7 @@ |
namespace dart { |
+DECLARE_FLAG(bool, emit_edge_counters); |
DECLARE_FLAG(int, optimization_counter_threshold); |
DECLARE_FLAG(bool, propagate_ic_data); |
DECLARE_FLAG(bool, use_osr); |
@@ -6175,7 +6176,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 ARM the deoptimization descriptor points after the edge counter |
// code so that we can reuse the same pattern matching code as at call |
@@ -6197,7 +6200,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 ARM this descriptor |
// points after the edge counter code so that we can reuse the same |