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

Unified Diff: runtime/vm/flow_graph_compiler_arm.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: Refactor and port to archs. 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
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 1bb28294528eff35bd122d7a013c7748ff16396a..1281c47bcf8365643cbaeb2f97187f2bce3b051d 100644
--- a/runtime/vm/flow_graph_compiler_arm.cc
+++ b/runtime/vm/flow_graph_compiler_arm.cc
@@ -25,8 +25,6 @@ namespace dart {
DEFINE_FLAG(bool, trap_on_deoptimization, false, "Trap on deoptimization.");
DEFINE_FLAG(bool, unbox_mints, true, "Optimize 64-bit integer arithmetic.");
DEFINE_FLAG(bool, unbox_doubles, true, "Optimize double arithmetic.");
-DECLARE_FLAG(int, optimization_counter_threshold);
-DECLARE_FLAG(int, reoptimization_counter_threshold);
DECLARE_FLAG(bool, enable_type_checks);
DECLARE_FLAG(bool, enable_simd_inline);
@@ -979,13 +977,12 @@ void FlowGraphCompiler::EmitFrameEntry() {
// Patch point is after the eventually inlined function object.
entry_patch_pc_offset_ = assembler()->CodeSize();
- intptr_t threshold = FLAG_optimization_counter_threshold;
+ const intptr_t threshold = GetOptimizationThreshold();;
__ ldr(R7, FieldAddress(function_reg,
Function::usage_counter_offset()));
if (is_optimizing()) {
// Reoptimization of an optimized function is triggered by counting in
// IC stubs, but not at the entry of the function.
- threshold = FLAG_reoptimization_counter_threshold;
} else {
Vyacheslav Egorov (Google) 2014/08/29 11:17:18 else -> if (!is_optimizing()) move comment above i
Anders Johnsen 2014/08/29 11:56:28 Done.
__ add(R7, R7, Operand(1));
__ str(R7, FieldAddress(function_reg,

Powered by Google App Engine
This is Rietveld 408576698