From 54a9d652828941dbebbe8de32cf667e89578b13d Mon Sep 17 00:00:00 2001 From: Zachary Anderson Date: Sat, 19 Feb 2022 10:09:26 -0800 Subject: [PATCH] Revert "Reland "Enable caching of CPU samples collected at application startup (#89600)"" (#98803) --- packages/flutter_tools/lib/src/base/dds.dart | 4 ---- .../flutter_tools/lib/src/fuchsia/fuchsia_device.dart | 1 - packages/flutter_tools/lib/src/resident_runner.dart | 1 - .../test/commands.shard/hermetic/attach_test.dart | 1 - .../test/general.shard/drive/drive_service_test.dart | 1 - .../test/general.shard/fuchsia/fuchsia_device_test.dart | 1 - .../test/general.shard/resident_runner_test.dart | 9 +++------ 7 files changed, 3 insertions(+), 15 deletions(-) diff --git a/packages/flutter_tools/lib/src/base/dds.dart b/packages/flutter_tools/lib/src/base/dds.dart index 08d25b3abf..673b60aaa1 100644 --- a/packages/flutter_tools/lib/src/base/dds.dart +++ b/packages/flutter_tools/lib/src/base/dds.dart @@ -17,7 +17,6 @@ Future Function( bool enableAuthCodes, bool ipv6, Uri? serviceUri, - List cachedUserTags, }) ddsLauncherCallback = dds.DartDevelopmentService.startDartDevelopmentService; /// Helper class to launch a [dds.DartDevelopmentService]. Allows for us to @@ -37,7 +36,6 @@ class DartDevelopmentService { int? hostPort, bool? ipv6, bool? disableServiceAuthCodes, - bool cacheStartupProfile = false, }) async { final Uri ddsUri = Uri( scheme: 'http', @@ -54,8 +52,6 @@ class DartDevelopmentService { serviceUri: ddsUri, enableAuthCodes: disableServiceAuthCodes != true, ipv6: ipv6 == true, - // Enables caching of CPU samples collected during application startup. - cachedUserTags: cacheStartupProfile ? const ['AppStartUp'] : const [], ); unawaited(_ddsInstance?.done.whenComplete(() { if (!_completer.isCompleted) { diff --git a/packages/flutter_tools/lib/src/fuchsia/fuchsia_device.dart b/packages/flutter_tools/lib/src/fuchsia/fuchsia_device.dart index 2d59d7e83f..7b08cc2fce 100644 --- a/packages/flutter_tools/lib/src/fuchsia/fuchsia_device.dart +++ b/packages/flutter_tools/lib/src/fuchsia/fuchsia_device.dart @@ -63,7 +63,6 @@ Future _kDefaultDartDevelopmentServiceStarter( ipv6: true, disableServiceAuthCodes: disableServiceAuthCodes, logger: globals.logger, - cacheStartupProfile: true, ); } diff --git a/packages/flutter_tools/lib/src/resident_runner.dart b/packages/flutter_tools/lib/src/resident_runner.dart index cbd300c060..d06cfea399 100644 --- a/packages/flutter_tools/lib/src/resident_runner.dart +++ b/packages/flutter_tools/lib/src/resident_runner.dart @@ -267,7 +267,6 @@ class FlutterDevice { ipv6: ipv6, disableServiceAuthCodes: disableServiceAuthCodes, logger: globals.logger, - cacheStartupProfile: true, ); } on dds.DartDevelopmentServiceException catch (e, st) { if (!allowExistingDdsInstance || diff --git a/packages/flutter_tools/test/commands.shard/hermetic/attach_test.dart b/packages/flutter_tools/test/commands.shard/hermetic/attach_test.dart index b418f76dfb..6277f3f216 100644 --- a/packages/flutter_tools/test/commands.shard/hermetic/attach_test.dart +++ b/packages/flutter_tools/test/commands.shard/hermetic/attach_test.dart @@ -798,7 +798,6 @@ class FakeDartDevelopmentService extends Fake implements DartDevelopmentService int hostPort, bool ipv6, bool disableServiceAuthCodes, - bool cacheStartupProfile = false, }) async {} @override diff --git a/packages/flutter_tools/test/general.shard/drive/drive_service_test.dart b/packages/flutter_tools/test/general.shard/drive/drive_service_test.dart index 16d453af7c..403ded6f41 100644 --- a/packages/flutter_tools/test/general.shard/drive/drive_service_test.dart +++ b/packages/flutter_tools/test/general.shard/drive/drive_service_test.dart @@ -590,7 +590,6 @@ class FakeDartDevelopmentService extends Fake implements DartDevelopmentService int hostPort, bool ipv6, bool disableServiceAuthCodes, - bool cacheStartupProfile = false, }) async { started = true; } diff --git a/packages/flutter_tools/test/general.shard/fuchsia/fuchsia_device_test.dart b/packages/flutter_tools/test/general.shard/fuchsia/fuchsia_device_test.dart index be5f9b5fdd..3da33de412 100644 --- a/packages/flutter_tools/test/general.shard/fuchsia/fuchsia_device_test.dart +++ b/packages/flutter_tools/test/general.shard/fuchsia/fuchsia_device_test.dart @@ -944,7 +944,6 @@ class FakeDartDevelopmentService extends Fake implements DartDevelopmentService int hostPort, bool ipv6, bool disableServiceAuthCodes, - bool cacheStartupProfile = false, }) async {} @override diff --git a/packages/flutter_tools/test/general.shard/resident_runner_test.dart b/packages/flutter_tools/test/general.shard/resident_runner_test.dart index 0d472cdb48..67324be3a1 100644 --- a/packages/flutter_tools/test/general.shard/resident_runner_test.dart +++ b/packages/flutter_tools/test/general.shard/resident_runner_test.dart @@ -1892,12 +1892,11 @@ flutter: fakeVmServiceHost = FakeVmServiceHost(requests: []); final FakeDevice device = FakeDevice() ..dds = DartDevelopmentService(); - ddsLauncherCallback = (Uri uri, {bool enableAuthCodes, bool ipv6, Uri serviceUri, List cachedUserTags}) { + ddsLauncherCallback = (Uri uri, {bool enableAuthCodes, bool ipv6, Uri serviceUri}) { expect(uri, Uri(scheme: 'foo', host: 'bar')); expect(enableAuthCodes, isTrue); expect(ipv6, isFalse); expect(serviceUri, Uri(scheme: 'http', host: '127.0.0.1', port: 0)); - expect(cachedUserTags, ['AppStartUp']); throw FakeDartDevelopmentServiceException(message: 'Existing VM service clients prevent DDS from taking control.', ); @@ -1940,12 +1939,11 @@ flutter: final FakeDevice device = FakeDevice() ..dds = DartDevelopmentService(); final Completerdone = Completer(); - ddsLauncherCallback = (Uri uri, {bool enableAuthCodes, bool ipv6, Uri serviceUri, List cachedUserTags}) async { + ddsLauncherCallback = (Uri uri, {bool enableAuthCodes, bool ipv6, Uri serviceUri}) async { expect(uri, Uri(scheme: 'foo', host: 'bar')); expect(enableAuthCodes, isFalse); expect(ipv6, isTrue); expect(serviceUri, Uri(scheme: 'http', host: '::1', port: 0)); - expect(cachedUserTags, ['AppStartUp']); done.complete(); return null; }; @@ -1972,12 +1970,11 @@ flutter: // See https://github.com/flutter/flutter/issues/72385 for context. final FakeDevice device = FakeDevice() ..dds = DartDevelopmentService(); - ddsLauncherCallback = (Uri uri, {bool enableAuthCodes, bool ipv6, Uri serviceUri, List cachedUserTags}) { + ddsLauncherCallback = (Uri uri, {bool enableAuthCodes, bool ipv6, Uri serviceUri}) { expect(uri, Uri(scheme: 'foo', host: 'bar')); expect(enableAuthCodes, isTrue); expect(ipv6, isFalse); expect(serviceUri, Uri(scheme: 'http', host: '127.0.0.1', port: 0)); - expect(cachedUserTags, ['AppStartUp']); throw FakeDartDevelopmentServiceException(message: 'No URI'); }; final TestFlutterDevice flutterDevice = TestFlutterDevice(