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

Unified Diff: runtime/vm/flow_graph_compiler.cc

Issue 2997403002: Disable --deoptimize-every/--stacktrace-every in kernel isolate (Closed)
Patch Set: exclude service isolate as well Created 3 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 | « no previous file | runtime/vm/runtime_entry.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 7a411c9877d31782b26ca037d834528e6c8a2709..4e09f0123149ee21778989038717cc205f3ea60f 100644
--- a/runtime/vm/flow_graph_compiler.cc
+++ b/runtime/vm/flow_graph_compiler.cc
@@ -17,6 +17,7 @@
#include "vm/flow_graph_allocator.h"
#include "vm/il_printer.h"
#include "vm/intrinsifier.h"
+#include "vm/kernel_isolate.h"
#include "vm/locations.h"
#include "vm/log.h"
#include "vm/longjump.h"
@@ -24,6 +25,7 @@
#include "vm/parser.h"
#include "vm/raw_object.h"
#include "vm/resolver.h"
+#include "vm/service_isolate.h"
#include "vm/stack_frame.h"
#include "vm/stub_code.h"
#include "vm/symbols.h"
@@ -301,7 +303,17 @@ bool FlowGraphCompiler::ForceSlowPathForStackOverflow() const {
#if !defined(PRODUCT)
if ((FLAG_stacktrace_every > 0) || (FLAG_deoptimize_every > 0) ||
(isolate()->reload_every_n_stack_overflow_checks() > 0)) {
- return true;
+ bool is_auxiliary_isolate = ServiceIsolate::IsServiceIsolate(isolate());
+#if !defined(DART_PRECOMPILED_RUNTIME)
+ // Certain flags should not effect the kernel isolate itself. They might be
+ // used by tests via the "VMOptions=--..." annotation to test VM
+ // functionality in the main isolate.
+ is_auxiliary_isolate =
+ is_auxiliary_isolate || KernelIsolate::IsKernelIsolate(isolate());
+#endif // !defined(DART_PRECOMPILED_RUNTIME)
+ if (!is_auxiliary_isolate) {
+ return true;
+ }
}
if (FLAG_stacktrace_filter != NULL &&
strstr(parsed_function().function().ToFullyQualifiedCString(),
« no previous file with comments | « no previous file | runtime/vm/runtime_entry.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698