Chromium Code Reviews| 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 d0c60c91995477ba7ec68f7b5c34c2fc9efa51d1..ddbb8ac7aeb5e9ab2a18c9e677edf4e853b7e53f 100644 |
| --- a/runtime/vm/flow_graph_compiler_x64.cc |
| +++ b/runtime/vm/flow_graph_compiler_x64.cc |
| @@ -22,8 +22,6 @@ |
| namespace dart { |
| DEFINE_FLAG(bool, trap_on_deoptimization, false, "Trap on deoptimization."); |
| -DECLARE_FLAG(int, optimization_counter_threshold); |
| -DECLARE_FLAG(int, reoptimization_counter_threshold); |
| DECLARE_FLAG(bool, enable_type_checks); |
| DECLARE_FLAG(bool, enable_simd_inline); |
| @@ -1006,17 +1004,18 @@ void FlowGraphCompiler::EmitFrameEntry() { |
| // Patch point is after the eventually inlined function object. |
| entry_patch_pc_offset_ = assembler()->CodeSize(); |
| + const int threshold = GetOptimizationThreshold(); |
| if (is_optimizing()) { |
|
Vyacheslav Egorov (Google)
2014/08/29 11:17:18
ditto like on ia32
Anders Johnsen
2014/08/29 11:56:28
Done.
|
| // Reoptimization of an optimized function is triggered by counting in |
| // IC stubs, but not at the entry of the function. |
| __ cmpl( |
| FieldAddress(function_reg, Function::usage_counter_offset()), |
| - Immediate(FLAG_reoptimization_counter_threshold)); |
| + Immediate(threshold)); |
| } else { |
| __ incl(FieldAddress(function_reg, Function::usage_counter_offset())); |
| __ cmpl( |
| FieldAddress(function_reg, Function::usage_counter_offset()), |
| - Immediate(FLAG_optimization_counter_threshold)); |
| + Immediate(threshold)); |
| } |
| ASSERT(function_reg == RDI); |
| __ J(GREATER_EQUAL, &stub_code->OptimizeFunctionLabel(), R13); |