From fde57f1f1d33ed6ed58a45c5d95e7671ee0a225d Mon Sep 17 00:00:00 2001 From: Martin Kustermann Date: Wed, 23 Jun 2021 14:30:26 +0200 Subject: [PATCH] Remove usages of --no-causal-async-stacks (flutter/engine#26877) Passing the --causal-async-stacks flag to the VM will cause it to error on VM startup. The VM will remove the flag entirely, but before doing so we'll have to remove usages of the negated version of the flag, namely --no-causal-async-stacks. --- engine/src/flutter/lib/snapshot/BUILD.gn | 2 -- engine/src/flutter/runtime/dart_vm.cc | 1 - engine/src/flutter/shell/common/shell_unittests.cc | 1 - engine/src/flutter/shell/common/switches.cc | 2 -- .../flutter/shell/platform/fuchsia/dart_runner/dart_runner.cc | 1 - .../shell/platform/fuchsia/dart_runner/embedder/BUILD.gn | 1 - .../flutter/shell/platform/fuchsia/dart_runner/kernel/BUILD.gn | 1 - .../shell/platform/fuchsia/dart_runner/vmservice/BUILD.gn | 1 - engine/src/flutter/shell/platform/fuchsia/flutter/component.cc | 2 +- .../src/flutter/shell/platform/fuchsia/flutter/kernel/BUILD.gn | 1 - engine/src/flutter/testing/scenario_app/compile_android_jit.sh | 1 - engine/src/flutter/testing/scenario_app/compile_ios_jit.sh | 1 - engine/src/flutter/testing/testing.gni | 1 - 13 files changed, 1 insertion(+), 15 deletions(-) diff --git a/engine/src/flutter/lib/snapshot/BUILD.gn b/engine/src/flutter/lib/snapshot/BUILD.gn index 7db1377e18..f7c2346c53 100644 --- a/engine/src/flutter/lib/snapshot/BUILD.gn +++ b/engine/src/flutter/lib/snapshot/BUILD.gn @@ -255,13 +255,11 @@ compile_platform("strong_platform") { is_runtime_mode_release = flutter_runtime_mode == "release" || flutter_runtime_mode == "jit_release" - allow_causal_async_stacks = !is_runtime_mode_release args = [ "--enable-experiment=non-nullable", "--nnbd-agnostic", "--target=flutter", "-Ddart.vm.product=$is_runtime_mode_release", - "-Ddart.developer.causal_async_stacks=$allow_causal_async_stacks", "-Ddart.isVM=true", "dart:core", ] diff --git a/engine/src/flutter/runtime/dart_vm.cc b/engine/src/flutter/runtime/dart_vm.cc index 0beb81259c..574b0eae65 100644 --- a/engine/src/flutter/runtime/dart_vm.cc +++ b/engine/src/flutter/runtime/dart_vm.cc @@ -60,7 +60,6 @@ static const char* kDartLanguageArgs[] = { // clang-format off "--enable_mirrors=false", "--background_compilation", - "--no-causal_async_stacks", "--lazy_async_stacks", // clang-format on }; diff --git a/engine/src/flutter/shell/common/shell_unittests.cc b/engine/src/flutter/shell/common/shell_unittests.cc index 2e90515b80..221d32f3eb 100644 --- a/engine/src/flutter/shell/common/shell_unittests.cc +++ b/engine/src/flutter/shell/common/shell_unittests.cc @@ -457,7 +457,6 @@ TEST_F(ShellTest, AllowedDartVMFlag) { "--enable-isolate-groups", "--no-enable-isolate-groups", "--lazy_async_stacks", - "--no-causal_async_stacks", }; #if !FLUTTER_RELEASE flags.push_back("--max_profile_depth 1"); diff --git a/engine/src/flutter/shell/common/switches.cc b/engine/src/flutter/shell/common/switches.cc index c5b9b70b1d..249e9c5d8d 100644 --- a/engine/src/flutter/shell/common/switches.cc +++ b/engine/src/flutter/shell/common/switches.cc @@ -43,7 +43,6 @@ struct SwitchDesc { static const std::string gAllowedDartFlags[] = { "--enable-isolate-groups", "--no-enable-isolate-groups", - "--no-causal_async_stacks", "--lazy_async_stacks", }; // clang-format on @@ -58,7 +57,6 @@ static const std::string gAllowedDartFlags[] = { "--enable-service-port-fallback", "--lazy_async_stacks", "--max_profile_depth", - "--no-causal_async_stacks", "--profile_period", "--random_seed", "--sample-buffer-duration", diff --git a/engine/src/flutter/shell/platform/fuchsia/dart_runner/dart_runner.cc b/engine/src/flutter/shell/platform/fuchsia/dart_runner/dart_runner.cc index 2a87776cb4..bfcb00391e 100644 --- a/engine/src/flutter/shell/platform/fuchsia/dart_runner/dart_runner.cc +++ b/engine/src/flutter/shell/platform/fuchsia/dart_runner/dart_runner.cc @@ -36,7 +36,6 @@ namespace { const char* kDartVMArgs[] = { // clang-format off - "--no_causal_async_stacks", "--lazy_async_stacks", "--systrace_timeline", diff --git a/engine/src/flutter/shell/platform/fuchsia/dart_runner/embedder/BUILD.gn b/engine/src/flutter/shell/platform/fuchsia/dart_runner/embedder/BUILD.gn index edbf3e4506..3fa311ad61 100644 --- a/engine/src/flutter/shell/platform/fuchsia/dart_runner/embedder/BUILD.gn +++ b/engine/src/flutter/shell/platform/fuchsia/dart_runner/embedder/BUILD.gn @@ -46,7 +46,6 @@ template("create_aot_snapshot") { } args = [ - "--no_causal_async_stacks", "--lazy_async_stacks", "--deterministic", "--snapshot_kind=vm-aot-assembly", diff --git a/engine/src/flutter/shell/platform/fuchsia/dart_runner/kernel/BUILD.gn b/engine/src/flutter/shell/platform/fuchsia/dart_runner/kernel/BUILD.gn index 5e13f994a3..64e6166326 100644 --- a/engine/src/flutter/shell/platform/fuchsia/dart_runner/kernel/BUILD.gn +++ b/engine/src/flutter/shell/platform/fuchsia/dart_runner/kernel/BUILD.gn @@ -63,7 +63,6 @@ template("create_kernel_core_snapshot") { tool = gen_snapshot_to_use args = [ - "--no_causal_async_stacks", "--lazy_async_stacks", "--enable_mirrors=false", "--deterministic", diff --git a/engine/src/flutter/shell/platform/fuchsia/dart_runner/vmservice/BUILD.gn b/engine/src/flutter/shell/platform/fuchsia/dart_runner/vmservice/BUILD.gn index ce44912e7d..90c7d1bf18 100644 --- a/engine/src/flutter/shell/platform/fuchsia/dart_runner/vmservice/BUILD.gn +++ b/engine/src/flutter/shell/platform/fuchsia/dart_runner/vmservice/BUILD.gn @@ -57,7 +57,6 @@ template("aot_snapshot") { } args = [ - "--no_causal_async_stacks", "--lazy_async_stacks", "--deterministic", "--snapshot_kind=app-aot-elf", diff --git a/engine/src/flutter/shell/platform/fuchsia/flutter/component.cc b/engine/src/flutter/shell/platform/fuchsia/flutter/component.cc index d73dc5d2f9..2999a8173e 100644 --- a/engine/src/flutter/shell/platform/fuchsia/flutter/component.cc +++ b/engine/src/flutter/shell/platform/fuchsia/flutter/component.cc @@ -505,7 +505,7 @@ Application::Application( std::cout << message << std::endl; }; - settings_.dart_flags = {"--no_causal_async_stacks", "--lazy_async_stacks"}; + settings_.dart_flags = {"--lazy_async_stacks"}; // Don't collect CPU samples from Dart VM C++ code. settings_.dart_flags.push_back("--no_profile_vm"); diff --git a/engine/src/flutter/shell/platform/fuchsia/flutter/kernel/BUILD.gn b/engine/src/flutter/shell/platform/fuchsia/flutter/kernel/BUILD.gn index b08aad98bb..b314388803 100644 --- a/engine/src/flutter/shell/platform/fuchsia/flutter/kernel/BUILD.gn +++ b/engine/src/flutter/shell/platform/fuchsia/flutter/kernel/BUILD.gn @@ -67,7 +67,6 @@ template("core_snapshot") { tool = gen_snapshot_to_use args = [ - "--no_causal_async_stacks", "--lazy_async_stacks", "--enable_mirrors=false", "--deterministic", diff --git a/engine/src/flutter/testing/scenario_app/compile_android_jit.sh b/engine/src/flutter/testing/scenario_app/compile_android_jit.sh index f0da311776..0b5de81ba9 100755 --- a/engine/src/flutter/testing/scenario_app/compile_android_jit.sh +++ b/engine/src/flutter/testing/scenario_app/compile_android_jit.sh @@ -85,7 +85,6 @@ echo "Compiling JIT Snapshot..." "$GEN_SNAPSHOT" --deterministic \ --enable-asserts \ - --no-causal_async_stacks \ --lazy_async_stacks \ --isolate_snapshot_instructions="$OUTDIR/isolate_snapshot_instr" \ --snapshot_kind=app-jit \ diff --git a/engine/src/flutter/testing/scenario_app/compile_ios_jit.sh b/engine/src/flutter/testing/scenario_app/compile_ios_jit.sh index 4d3799734c..bc48df0001 100755 --- a/engine/src/flutter/testing/scenario_app/compile_ios_jit.sh +++ b/engine/src/flutter/testing/scenario_app/compile_ios_jit.sh @@ -74,7 +74,6 @@ echo "Compiling JIT Snapshot..." "$DEVICE_TOOLS/gen_snapshot" --deterministic \ --enable-asserts \ - --no-causal_async_stacks \ --lazy_async_stacks \ --isolate_snapshot_instructions="$OUTDIR/isolate_snapshot_instr" \ --snapshot_kind=app-jit \ diff --git a/engine/src/flutter/testing/testing.gni b/engine/src/flutter/testing/testing.gni index acf2cf20fe..6a2bdc20f4 100644 --- a/engine/src/flutter/testing/testing.gni +++ b/engine/src/flutter/testing/testing.gni @@ -136,7 +136,6 @@ template("dart_snapshot_aot") { outputs = [ elf_object ] args = [ - "--no-causal_async_stacks", "--lazy_async_stacks", "--deterministic", "--snapshot_kind=app-aot-elf",