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

Unified Diff: runtime/vm/flow_graph_compiler_x64.cc

Issue 501553005: Scale invocation count by the number of BBs in the flow-graph of a method. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Cleanup Created 6 years, 4 months 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_mips.cc ('k') | no next file » | 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 d0c60c91995477ba7ec68f7b5c34c2fc9efa51d1..8b41b844e070969c03c143a7baac6211cd4e774d 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,18 +1004,14 @@ void FlowGraphCompiler::EmitFrameEntry() {
// Patch point is after the eventually inlined function object.
entry_patch_pc_offset_ = assembler()->CodeSize();
- if (is_optimizing()) {
- // 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));
- } else {
+ // Reoptimization of an optimized function is triggered by counting in
+ // IC stubs, but not at the entry of the function.
+ if (!is_optimizing()) {
__ incl(FieldAddress(function_reg, Function::usage_counter_offset()));
- __ cmpl(
- FieldAddress(function_reg, Function::usage_counter_offset()),
- Immediate(FLAG_optimization_counter_threshold));
}
+ __ cmpl(
+ FieldAddress(function_reg, Function::usage_counter_offset()),
+ Immediate(GetOptimizationThreshold()));
ASSERT(function_reg == RDI);
__ J(GREATER_EQUAL, &stub_code->OptimizeFunctionLabel(), R13);
} else if (!flow_graph().IsCompiledForOsr()) {
« no previous file with comments | « runtime/vm/flow_graph_compiler_mips.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698