From e17e4eca096ec37579814db4a8ba2fc2126a14ef Mon Sep 17 00:00:00 2001 From: Kaushik Iska Date: Tue, 7 Sep 2021 13:41:38 -0700 Subject: [PATCH 1/3] Add benchmarks to measure dart -> native time --- runtime/dart_isolate_unittests.cc | 16 +++--- shell/common/BUILD.gn | 6 ++- shell/common/dart_native_benchmarks.cc | 68 ++++++++++++++++++++++++ testing/BUILD.gn | 2 + testing/fixture_test.cc | 62 ++-------------------- testing/fixture_test.h | 27 +--------- testing/fixtures_base.cc | 72 ++++++++++++++++++++++++++ testing/fixtures_base.h | 49 ++++++++++++++++++ 8 files changed, 208 insertions(+), 94 deletions(-) create mode 100644 shell/common/dart_native_benchmarks.cc create mode 100644 testing/fixtures_base.cc create mode 100644 testing/fixtures_base.h diff --git a/runtime/dart_isolate_unittests.cc b/runtime/dart_isolate_unittests.cc index e23408b332b97..bd66b1d195fbf 100644 --- a/runtime/dart_isolate_unittests.cc +++ b/runtime/dart_isolate_unittests.cc @@ -247,11 +247,9 @@ TEST_F(DartIsolateTest, CanRunDartCodeCodeSynchronously) { TEST_F(DartIsolateTest, CanRegisterNativeCallback) { ASSERT_FALSE(DartVMRef::IsInstanceRunning()); - AddNativeCallback("NotifyNative", - CREATE_NATIVE_ENTRY(([this](Dart_NativeArguments args) { - FML_LOG(ERROR) << "Hello from Dart!"; - Signal(); - }))); + AddNativeCallback( + "NotifyNative", + CREATE_NATIVE_ENTRY(([this](Dart_NativeArguments args) { Signal(); }))); const auto settings = CreateSettingsForFixture(); auto vm_ref = DartVMRef::Create(settings); auto thread = CreateNewThread(); @@ -524,11 +522,9 @@ TEST_F(DartIsolateTest, DISABLED_ValidLoadingUnitSucceeds) { } ASSERT_FALSE(DartVMRef::IsInstanceRunning()); - AddNativeCallback("NotifyNative", - CREATE_NATIVE_ENTRY(([this](Dart_NativeArguments args) { - FML_LOG(ERROR) << "Hello from Dart!"; - Signal(); - }))); + AddNativeCallback( + "NotifyNative", + CREATE_NATIVE_ENTRY(([this](Dart_NativeArguments args) { Signal(); }))); AddNativeCallback( "NotifySuccess", CREATE_NATIVE_ENTRY([this](Dart_NativeArguments args) { auto bool_handle = Dart_GetNativeArgument(args, 0); diff --git a/shell/common/BUILD.gn b/shell/common/BUILD.gn index 071a9ed29e1fa..b8d00101df091 100644 --- a/shell/common/BUILD.gn +++ b/shell/common/BUILD.gn @@ -158,13 +158,17 @@ if (enable_unittests) { } shell_host_executable("shell_benchmarks") { - sources = [ "shell_benchmarks.cc" ] + sources = [ + "dart_native_benchmarks.cc", + "shell_benchmarks.cc", + ] deps = [ ":shell_unittests_fixtures", "//flutter/benchmarking", "//flutter/flow", "//flutter/testing:dart", + "//flutter/testing:fixture_test", "//flutter/testing:testing_lib", ] } diff --git a/shell/common/dart_native_benchmarks.cc b/shell/common/dart_native_benchmarks.cc new file mode 100644 index 0000000000000..b08ec73064dc5 --- /dev/null +++ b/shell/common/dart_native_benchmarks.cc @@ -0,0 +1,68 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "flutter/shell/common/shell.h" + +#include "flutter/benchmarking/benchmarking.h" +#include "flutter/shell/common/thread_host.h" +#include "flutter/testing/dart_isolate_runner.h" +#include "flutter/testing/fixtures_base.h" +#include "flutter/testing/testing.h" +#include "runtime/dart_vm_lifecycle.h" + +namespace flutter::testing { + +class DartNativeBenchmarks : public FixturesBase, public benchmark::Fixture { + public: + DartNativeBenchmarks() : FixturesBase() {} + + void SetUp(const ::benchmark::State& state) {} + + void TearDown(const ::benchmark::State& state) {} + + void Wait() { latch_.Wait(); } + + void Signal() { latch_.Signal(); } + + private: + fml::AutoResetWaitableEvent latch_; + + FML_DISALLOW_COPY_AND_ASSIGN(DartNativeBenchmarks); +}; + +BENCHMARK_F(DartNativeBenchmarks, DartNativeMessages)(benchmark::State& st) { + while (st.KeepRunning()) { + st.PauseTiming(); + ASSERT_FALSE(DartVMRef::IsInstanceRunning()); + AddNativeCallback( + "NotifyNative", + CREATE_NATIVE_ENTRY(([this](Dart_NativeArguments args) { Signal(); }))); + + const auto settings = CreateSettingsForFixture(); + DartVMRef vm_ref = DartVMRef::Create(settings); + + ThreadHost thread_host("io.flutter.test.DartNativeBenchmarks.", + ThreadHost::Type::Platform | ThreadHost::Type::IO | + ThreadHost::Type::UI); + TaskRunners task_runners( + "test", + thread_host.platform_thread->GetTaskRunner(), // platform + thread_host.platform_thread->GetTaskRunner(), // raster + thread_host.ui_thread->GetTaskRunner(), // ui + thread_host.io_thread->GetTaskRunner() // io + ); + + { + st.ResumeTiming(); + auto isolate = + RunDartCodeInIsolate(vm_ref, settings, task_runners, "notifyNative", + {}, GetDefaultKernelFilePath()); + ASSERT_TRUE(isolate); + ASSERT_EQ(isolate->get()->GetPhase(), DartIsolate::Phase::Running); + Wait(); + } + } +} + +} // namespace flutter::testing diff --git a/testing/BUILD.gn b/testing/BUILD.gn index 00bfc0ff16b0c..95b614a627d36 100644 --- a/testing/BUILD.gn +++ b/testing/BUILD.gn @@ -92,6 +92,8 @@ source_set("fixture_test") { sources = [ "fixture_test.cc", "fixture_test.h", + "fixtures_base.cc", + "fixtures_base.h", ] public_deps = [ diff --git a/testing/fixture_test.cc b/testing/fixture_test.cc index 490d70e3a4ad4..91c3723e46de5 100644 --- a/testing/fixture_test.cc +++ b/testing/fixture_test.cc @@ -4,71 +4,17 @@ #include "flutter/testing/fixture_test.h" +#include "flutter/testing/fixtures_base.h" + namespace flutter { namespace testing { -FixtureTest::FixtureTest() - : FixtureTest("kernel_blob.bin", - kDefaultAOTAppELFFileName, - kDefaultAOTAppELFSplitFileName) {} +FixtureTest::FixtureTest() : FixturesBase() {} FixtureTest::FixtureTest(std::string kernel_filename, std::string elf_filename, std::string elf_split_filename) - : native_resolver_(std::make_shared()), - split_aot_symbols_( - LoadELFSplitSymbolFromFixturesIfNeccessary(elf_split_filename)), - kernel_filename_(kernel_filename), - assets_dir_(fml::OpenDirectory(GetFixturesPath(), - false, - fml::FilePermission::kRead)), - aot_symbols_(LoadELFSymbolFromFixturesIfNeccessary(elf_filename)) {} - -Settings FixtureTest::CreateSettingsForFixture() { - Settings settings; - settings.leak_vm = false; - settings.task_observer_add = [](intptr_t, fml::closure) {}; - settings.task_observer_remove = [](intptr_t) {}; - settings.isolate_create_callback = [this]() { - native_resolver_->SetNativeResolverForIsolate(); - }; - settings.enable_observatory = false; - SetSnapshotsAndAssets(settings); - return settings; -} - -void FixtureTest::SetSnapshotsAndAssets(Settings& settings) { - if (!assets_dir_.is_valid()) { - return; - } - - settings.assets_dir = assets_dir_.get(); - - // In JIT execution, all snapshots are present within the binary itself and - // don't need to be explicitly supplied by the embedder. In AOT, these - // snapshots will be present in the application AOT dylib. - if (DartVM::IsRunningPrecompiledCode()) { - FML_CHECK(PrepareSettingsForAOTWithSymbols(settings, aot_symbols_)); - } else { - settings.application_kernels = [this]() -> Mappings { - std::vector> kernel_mappings; - auto kernel_mapping = - fml::FileMapping::CreateReadOnly(assets_dir_, kernel_filename_); - if (!kernel_mapping || !kernel_mapping->IsValid()) { - FML_LOG(ERROR) << "Could not find kernel blob for test fixture not " - "running in precompiled mode."; - return kernel_mappings; - } - kernel_mappings.emplace_back(std::move(kernel_mapping)); - return kernel_mappings; - }; - } -} - -void FixtureTest::AddNativeCallback(std::string name, - Dart_NativeFunction callback) { - native_resolver_->AddNativeCallback(std::move(name), callback); -} + : FixturesBase(kernel_filename, elf_filename, elf_split_filename) {} } // namespace testing } // namespace flutter diff --git a/testing/fixture_test.h b/testing/fixture_test.h index 4b95a8b8289a3..5a54676e660fd 100644 --- a/testing/fixture_test.h +++ b/testing/fixture_test.h @@ -5,19 +5,12 @@ #ifndef FLUTTER_TESTING_FIXTURE_TEST_H_ #define FLUTTER_TESTING_FIXTURE_TEST_H_ -#include - -#include "flutter/common/settings.h" -#include "flutter/runtime/dart_vm.h" -#include "flutter/testing/elf_loader.h" -#include "flutter/testing/test_dart_native_resolver.h" -#include "flutter/testing/testing.h" -#include "flutter/testing/thread_test.h" +#include "flutter/testing/fixtures_base.h" namespace flutter { namespace testing { -class FixtureTest : public ThreadTest { +class FixtureTest : public FixturesBase, public ThreadTest { public: // Uses the default filenames from the fixtures generator. FixtureTest(); @@ -27,23 +20,7 @@ class FixtureTest : public ThreadTest { std::string elf_filename, std::string elf_split_filename); - virtual Settings CreateSettingsForFixture(); - - void AddNativeCallback(std::string name, Dart_NativeFunction callback); - - protected: - void SetSnapshotsAndAssets(Settings& settings); - - std::shared_ptr native_resolver_; - - ELFAOTSymbols split_aot_symbols_; - private: - std::string kernel_filename_; - std::string elf_filename_; - fml::UniqueFD assets_dir_; - ELFAOTSymbols aot_symbols_; - FML_DISALLOW_COPY_AND_ASSIGN(FixtureTest); }; diff --git a/testing/fixtures_base.cc b/testing/fixtures_base.cc new file mode 100644 index 0000000000000..681c528c35124 --- /dev/null +++ b/testing/fixtures_base.cc @@ -0,0 +1,72 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "flutter/testing/fixtures_base.h" + +namespace flutter::testing { + +FixturesBase::FixturesBase() + : FixturesBase("kernel_blob.bin", + kDefaultAOTAppELFFileName, + kDefaultAOTAppELFSplitFileName) {} + +FixturesBase::FixturesBase(std::string kernel_filename, + std::string elf_filename, + std::string elf_split_filename) + : native_resolver_(std::make_shared()), + split_aot_symbols_( + LoadELFSplitSymbolFromFixturesIfNeccessary(elf_split_filename)), + kernel_filename_(kernel_filename), + assets_dir_(fml::OpenDirectory(GetFixturesPath(), + false, + fml::FilePermission::kRead)), + aot_symbols_(LoadELFSymbolFromFixturesIfNeccessary(elf_filename)) {} + +Settings FixturesBase::CreateSettingsForFixture() { + Settings settings; + settings.leak_vm = false; + settings.task_observer_add = [](intptr_t, fml::closure) {}; + settings.task_observer_remove = [](intptr_t) {}; + settings.isolate_create_callback = [this]() { + native_resolver_->SetNativeResolverForIsolate(); + }; + settings.enable_observatory = false; + SetSnapshotsAndAssets(settings); + return settings; +} + +void FixturesBase::SetSnapshotsAndAssets(Settings& settings) { + if (!assets_dir_.is_valid()) { + return; + } + + settings.assets_dir = assets_dir_.get(); + + // In JIT execution, all snapshots are present within the binary itself and + // don't need to be explicitly supplied by the embedder. In AOT, these + // snapshots will be present in the application AOT dylib. + if (DartVM::IsRunningPrecompiledCode()) { + FML_CHECK(PrepareSettingsForAOTWithSymbols(settings, aot_symbols_)); + } else { + settings.application_kernels = [this]() -> Mappings { + std::vector> kernel_mappings; + auto kernel_mapping = + fml::FileMapping::CreateReadOnly(assets_dir_, kernel_filename_); + if (!kernel_mapping || !kernel_mapping->IsValid()) { + FML_LOG(ERROR) << "Could not find kernel blob for test fixture not " + "running in precompiled mode."; + return kernel_mappings; + } + kernel_mappings.emplace_back(std::move(kernel_mapping)); + return kernel_mappings; + }; + } +} + +void FixturesBase::AddNativeCallback(std::string name, + Dart_NativeFunction callback) { + native_resolver_->AddNativeCallback(std::move(name), callback); +} + +} // namespace flutter::testing diff --git a/testing/fixtures_base.h b/testing/fixtures_base.h new file mode 100644 index 0000000000000..7df940f80a5cf --- /dev/null +++ b/testing/fixtures_base.h @@ -0,0 +1,49 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef FLUTTER_TESTING_FIXTURES_BASE_H_ +#define FLUTTER_TESTING_FIXTURES_BASE_H_ + +#include + +#include "flutter/common/settings.h" +#include "flutter/runtime/dart_vm.h" +#include "flutter/testing/elf_loader.h" +#include "flutter/testing/test_dart_native_resolver.h" +#include "flutter/testing/testing.h" +#include "flutter/testing/thread_test.h" + +namespace flutter::testing { + +class FixturesBase { + public: + // Uses the default filenames from the fixtures generator. + FixturesBase(); + + // Allows to customize the kernel, ELF and split ELF filenames. + FixturesBase(std::string kernel_filename, + std::string elf_filename, + std::string elf_split_filename); + + virtual Settings CreateSettingsForFixture(); + + void AddNativeCallback(std::string name, Dart_NativeFunction callback); + + protected: + void SetSnapshotsAndAssets(Settings& settings); + + std::shared_ptr native_resolver_; + ELFAOTSymbols split_aot_symbols_; + std::string kernel_filename_; + std::string elf_filename_; + fml::UniqueFD assets_dir_; + ELFAOTSymbols aot_symbols_; + + private: + FML_DISALLOW_COPY_AND_ASSIGN(FixturesBase); +}; + +} // namespace flutter::testing + +#endif // FLUTTER_TESTING_FIXTURES_BASE_H_ From a33312f2ffb55c5ebc85bbc36818da63c19d315a Mon Sep 17 00:00:00 2001 From: Kaushik Iska Date: Tue, 7 Sep 2021 15:15:54 -0700 Subject: [PATCH 2/3] Fix review comments --- shell/common/dart_native_benchmarks.cc | 63 ++++++++++++++----- shell/common/fixtures/shell_test.dart | 6 ++ testing/BUILD.gn | 4 +- testing/{fixtures_base.cc => dart_fixture.cc} | 24 +++---- testing/{fixtures_base.h => dart_fixture.h} | 18 +++--- testing/fixture_test.cc | 6 +- testing/fixture_test.h | 4 +- 7 files changed, 83 insertions(+), 42 deletions(-) rename testing/{fixtures_base.cc => dart_fixture.cc} (77%) rename testing/{fixtures_base.h => dart_fixture.h} (75%) diff --git a/shell/common/dart_native_benchmarks.cc b/shell/common/dart_native_benchmarks.cc index b08ec73064dc5..c9875a0d8b0d5 100644 --- a/shell/common/dart_native_benchmarks.cc +++ b/shell/common/dart_native_benchmarks.cc @@ -6,38 +6,36 @@ #include "flutter/benchmarking/benchmarking.h" #include "flutter/shell/common/thread_host.h" +#include "flutter/testing/dart_fixture.h" #include "flutter/testing/dart_isolate_runner.h" -#include "flutter/testing/fixtures_base.h" #include "flutter/testing/testing.h" +#include "fml/synchronization/count_down_latch.h" #include "runtime/dart_vm_lifecycle.h" namespace flutter::testing { -class DartNativeBenchmarks : public FixturesBase, public benchmark::Fixture { +class DartNativeBenchmarks : public DartFixture, public benchmark::Fixture { public: - DartNativeBenchmarks() : FixturesBase() {} + DartNativeBenchmarks() : DartFixture() {} void SetUp(const ::benchmark::State& state) {} void TearDown(const ::benchmark::State& state) {} - void Wait() { latch_.Wait(); } - - void Signal() { latch_.Signal(); } - private: - fml::AutoResetWaitableEvent latch_; - FML_DISALLOW_COPY_AND_ASSIGN(DartNativeBenchmarks); }; -BENCHMARK_F(DartNativeBenchmarks, DartNativeMessages)(benchmark::State& st) { +BENCHMARK_F(DartNativeBenchmarks, TimeToFirstNativeMessageFromIsolateInNewVM) +(benchmark::State& st) { while (st.KeepRunning()) { + fml::AutoResetWaitableEvent latch; st.PauseTiming(); ASSERT_FALSE(DartVMRef::IsInstanceRunning()); - AddNativeCallback( - "NotifyNative", - CREATE_NATIVE_ENTRY(([this](Dart_NativeArguments args) { Signal(); }))); + AddNativeCallback("NotifyNative", + CREATE_NATIVE_ENTRY(([&latch](Dart_NativeArguments args) { + latch.Signal(); + }))); const auto settings = CreateSettingsForFixture(); DartVMRef vm_ref = DartVMRef::Create(settings); @@ -60,7 +58,44 @@ BENCHMARK_F(DartNativeBenchmarks, DartNativeMessages)(benchmark::State& st) { {}, GetDefaultKernelFilePath()); ASSERT_TRUE(isolate); ASSERT_EQ(isolate->get()->GetPhase(), DartIsolate::Phase::Running); - Wait(); + latch.Wait(); + } + } +} + +BENCHMARK_F(DartNativeBenchmarks, MultipleDartToNativeMessages) +(benchmark::State& st) { + while (st.KeepRunning()) { + fml::CountDownLatch latch(1000); + st.PauseTiming(); + ASSERT_FALSE(DartVMRef::IsInstanceRunning()); + AddNativeCallback("NotifyNative", + CREATE_NATIVE_ENTRY(([&latch](Dart_NativeArguments args) { + latch.CountDown(); + }))); + + const auto settings = CreateSettingsForFixture(); + DartVMRef vm_ref = DartVMRef::Create(settings); + + ThreadHost thread_host("io.flutter.test.DartNativeBenchmarks.", + ThreadHost::Type::Platform | ThreadHost::Type::IO | + ThreadHost::Type::UI); + TaskRunners task_runners( + "test", + thread_host.platform_thread->GetTaskRunner(), // platform + thread_host.platform_thread->GetTaskRunner(), // raster + thread_host.ui_thread->GetTaskRunner(), // ui + thread_host.io_thread->GetTaskRunner() // io + ); + + { + st.ResumeTiming(); + auto isolate = RunDartCodeInIsolate(vm_ref, settings, task_runners, + "thousandCallsToNative", {}, + GetDefaultKernelFilePath()); + ASSERT_TRUE(isolate); + ASSERT_EQ(isolate->get()->GetPhase(), DartIsolate::Phase::Running); + latch.Wait(); } } } diff --git a/shell/common/fixtures/shell_test.dart b/shell/common/fixtures/shell_test.dart index dd3586fc33176..f294575229c4c 100644 --- a/shell/common/fixtures/shell_test.dart +++ b/shell/common/fixtures/shell_test.dart @@ -75,6 +75,12 @@ void sayHiFromFixturesAreFunctionalMain() native 'SayHiFromFixturesAreFunctional void notifyNative() native 'NotifyNative'; +void thousandCallsToNative() { + for (int i = 0; i < 1000; i++) { + notifyNative(); + } +} + void secondaryIsolateMain(String message) { print('Secondary isolate got message: ' + message); notifyNative(); diff --git a/testing/BUILD.gn b/testing/BUILD.gn index 95b614a627d36..e21ef73bc9eba 100644 --- a/testing/BUILD.gn +++ b/testing/BUILD.gn @@ -90,10 +90,10 @@ source_set("fixture_test") { testonly = true sources = [ + "dart_fixture.cc", + "dart_fixture.h", "fixture_test.cc", "fixture_test.h", - "fixtures_base.cc", - "fixtures_base.h", ] public_deps = [ diff --git a/testing/fixtures_base.cc b/testing/dart_fixture.cc similarity index 77% rename from testing/fixtures_base.cc rename to testing/dart_fixture.cc index 681c528c35124..4e86a33e33c7f 100644 --- a/testing/fixtures_base.cc +++ b/testing/dart_fixture.cc @@ -2,18 +2,18 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "flutter/testing/fixtures_base.h" +#include "flutter/testing/dart_fixture.h" namespace flutter::testing { -FixturesBase::FixturesBase() - : FixturesBase("kernel_blob.bin", - kDefaultAOTAppELFFileName, - kDefaultAOTAppELFSplitFileName) {} +DartFixture::DartFixture() + : DartFixture("kernel_blob.bin", + kDefaultAOTAppELFFileName, + kDefaultAOTAppELFSplitFileName) {} -FixturesBase::FixturesBase(std::string kernel_filename, - std::string elf_filename, - std::string elf_split_filename) +DartFixture::DartFixture(std::string kernel_filename, + std::string elf_filename, + std::string elf_split_filename) : native_resolver_(std::make_shared()), split_aot_symbols_( LoadELFSplitSymbolFromFixturesIfNeccessary(elf_split_filename)), @@ -23,7 +23,7 @@ FixturesBase::FixturesBase(std::string kernel_filename, fml::FilePermission::kRead)), aot_symbols_(LoadELFSymbolFromFixturesIfNeccessary(elf_filename)) {} -Settings FixturesBase::CreateSettingsForFixture() { +Settings DartFixture::CreateSettingsForFixture() { Settings settings; settings.leak_vm = false; settings.task_observer_add = [](intptr_t, fml::closure) {}; @@ -36,7 +36,7 @@ Settings FixturesBase::CreateSettingsForFixture() { return settings; } -void FixturesBase::SetSnapshotsAndAssets(Settings& settings) { +void DartFixture::SetSnapshotsAndAssets(Settings& settings) { if (!assets_dir_.is_valid()) { return; } @@ -64,8 +64,8 @@ void FixturesBase::SetSnapshotsAndAssets(Settings& settings) { } } -void FixturesBase::AddNativeCallback(std::string name, - Dart_NativeFunction callback) { +void DartFixture::AddNativeCallback(std::string name, + Dart_NativeFunction callback) { native_resolver_->AddNativeCallback(std::move(name), callback); } diff --git a/testing/fixtures_base.h b/testing/dart_fixture.h similarity index 75% rename from testing/fixtures_base.h rename to testing/dart_fixture.h index 7df940f80a5cf..06c00e86e97d0 100644 --- a/testing/fixtures_base.h +++ b/testing/dart_fixture.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef FLUTTER_TESTING_FIXTURES_BASE_H_ -#define FLUTTER_TESTING_FIXTURES_BASE_H_ +#ifndef FLUTTER_TESTING_DART_FIXTURE_H_ +#define FLUTTER_TESTING_DART_FIXTURE_H_ #include @@ -16,15 +16,15 @@ namespace flutter::testing { -class FixturesBase { +class DartFixture { public: // Uses the default filenames from the fixtures generator. - FixturesBase(); + DartFixture(); // Allows to customize the kernel, ELF and split ELF filenames. - FixturesBase(std::string kernel_filename, - std::string elf_filename, - std::string elf_split_filename); + DartFixture(std::string kernel_filename, + std::string elf_filename, + std::string elf_split_filename); virtual Settings CreateSettingsForFixture(); @@ -41,9 +41,9 @@ class FixturesBase { ELFAOTSymbols aot_symbols_; private: - FML_DISALLOW_COPY_AND_ASSIGN(FixturesBase); + FML_DISALLOW_COPY_AND_ASSIGN(DartFixture); }; } // namespace flutter::testing -#endif // FLUTTER_TESTING_FIXTURES_BASE_H_ +#endif // FLUTTER_TESTING_DART_FIXTURE_H_ diff --git a/testing/fixture_test.cc b/testing/fixture_test.cc index 91c3723e46de5..ed451a50decff 100644 --- a/testing/fixture_test.cc +++ b/testing/fixture_test.cc @@ -4,17 +4,17 @@ #include "flutter/testing/fixture_test.h" -#include "flutter/testing/fixtures_base.h" +#include "flutter/testing/dart_fixture.h" namespace flutter { namespace testing { -FixtureTest::FixtureTest() : FixturesBase() {} +FixtureTest::FixtureTest() : DartFixture() {} FixtureTest::FixtureTest(std::string kernel_filename, std::string elf_filename, std::string elf_split_filename) - : FixturesBase(kernel_filename, elf_filename, elf_split_filename) {} + : DartFixture(kernel_filename, elf_filename, elf_split_filename) {} } // namespace testing } // namespace flutter diff --git a/testing/fixture_test.h b/testing/fixture_test.h index 5a54676e660fd..f54bc80d28a2f 100644 --- a/testing/fixture_test.h +++ b/testing/fixture_test.h @@ -5,12 +5,12 @@ #ifndef FLUTTER_TESTING_FIXTURE_TEST_H_ #define FLUTTER_TESTING_FIXTURE_TEST_H_ -#include "flutter/testing/fixtures_base.h" +#include "flutter/testing/dart_fixture.h" namespace flutter { namespace testing { -class FixtureTest : public FixturesBase, public ThreadTest { +class FixtureTest : public DartFixture, public ThreadTest { public: // Uses the default filenames from the fixtures generator. FixtureTest(); From 44766dbaec0b7df44cc8bd73fd0ca93e7b01400e Mon Sep 17 00:00:00 2001 From: Kaushik Iska Date: Tue, 7 Sep 2021 15:40:20 -0700 Subject: [PATCH 3/3] fix licenses --- ci/licenses_golden/licenses_flutter | 1 + 1 file changed, 1 insertion(+) diff --git a/ci/licenses_golden/licenses_flutter b/ci/licenses_golden/licenses_flutter index 1d5cee942105c..e561b1cadafbb 100755 --- a/ci/licenses_golden/licenses_flutter +++ b/ci/licenses_golden/licenses_flutter @@ -691,6 +691,7 @@ FILE: ../../../flutter/shell/common/canvas_spy.h FILE: ../../../flutter/shell/common/canvas_spy_unittests.cc FILE: ../../../flutter/shell/common/context_options.cc FILE: ../../../flutter/shell/common/context_options.h +FILE: ../../../flutter/shell/common/dart_native_benchmarks.cc FILE: ../../../flutter/shell/common/display.h FILE: ../../../flutter/shell/common/display_manager.cc FILE: ../../../flutter/shell/common/display_manager.h