Skip to content

Commit 8812327

Browse files
authored
Remove android stack_size_test (#153695)
This test expects to run on 32-bit hardware, but the devicelab no longer has 32-bit Android hardware. In particular, the test contains hand-coded 32-bit arm assembly for reading the stack pointer from Dart code via `dart:ffi`. This test was added in response to a framework change that caused stack frames to be larger than expected while building widgets, leading apps to crash with StackOverflow exceptions unexpectedly. Since then (>3 years ago) this test has not prevented any similar issue, so I believe deleting it rather than fixing it is a better use of resources.
1 parent 3a60532 commit 8812327

File tree

7 files changed

+0
-239
lines changed

7 files changed

+0
-239
lines changed

.ci.yaml

-11
Original file line numberDiff line numberDiff line change
@@ -2116,17 +2116,6 @@ targets:
21162116
["devicelab", "android", "linux", "pixel", "7pro"]
21172117
task_name: android_semantics_integration_test
21182118

2119-
# linux mokey test
2120-
- name: Linux_mokey android_stack_size_test
2121-
recipe: devicelab/devicelab_drone
2122-
presubmit: false
2123-
bringup: true # https://github.com/flutter/flutter/issues/148085
2124-
timeout: 60
2125-
properties:
2126-
tags: >
2127-
["devicelab", "android", "linux", "mokey"]
2128-
task_name: android_stack_size_test
2129-
21302119
# linux mokey benchmark
21312120
- name: Linux_mokey android_view_scroll_perf__timeline_summary
21322121
recipe: devicelab/devicelab_drone

dev/benchmarks/macrobenchmarks/lib/common.dart

-3
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ const String kHeavyGridViewRouteName = '/heavy_gridview';
2727
const String kRasterCacheUseMemory = '/raster_cache_use_memory';
2828
const String kShaderMaskCacheRouteName = '/shader_mask_cache';
2929
const String kSimpleScrollRouteName = '/simple_scroll';
30-
const String kStackSizeRouteName = '/stack_size';
3130
const String kAnimationWithMicrotasksRouteName = '/animation_with_microtasks';
3231
const String kAnimatedImageRouteName = '/animated_image';
3332
const String kOpacityPeepholeRouteName = '/opacity_peephole';
@@ -62,5 +61,3 @@ const String kGradientPerfStaticConsistentRouteName = '$kGradientPerfRouteName/s
6261
const String kScrollableName = '/macrobenchmark_listview';
6362
const String kOpacityScrollableName = '$kOpacityPeepholeRouteName/listview';
6463
const String kGradientPerfScrollableName = '$kGradientPerfRouteName/listview';
65-
66-
const String kStackSizeKey = 'stack_size';

dev/benchmarks/macrobenchmarks/lib/main.dart

-9
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ import 'src/shader_mask_cache.dart';
4141
import 'src/simple_animation.dart';
4242
import 'src/simple_scroll.dart';
4343
import 'src/sliders.dart';
44-
import 'src/stack_size.dart';
4544
import 'src/text.dart';
4645
import 'src/very_long_picture_scrolling.dart';
4746

@@ -83,7 +82,6 @@ class MacrobenchmarksApp extends StatelessWidget {
8382
kRasterCacheUseMemory: (BuildContext context) => const RasterCacheUseMemory(),
8483
kShaderMaskCacheRouteName: (BuildContext context) => const ShaderMaskCachePage(),
8584
kSimpleScrollRouteName: (BuildContext context) => const SimpleScroll(),
86-
kStackSizeRouteName: (BuildContext context) => const StackSizePage(),
8785
kAnimationWithMicrotasksRouteName: (BuildContext context) => const AnimationWithMicrotasks(),
8886
kAnimatedImageRouteName: (BuildContext context) => const AnimatedImagePage(),
8987
kOpacityPeepholeRouteName: (BuildContext context) => const OpacityPeepholePage(),
@@ -279,13 +277,6 @@ class HomePage extends StatelessWidget {
279277
Navigator.pushNamed(context, kLargeImageChangerRouteName);
280278
},
281279
),
282-
ElevatedButton(
283-
key: const Key(kStackSizeRouteName),
284-
child: const Text('Stack Size'),
285-
onPressed: () {
286-
Navigator.pushNamed(context, kStackSizeRouteName);
287-
},
288-
),
289280
ElevatedButton(
290281
key: const Key(kAnimationWithMicrotasksRouteName),
291282
child: const Text('Animation With Microtasks'),

dev/benchmarks/macrobenchmarks/lib/src/stack_size.dart

-129
This file was deleted.

dev/benchmarks/macrobenchmarks/test_driver/stack_size_perf_test.dart

-38
This file was deleted.

dev/devicelab/bin/tasks/android_stack_size_test.dart

-12
This file was deleted.

dev/devicelab/lib/tasks/perf_tests.dart

-37
Original file line numberDiff line numberDiff line change
@@ -353,43 +353,6 @@ TaskFunction createSlidersPerfTest() {
353353
).run;
354354
}
355355

356-
TaskFunction createStackSizeTest() {
357-
final String testDirectory =
358-
'${flutterDirectory.path}/dev/benchmarks/macrobenchmarks';
359-
const String testTarget = 'test_driver/run_app.dart';
360-
const String testDriver = 'test_driver/stack_size_perf_test.dart';
361-
return () {
362-
return inDirectory<TaskResult>(testDirectory, () async {
363-
final Device device = await devices.workingDevice;
364-
await device.unlock();
365-
final String deviceId = device.deviceId;
366-
await flutter('packages', options: <String>['get']);
367-
368-
await flutter('drive', options: <String>[
369-
'--no-android-gradle-daemon',
370-
'-v',
371-
'--verbose-system-logs',
372-
'--profile',
373-
'-t', testTarget,
374-
'--driver', testDriver,
375-
'-d',
376-
deviceId,
377-
]);
378-
final Map<String, dynamic> data = json.decode(
379-
file('${_testOutputDirectory(testDirectory)}/stack_size.json').readAsStringSync(),
380-
) as Map<String, dynamic>;
381-
382-
final Map<String, dynamic> result = <String, dynamic>{
383-
'stack_size_per_nesting_level': data['stack_size'],
384-
};
385-
return TaskResult.success(
386-
result,
387-
benchmarkScoreKeys: result.keys.toList(),
388-
);
389-
});
390-
};
391-
}
392-
393356
TaskFunction createFullscreenTextfieldPerfTest() {
394357
return PerfTest(
395358
'${flutterDirectory.path}/dev/benchmarks/macrobenchmarks',

0 commit comments

Comments
 (0)