Skip to content

Commit

Permalink
[vm] Read causal-async-stacks/lazy-async-stacks from snapshot (instea…
Browse files Browse the repository at this point in the history
…d 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 #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>
  • Loading branch information
mkustermann authored and commit-bot@chromium.org committed Jan 6, 2020
1 parent 21e3580 commit 1669769
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
10 changes: 2 additions & 8 deletions runtime/vm/dart.cc
Original file line number Diff line number Diff line change
Expand Up @@ -843,18 +843,16 @@ const char* Dart::FeaturesString(Isolate* isolate,
ADD_FLAG(#name, value); \
} while (0);

VM_GLOBAL_FLAG_LIST(ADD_FLAG);
if (Snapshot::IncludesCode(kind)) {
VM_GLOBAL_FLAG_LIST(ADD_FLAG);

// enabling assertions affects deopt ids.
ADD_ISOLATE_FLAG(asserts, enable_asserts, FLAG_enable_asserts);
if (kind == Snapshot::kFullJIT) {
ADD_ISOLATE_FLAG(use_field_guards, use_field_guards,
FLAG_use_field_guards);
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)
buffer.AddString(FLAG_code_comments ? " code-comments"
: " no-code-comments");
Expand Down Expand Up @@ -890,10 +888,6 @@ const char* Dart::FeaturesString(Isolate* isolate,
#endif
}

if (FLAG_precompiled_mode && FLAG_dwarf_stack_traces) {
buffer.AddString(" dwarf-stack-traces");
}

if (Dart::non_nullable_flag()) {
buffer.AddString(" nnbd-experiment");
}
Expand Down
2 changes: 2 additions & 0 deletions runtime/vm/flag_list.h
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,8 @@ constexpr bool kDartUseBackgroundCompilation = true;
// V(name, command-line-flag-name)
#define VM_GLOBAL_FLAG_LIST(V) \
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)

#endif // RUNTIME_VM_FLAG_LIST_H_

0 comments on commit 1669769

Please sign in to comment.