Enable lazy-async-stacks by-default in all modes (flutter/engine#16556)
This was already enabled by-default in AOT mode in [0] - which made the gen_snapshot invocations use "--lazy-async-stacks --no-causal-async-stacks". See go/dart-10x-faster-async for more information. [0] https://github.com/flutter/flutter/commit/347823234fd
This commit is contained in:
committed by
GitHub
parent
3cbd8a468b
commit
a39aad4a03
@@ -60,7 +60,8 @@ static const char* kDartLanguageArgs[] = {
|
||||
// clang-format off
|
||||
"--enable_mirrors=false",
|
||||
"--background_compilation",
|
||||
"--causal_async_stacks",
|
||||
"--no-causal_async_stacks",
|
||||
"--lazy_async_stacks",
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
|
||||
@@ -281,16 +281,20 @@ TEST_F(ShellTest, BlacklistedDartVMFlag) {
|
||||
TEST_F(ShellTest, WhitelistedDartVMFlag) {
|
||||
const std::vector<fml::CommandLine::Option> options = {
|
||||
fml::CommandLine::Option("dart-flags",
|
||||
"--lazy_async_stacks,--no-causal_async_stacks,"
|
||||
"--max_profile_depth 1,--random_seed 42")};
|
||||
fml::CommandLine command_line("", options, std::vector<std::string>());
|
||||
flutter::Settings settings = flutter::SettingsFromCommandLine(command_line);
|
||||
|
||||
EXPECT_GE(settings.dart_flags.size(), 2u);
|
||||
EXPECT_EQ(settings.dart_flags[0], "--lazy_async_stacks");
|
||||
EXPECT_EQ(settings.dart_flags[1], "--no-causal_async_stacks");
|
||||
#if !FLUTTER_RELEASE
|
||||
EXPECT_EQ(settings.dart_flags.size(), 2u);
|
||||
EXPECT_EQ(settings.dart_flags[0], "--max_profile_depth 1");
|
||||
EXPECT_EQ(settings.dart_flags[1], "--random_seed 42");
|
||||
EXPECT_EQ(settings.dart_flags.size(), 4u);
|
||||
EXPECT_EQ(settings.dart_flags[2], "--max_profile_depth 1");
|
||||
EXPECT_EQ(settings.dart_flags[3], "--random_seed 42");
|
||||
#else
|
||||
EXPECT_EQ(settings.dart_flags.size(), 0u);
|
||||
EXPECT_EQ(settings.dart_flags.size(), 2u);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -41,8 +41,8 @@ struct SwitchDesc {
|
||||
|
||||
// clang-format off
|
||||
static const std::string gDartFlagsWhitelist[] = {
|
||||
"--no-causal_async_stacks",
|
||||
"--lazy_async_stacks",
|
||||
"--no-causal_async_stacks",
|
||||
};
|
||||
// clang-format on
|
||||
|
||||
|
||||
@@ -35,8 +35,7 @@ namespace {
|
||||
|
||||
const char* kDartVMArgs[] = {
|
||||
// clang-format off
|
||||
// TODO(FL-117): Re-enable causal async stack traces when this issue is
|
||||
// addressed.
|
||||
"--lazy_async_stacks",
|
||||
"--no_causal_async_stacks",
|
||||
|
||||
#if !defined(FLUTTER_PROFILE)
|
||||
|
||||
@@ -53,6 +53,7 @@ template("create_aot_snapshot") {
|
||||
|
||||
args = [
|
||||
"--no_causal_async_stacks",
|
||||
"--lazy_async_stacks",
|
||||
"--deterministic",
|
||||
"--snapshot_kind=vm-aot-assembly",
|
||||
"--assembly=" + rebase_path(snapshot_assembly),
|
||||
|
||||
@@ -71,9 +71,8 @@ template("create_kernel_core_snapshot") {
|
||||
tool = gen_snapshot_to_use
|
||||
|
||||
args = [
|
||||
# TODO(FL-117): Re-enable causal async stack traces when this issue is
|
||||
# addressed.
|
||||
"--no_causal_async_stacks",
|
||||
"--lazy_async_stacks",
|
||||
"--use_bytecode_compiler",
|
||||
"--enable_mirrors=false",
|
||||
"--deterministic",
|
||||
|
||||
@@ -64,6 +64,7 @@ template("aot_snapshot") {
|
||||
|
||||
args = [
|
||||
"--no_causal_async_stacks",
|
||||
"--lazy_async_stacks",
|
||||
"--deterministic",
|
||||
"--snapshot_kind=app-aot-elf",
|
||||
"--elf=" + rebase_path(snapshot_path),
|
||||
|
||||
@@ -353,10 +353,6 @@ Application::Application(
|
||||
settings_.task_observer_remove = std::bind(
|
||||
&CurrentMessageLoopRemoveAfterTaskObserver, std::placeholders::_1);
|
||||
|
||||
// TODO(FL-117): Re-enable causal async stack traces when this issue is
|
||||
// addressed.
|
||||
settings_.dart_flags = {"--no_causal_async_stacks"};
|
||||
|
||||
// Disable code collection as it interferes with JIT code warmup
|
||||
// by decreasing usage counters and flushing code which is still useful.
|
||||
settings_.dart_flags.push_back("--no-collect_code");
|
||||
|
||||
@@ -75,9 +75,8 @@ template("core_snapshot") {
|
||||
tool = gen_snapshot_to_use
|
||||
|
||||
args = [
|
||||
# TODO(FL-117): Re-enable causal async stack traces when this issue is
|
||||
# addressed.
|
||||
"--no_causal_async_stacks",
|
||||
"--lazy_async_stacks",
|
||||
"--use_bytecode_compiler",
|
||||
"--enable_mirrors=false",
|
||||
"--deterministic",
|
||||
|
||||
@@ -48,7 +48,8 @@ echo "Compiling JIT Snapshot..."
|
||||
|
||||
"$DEVICE_TOOLS/gen_snapshot" --deterministic \
|
||||
--enable-asserts \
|
||||
--causal_async_stacks \
|
||||
--no-causal_async_stacks \
|
||||
--lazy_async_stacks \
|
||||
--isolate_snapshot_instructions="$OUTDIR/isolate_snapshot_instr" \
|
||||
--snapshot_kind=app-jit \
|
||||
--load_vm_snapshot_data="$DEVICE_TOOLS/../gen/flutter/lib/snapshot/vm_isolate_snapshot.bin" \
|
||||
|
||||
@@ -138,7 +138,8 @@ template("dart_snapshot_aot") {
|
||||
]
|
||||
|
||||
args = [
|
||||
"--causal_async_stacks",
|
||||
"--no-causal_async_stacks",
|
||||
"--lazy_async_stacks",
|
||||
"--deterministic",
|
||||
"--snapshot_kind=app-aot-elf",
|
||||
"--elf=" + rebase_path(elf_object),
|
||||
|
||||
Reference in New Issue
Block a user