Index: runtime/vm/code_generator.cc |
diff --git a/runtime/vm/code_generator.cc b/runtime/vm/code_generator.cc |
index 455d2a5ce319b8e6a15a3d963106f831946bb238..4b572a7cdf8b9258e0c4fbb0736ca30285d25818 100644 |
--- a/runtime/vm/code_generator.cc |
+++ b/runtime/vm/code_generator.cc |
@@ -63,6 +63,7 @@ DEFINE_FLAG(charp, deoptimize_filter, NULL, |
DECLARE_FLAG(int, reload_every); |
DECLARE_FLAG(bool, reload_every_optimized); |
+DECLARE_FLAG(bool, reload_every_back_off); |
#ifdef DEBUG |
DEFINE_FLAG(charp, gc_at_instance_allocation, NULL, |
@@ -1296,6 +1297,9 @@ DEFINE_RUNTIME_ENTRY(StackOverflow, 0) { |
DeoptimizeFunctionsOnStack(); |
} |
if (do_reload) { |
+ if (FLAG_reload_every_back_off) { |
+ FLAG_reload_every *= 2; |
+ } |
NOT_IN_PRODUCT(isolate->ReloadSources();) |
} |
if (FLAG_support_debugger && do_stacktrace) { |