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

Unified Diff: runtime/vm/flow_graph_compiler.cc

Issue 226543007: Implement new stacktrace and deoptimization stress testing flags: (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 3rd times a charm Created 6 years, 8 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.h ('k') | runtime/vm/intermediate_language_arm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_compiler.cc
diff --git a/runtime/vm/flow_graph_compiler.cc b/runtime/vm/flow_graph_compiler.cc
index 5ba1ab79c7963a5158cdf53abdb5b5d82311a500..845c7fffd060a02e39a37a4a5711785150b5efdb 100644
--- a/runtime/vm/flow_graph_compiler.cc
+++ b/runtime/vm/flow_graph_compiler.cc
@@ -33,10 +33,13 @@ DECLARE_FLAG(bool, report_usage_count);
DECLARE_FLAG(int, optimization_counter_threshold);
DECLARE_FLAG(bool, use_cha);
DECLARE_FLAG(bool, use_osr);
+DECLARE_FLAG(int, stacktrace_every);
+DECLARE_FLAG(charp, stacktrace_filter);
+DECLARE_FLAG(int, deoptimize_every);
+DECLARE_FLAG(charp, deoptimize_filter);
+
DEFINE_FLAG(bool, enable_simd_inline, true,
"Enable inlining of SIMD related method calls.");
-DEFINE_FLAG(charp, deoptimize_filter, NULL,
- "Force deoptimization in named function");
// Assign locations to incoming arguments, i.e., values pushed above spill slots
// with PushArgument. Recursively allocates from outermost to innermost
@@ -171,11 +174,22 @@ bool FlowGraphCompiler::CanOSRFunction() const {
}
-bool FlowGraphCompiler::ShouldDeoptimizeFunction() const {
- return (is_optimizing() &&
- (FLAG_deoptimize_filter != NULL) &&
- (strstr(parsed_function().function().ToFullyQualifiedCString(),
- FLAG_deoptimize_filter) != NULL));
+bool FlowGraphCompiler::ForceSlowPathForStackOverflow() const {
+ if (FLAG_stacktrace_every > 0 || FLAG_deoptimize_every > 0) {
+ return true;
+ }
+ if (FLAG_stacktrace_filter != NULL &&
+ strstr(parsed_function().function().ToFullyQualifiedCString(),
+ FLAG_stacktrace_filter) != NULL) {
+ return true;
+ }
+ if (is_optimizing() &&
+ FLAG_deoptimize_filter != NULL &&
+ strstr(parsed_function().function().ToFullyQualifiedCString(),
+ FLAG_deoptimize_filter) != NULL) {
+ return true;
+ }
+ return false;
}
« no previous file with comments | « runtime/vm/flow_graph_compiler.h ('k') | runtime/vm/intermediate_language_arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698