Skip to content

Commit 06fef5e

Browse files
author
Clement Skau
authored
Enable lazy-async-stacks by-default in all modes (2) (flutter#19270)
1 parent 36c5f60 commit 06fef5e

File tree

10 files changed

+17
-16
lines changed

10 files changed

+17
-16
lines changed

runtime/dart_vm.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@ static const char* kDartLanguageArgs[] = {
6060
// clang-format off
6161
"--enable_mirrors=false",
6262
"--background_compilation",
63-
"--causal_async_stacks",
63+
"--no-causal_async_stacks",
64+
"--lazy_async_stacks",
6465
// clang-format on
6566
};
6667

shell/common/shell_unittests.cc

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -285,16 +285,19 @@ TEST_F(ShellTest, AllowedDartVMFlag) {
285285
const std::vector<fml::CommandLine::Option> options = {
286286
#if !FLUTTER_RELEASE
287287
fml::CommandLine::Option("dart-flags",
288+
"--lazy_async_stacks,--no-causal_async_stacks,"
288289
"--max_profile_depth 1,--random_seed 42")
289290
#endif
290291
};
291292
fml::CommandLine command_line("", options, std::vector<std::string>());
292293
flutter::Settings settings = flutter::SettingsFromCommandLine(command_line);
293294

294295
#if !FLUTTER_RELEASE
295-
EXPECT_EQ(settings.dart_flags.size(), 2u);
296-
EXPECT_EQ(settings.dart_flags[0], "--max_profile_depth 1");
297-
EXPECT_EQ(settings.dart_flags[1], "--random_seed 42");
296+
EXPECT_EQ(settings.dart_flags.size(), 4u);
297+
EXPECT_EQ(settings.dart_flags[0], "--lazy_async_stacks");
298+
EXPECT_EQ(settings.dart_flags[1], "--no-causal_async_stacks");
299+
EXPECT_EQ(settings.dart_flags[2], "--max_profile_depth 1");
300+
EXPECT_EQ(settings.dart_flags[3], "--random_seed 42");
298301
#else
299302
EXPECT_EQ(settings.dart_flags.size(), 0u);
300303
#endif

shell/platform/fuchsia/dart_runner/dart_runner.cc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,8 @@ namespace {
3535

3636
const char* kDartVMArgs[] = {
3737
// clang-format off
38-
// TODO(FL-117): Re-enable causal async stack traces when this issue is
39-
// addressed.
4038
"--no_causal_async_stacks",
39+
"--lazy_async_stacks",
4140

4241
#if !defined(FLUTTER_PROFILE)
4342
"--systrace_timeline",

shell/platform/fuchsia/dart_runner/embedder/BUILD.gn

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ template("create_aot_snapshot") {
5353

5454
args = [
5555
"--no_causal_async_stacks",
56+
"--lazy_async_stacks",
5657
"--deterministic",
5758
"--snapshot_kind=vm-aot-assembly",
5859
"--assembly=" + rebase_path(snapshot_assembly),

shell/platform/fuchsia/dart_runner/kernel/BUILD.gn

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,8 @@ template("create_kernel_core_snapshot") {
7474
tool = gen_snapshot_to_use
7575

7676
args = [
77-
# TODO(FL-117): Re-enable causal async stack traces when this issue is
78-
# addressed.
7977
"--no_causal_async_stacks",
78+
"--lazy_async_stacks",
8079
"--use_bytecode_compiler",
8180
"--enable_mirrors=false",
8281
"--deterministic",

shell/platform/fuchsia/dart_runner/vmservice/BUILD.gn

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ template("aot_snapshot") {
6464

6565
args = [
6666
"--no_causal_async_stacks",
67+
"--lazy_async_stacks",
6768
"--deterministic",
6869
"--snapshot_kind=app-aot-elf",
6970
"--elf=" + rebase_path(snapshot_path),

shell/platform/fuchsia/flutter/component.cc

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -392,10 +392,6 @@ Application::Application(
392392
settings_.task_observer_remove = std::bind(
393393
&CurrentMessageLoopRemoveAfterTaskObserver, std::placeholders::_1);
394394

395-
// TODO(FL-117): Re-enable causal async stack traces when this issue is
396-
// addressed.
397-
settings_.dart_flags = {"--no_causal_async_stacks"};
398-
399395
// Disable code collection as it interferes with JIT code warmup
400396
// by decreasing usage counters and flushing code which is still useful.
401397
settings_.dart_flags.push_back("--no-collect_code");

shell/platform/fuchsia/flutter/kernel/BUILD.gn

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,8 @@ template("core_snapshot") {
7878
tool = gen_snapshot_to_use
7979

8080
args = [
81-
# TODO(FL-117): Re-enable causal async stack traces when this issue is
82-
# addressed.
8381
"--no_causal_async_stacks",
82+
"--lazy_async_stacks",
8483
"--use_bytecode_compiler",
8584
"--enable_mirrors=false",
8685
"--deterministic",

testing/scenario_app/compile_ios_jit.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ echo "Compiling JIT Snapshot..."
4848

4949
"$DEVICE_TOOLS/gen_snapshot" --deterministic \
5050
--enable-asserts \
51-
--causal_async_stacks \
51+
--no-causal_async_stacks \
52+
--lazy_async_stacks \
5253
--isolate_snapshot_instructions="$OUTDIR/isolate_snapshot_instr" \
5354
--snapshot_kind=app-jit \
5455
--load_vm_snapshot_data="$DEVICE_TOOLS/../gen/flutter/lib/snapshot/vm_isolate_snapshot.bin" \

testing/testing.gni

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,8 @@ template("dart_snapshot_aot") {
138138
]
139139

140140
args = [
141-
"--causal_async_stacks",
141+
"--no-causal_async_stacks",
142+
"--lazy_async_stacks",
142143
"--deterministic",
143144
"--snapshot_kind=app-aot-elf",
144145
"--elf=" + rebase_path(elf_object),

0 commit comments

Comments
 (0)