[vm] Read causal-async-stacks/lazy-async-stacks from snapshot (instead of requiring AOT runtime to pass same flags as in compiler)

We already do this for "use-bare-instructions" and "dwarf-stack-traces". This
CL does the same for "causal-async-stacks" and "lazy-async-stacks".

Issue https://github.com/dart-lang/sdk/issues/39525

Change-Id: I44136299858b3b72e8a3a176234f5051d6b61c1d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/130364
Reviewed-by: Teagan Strickland <sstrickl@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
This commit is contained in:
Martin Kustermann 2020-01-06 12:15:59 +00:00 committed by commit-bot@chromium.org
parent 21e3580519
commit 16697697d4
2 changed files with 4 additions and 8 deletions

View file

@ -843,8 +843,9 @@ const char* Dart::FeaturesString(Isolate* isolate,
ADD_FLAG(#name, value); \ ADD_FLAG(#name, value); \
} while (0); } while (0);
VM_GLOBAL_FLAG_LIST(ADD_FLAG);
if (Snapshot::IncludesCode(kind)) { if (Snapshot::IncludesCode(kind)) {
VM_GLOBAL_FLAG_LIST(ADD_FLAG);
// enabling assertions affects deopt ids. // enabling assertions affects deopt ids.
ADD_ISOLATE_FLAG(asserts, enable_asserts, FLAG_enable_asserts); ADD_ISOLATE_FLAG(asserts, enable_asserts, FLAG_enable_asserts);
if (kind == Snapshot::kFullJIT) { if (kind == Snapshot::kFullJIT) {
@ -852,9 +853,6 @@ const char* Dart::FeaturesString(Isolate* isolate,
FLAG_use_field_guards); FLAG_use_field_guards);
ADD_ISOLATE_FLAG(use_osr, use_osr, FLAG_use_osr); ADD_ISOLATE_FLAG(use_osr, use_osr, FLAG_use_osr);
} }
buffer.AddString(FLAG_causal_async_stacks ? " causal_async_stacks"
: " no-causal_async_stacks");
#if !defined(PRODUCT) #if !defined(PRODUCT)
buffer.AddString(FLAG_code_comments ? " code-comments" buffer.AddString(FLAG_code_comments ? " code-comments"
: " no-code-comments"); : " no-code-comments");
@ -890,10 +888,6 @@ const char* Dart::FeaturesString(Isolate* isolate,
#endif #endif
} }
if (FLAG_precompiled_mode && FLAG_dwarf_stack_traces) {
buffer.AddString(" dwarf-stack-traces");
}
if (Dart::non_nullable_flag()) { if (Dart::non_nullable_flag()) {
buffer.AddString(" nnbd-experiment"); buffer.AddString(" nnbd-experiment");
} }

View file

@ -250,6 +250,8 @@ constexpr bool kDartUseBackgroundCompilation = true;
// V(name, command-line-flag-name) // V(name, command-line-flag-name)
#define VM_GLOBAL_FLAG_LIST(V) \ #define VM_GLOBAL_FLAG_LIST(V) \
V(dwarf_stack_traces, FLAG_dwarf_stack_traces) \ V(dwarf_stack_traces, FLAG_dwarf_stack_traces) \
V(causal_async_stacks, FLAG_causal_async_stacks) \
V(lazy_async_stacks, FLAG_lazy_async_stacks) \
V(use_bare_instructions, FLAG_use_bare_instructions) V(use_bare_instructions, FLAG_use_bare_instructions)
#endif // RUNTIME_VM_FLAG_LIST_H_ #endif // RUNTIME_VM_FLAG_LIST_H_