OLD | NEW |
1 # Copyright 2016 The Chromium Authors. All rights reserved. | 1 # Copyright 2016 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 | 5 |
6 # Recipe module for Skia Swarming perf. | 6 # Recipe module for Skia Swarming perf. |
7 | 7 |
8 | 8 |
9 DEPS = [ | 9 DEPS = [ |
10 'build/file', | 10 'build/file', |
11 'core', | 11 'core', |
12 'recipe_engine/json', | 12 'recipe_engine/json', |
13 'recipe_engine/path', | 13 'recipe_engine/path', |
14 'recipe_engine/platform', | 14 'recipe_engine/platform', |
15 'recipe_engine/properties', | 15 'recipe_engine/properties', |
16 'recipe_engine/raw_io', | 16 'recipe_engine/raw_io', |
17 'run', | 17 'run', |
18 'flavor', | 18 'flavor', |
19 'vars', | 19 'vars', |
20 ] | 20 ] |
21 | 21 |
22 | 22 |
23 TEST_BUILDERS = { | 23 TEST_BUILDERS = { |
24 'client.skia': { | 24 'client.skia': { |
25 'skiabot-linux-swarm-000': [ | 25 'skiabot-linux-swarm-000': [ |
| 26 #'Perf-Android-GCC-GalaxyS3-GPU-Mali400-Arm7-Release', |
| 27 #'Perf-Android-GCC-Nexus5-GPU-Adreno330-Arm7-Debug', |
| 28 #'Perf-Android-GCC-Nexus6-GPU-Adreno420-Arm7-Release', |
| 29 'Perf-Android-GCC-Nexus7-GPU-Tegra3-Arm7-Release', |
| 30 #'Perf-Android-GCC-NexusPlayer-GPU-PowerVR-x86-Release', |
| 31 #'Perf-Android-GCC-NVIDIA_Shield-GPU-TegraX1-Arm64-Debug-Vulkan', |
| 32 #'Perf-iOS-Clang-iPad4-GPU-SGX554-Arm7-Debug', |
| 33 #'Perf-Mac-Clang-MacMini6.2-CPU-AVX-x86_64-Release-GN', |
| 34 'Perf-Ubuntu-GCC-ShuttleA-GPU-GTX550Ti-x86_64-Release-Valgrind', |
| 35 'Perf-Ubuntu-GCC-ShuttleA-GPU-GTX550Ti-x86_64-Release-VisualBench', |
26 'Perf-Win-MSVC-GCE-CPU-AVX2-x86_64-Release', | 36 'Perf-Win-MSVC-GCE-CPU-AVX2-x86_64-Release', |
27 'Perf-Win-MSVC-GCE-CPU-AVX2-x86_64-Debug', | 37 'Perf-Win-MSVC-GCE-CPU-AVX2-x86_64-Debug', |
28 'Perf-Win8-MSVC-ShuttleB-GPU-HD4600-x86_64-Release-Trybot', | 38 'Perf-Win8-MSVC-ShuttleB-GPU-HD4600-x86_64-Release-Trybot', |
29 'Perf-Ubuntu-GCC-ShuttleA-GPU-GTX550Ti-x86_64-Release-Valgrind', | |
30 'Perf-Android-GCC-Nexus7-GPU-Tegra3-Arm7-Release', | |
31 'Perf-Ubuntu-GCC-ShuttleA-GPU-GTX550Ti-x86_64-Release-VisualBench', | |
32 ], | 39 ], |
33 }, | 40 }, |
34 } | 41 } |
35 | 42 |
36 | 43 |
| 44 def nanobench_flags(bot): |
| 45 args = ['--pre_log'] |
| 46 |
| 47 if 'GPU' in bot: |
| 48 args.append('--images') |
| 49 args.extend(['--gpuStatsDump', 'true']) |
| 50 |
| 51 if 'Android' in bot and 'GPU' in bot: |
| 52 args.extend(['--useThermalManager', '1,1,10,1000']) |
| 53 |
| 54 args.extend(['--scales', '1.0', '1.1']) |
| 55 |
| 56 if 'iOS' in bot: |
| 57 args.extend(['--skps', 'ignore_skps']) # pragma: no cover |
| 58 |
| 59 config = ['565', '8888', 'gpu', 'nonrendering', 'angle', 'hwui' ] |
| 60 config += [ 'f16', 'srgb' ] |
| 61 # The S4 crashes and the NP produces a long error stream when we run with |
| 62 # MSAA. |
| 63 if ('GalaxyS4' not in bot and |
| 64 'NexusPlayer' not in bot): |
| 65 if 'Android' in bot: |
| 66 # The TegraX1 has a regular OpenGL implementation. We bench that instead |
| 67 # of ES. |
| 68 if 'TegraX1' in bot: # pragma: no cover |
| 69 config.remove('gpu') |
| 70 config.extend(['gl', 'glmsaa4', 'glnvpr4', 'glnvprdit4']) |
| 71 else: |
| 72 config.extend(['msaa4', 'nvpr4', 'nvprdit4']) |
| 73 else: |
| 74 config.extend(['msaa16', 'nvpr16', 'nvprdit16']) |
| 75 |
| 76 # Bench instanced rendering on a limited number of platforms |
| 77 if 'Nexus6' in bot: # pragma: no cover |
| 78 config.append('esinst') # esinst4 isn't working yet on Adreno. |
| 79 elif 'TegraX1' in bot: |
| 80 config.extend(['glinst', 'glinst4']) # pragma: no cover |
| 81 elif 'MacMini6.2' in bot: |
| 82 config.extend(['glinst', 'glinst16']) # pragma: no cover |
| 83 |
| 84 if 'Vulkan' in bot: |
| 85 config = ['vk'] # pragma: no cover |
| 86 |
| 87 args.append('--config') |
| 88 args.extend(config) |
| 89 |
| 90 if 'Valgrind' in bot: |
| 91 # Don't care about Valgrind performance. |
| 92 args.extend(['--loops', '1']) |
| 93 args.extend(['--samples', '1']) |
| 94 # Ensure that the bot framework does not think we have timed out. |
| 95 args.extend(['--keepAlive', 'true']) |
| 96 |
| 97 match = [] |
| 98 if 'Android' in bot: |
| 99 # Segfaults when run as GPU bench. Very large texture? |
| 100 match.append('~blurroundrect') |
| 101 match.append('~patch_grid') # skia:2847 |
| 102 match.append('~desk_carsvg') |
| 103 if 'NexusPlayer' in bot: |
| 104 match.append('~desk_unicodetable') # pragma: no cover |
| 105 if 'Nexus5' in bot: # pragma: no cover |
| 106 match.append('~keymobi_shop_mobileweb_ebay_com.skp') # skia:5178 |
| 107 if 'iOS' in bot: # pragma: no cover |
| 108 match.append('~blurroundrect') |
| 109 match.append('~patch_grid') # skia:2847 |
| 110 match.append('~desk_carsvg') |
| 111 match.append('~keymobi') |
| 112 match.append('~path_hairline') |
| 113 match.append('~GLInstancedArraysBench') # skia:4714 |
| 114 |
| 115 # the 32-bit GCE bots run out of memory in DM when running these large images |
| 116 # so defensively disable them in nanobench, too. |
| 117 # FIXME (scroggo): This may have just been due to SkImageDecoder's |
| 118 # buildTileIndex leaking memory (https://bug.skia.org/4360). That is |
| 119 # disabled by default for nanobench, so we may not need this. |
| 120 # FIXME (scroggo): Share image blacklists between dm and nanobench? |
| 121 if 'x86' in bot and not 'x86-64' in bot: |
| 122 match.append('~interlaced1.png') |
| 123 match.append('~interlaced2.png') |
| 124 match.append('~interlaced3.png') |
| 125 |
| 126 # This low-end Android bot crashes about 25% of the time while running the |
| 127 # (somewhat intense) shapes benchmarks. |
| 128 if 'Perf-Android-GCC-GalaxyS3-GPU-Mali400-Arm7-Release' in bot: |
| 129 match.append('~shapes_') # pragma: no cover |
| 130 |
| 131 # We do not need or want to benchmark the decodes of incomplete images. |
| 132 # In fact, in nanobench we assert that the full image decode succeeds. |
| 133 match.append('~inc0.gif') |
| 134 match.append('~inc1.gif') |
| 135 match.append('~incInterlaced.gif') |
| 136 match.append('~inc0.jpg') |
| 137 match.append('~incGray.jpg') |
| 138 match.append('~inc0.wbmp') |
| 139 match.append('~inc1.wbmp') |
| 140 match.append('~inc0.webp') |
| 141 match.append('~inc1.webp') |
| 142 match.append('~inc0.ico') |
| 143 match.append('~inc1.ico') |
| 144 match.append('~inc0.png') |
| 145 match.append('~inc1.png') |
| 146 match.append('~inc2.png') |
| 147 match.append('~inc12.png') |
| 148 match.append('~inc13.png') |
| 149 match.append('~inc14.png') |
| 150 match.append('~inc0.webp') |
| 151 match.append('~inc1.webp') |
| 152 |
| 153 if match: |
| 154 args.append('--match') |
| 155 args.extend(match) |
| 156 |
| 157 return args |
| 158 |
| 159 |
37 def perf_steps(api): | 160 def perf_steps(api): |
38 """Run Skia benchmarks.""" | 161 """Run Skia benchmarks.""" |
39 if api.vars.upload_perf_results: | 162 if api.vars.upload_perf_results: |
40 api.flavor.create_clean_device_dir( | 163 api.flavor.create_clean_device_dir( |
41 api.flavor.device_dirs.perf_data_dir) | 164 api.flavor.device_dirs.perf_data_dir) |
42 | 165 |
43 # Run nanobench. | 166 # Run nanobench. |
44 properties = [ | 167 properties = [ |
45 '--properties', | 168 '--properties', |
46 'gitHash', api.vars.got_revision, | 169 'gitHash', api.vars.got_revision, |
(...skipping 17 matching lines...) Expand all Loading... |
64 api.flavor.device_dirs.images_dir, 'nanobench'), | 187 api.flavor.device_dirs.images_dir, 'nanobench'), |
65 ] | 188 ] |
66 | 189 |
67 skip_flag = None | 190 skip_flag = None |
68 if api.vars.builder_cfg.get('cpu_or_gpu') == 'CPU': | 191 if api.vars.builder_cfg.get('cpu_or_gpu') == 'CPU': |
69 skip_flag = '--nogpu' | 192 skip_flag = '--nogpu' |
70 elif api.vars.builder_cfg.get('cpu_or_gpu') == 'GPU': | 193 elif api.vars.builder_cfg.get('cpu_or_gpu') == 'GPU': |
71 skip_flag = '--nocpu' | 194 skip_flag = '--nocpu' |
72 if skip_flag: | 195 if skip_flag: |
73 args.append(skip_flag) | 196 args.append(skip_flag) |
74 args.extend(api.vars.builder_spec['nanobench_flags']) | 197 args.extend(nanobench_flags(api.vars.builder_name)) |
75 | 198 |
76 if api.vars.upload_perf_results: | 199 if api.vars.upload_perf_results: |
77 json_path = api.flavor.device_path_join( | 200 json_path = api.flavor.device_path_join( |
78 api.flavor.device_dirs.perf_data_dir, | 201 api.flavor.device_dirs.perf_data_dir, |
79 'nanobench_%s.json' % api.vars.got_revision) | 202 'nanobench_%s.json' % api.vars.got_revision) |
80 args.extend(['--outResultsFile', json_path]) | 203 args.extend(['--outResultsFile', json_path]) |
81 args.extend(properties) | 204 args.extend(properties) |
82 | 205 |
83 keys_blacklist = ['configuration', 'role', 'is_trybot'] | 206 keys_blacklist = ['configuration', 'role', 'is_trybot'] |
84 args.append('--key') | 207 args.append('--key') |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 api.run.check_failure() | 239 api.run.check_failure() |
117 | 240 |
118 | 241 |
119 def GenTests(api): | 242 def GenTests(api): |
120 def AndroidTestData(builder): | 243 def AndroidTestData(builder): |
121 test_data = ( | 244 test_data = ( |
122 api.step_data( | 245 api.step_data( |
123 'get EXTERNAL_STORAGE dir', | 246 'get EXTERNAL_STORAGE dir', |
124 stdout=api.raw_io.output('/storage/emulated/legacy')) + | 247 stdout=api.raw_io.output('/storage/emulated/legacy')) + |
125 api.step_data( | 248 api.step_data( |
126 'adb root', | |
127 stdout=api.raw_io.output('restarting adbd as root')) + | |
128 api.step_data( | |
129 'read SKP_VERSION', | 249 'read SKP_VERSION', |
130 stdout=api.raw_io.output('42')) + | 250 stdout=api.raw_io.output('42')) + |
131 api.step_data( | 251 api.step_data( |
132 'read SK_IMAGE_VERSION', | 252 'read SK_IMAGE_VERSION', |
133 stdout=api.raw_io.output('42')) + | 253 stdout=api.raw_io.output('42')) + |
134 api.step_data( | 254 api.step_data( |
135 'exists skia_perf', | |
136 stdout=api.raw_io.output('')) + | |
137 api.step_data( | |
138 'which adb', | 255 'which adb', |
139 retcode=1) | 256 retcode=1) |
140 ) | 257 ) |
| 258 if not 'Debug' in builder: |
| 259 test_data += api.step_data( |
| 260 'exists skia_perf', |
| 261 stdout=api.raw_io.output('')) |
| 262 if not 'GalaxyS3' in builder: |
| 263 test_data += api.step_data( |
| 264 'adb root', |
| 265 stdout=api.raw_io.output('restarting adbd as root')) |
141 return test_data | 266 return test_data |
142 | 267 |
143 for mastername, slaves in TEST_BUILDERS.iteritems(): | 268 for mastername, slaves in TEST_BUILDERS.iteritems(): |
144 for slavename, builders_by_slave in slaves.iteritems(): | 269 for slavename, builders_by_slave in slaves.iteritems(): |
145 for builder in builders_by_slave: | 270 for builder in builders_by_slave: |
146 test = ( | 271 test = ( |
147 api.test(builder) + | 272 api.test(builder) + |
148 api.properties(buildername=builder, | 273 api.properties(buildername=builder, |
149 mastername=mastername, | 274 mastername=mastername, |
150 slavename=slavename, | 275 slavename=slavename, |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
190 api.path.exists( | 315 api.path.exists( |
191 api.path['slave_build'].join('skia'), | 316 api.path['slave_build'].join('skia'), |
192 api.path['slave_build'].join('skia', 'infra', 'bots', 'assets', | 317 api.path['slave_build'].join('skia', 'infra', 'bots', 'assets', |
193 'skimage', 'VERSION'), | 318 'skimage', 'VERSION'), |
194 api.path['slave_build'].join('skia', 'infra', 'bots', 'assets', | 319 api.path['slave_build'].join('skia', 'infra', 'bots', 'assets', |
195 'skp', 'VERSION'), | 320 'skp', 'VERSION'), |
196 api.path['slave_build'].join('tmp', 'uninteresting_hashes.txt') | 321 api.path['slave_build'].join('tmp', 'uninteresting_hashes.txt') |
197 ) + | 322 ) + |
198 api.platform('win', 64) | 323 api.platform('win', 64) |
199 ) | 324 ) |
OLD | NEW |