Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. | |
| 2 # Use of this source code is governed by a BSD-style license that can be | |
| 3 # found in the LICENSE file. | |
| 4 | |
| 5 DEPS = [ | |
| 6 'bot_update', | |
| 7 'chromium', | |
| 8 'gclient', | |
| 9 'path', | |
| 10 'platform', | |
| 11 'properties', | |
| 12 'python', | |
| 13 'step', | |
| 14 ] | |
| 15 | |
| 16 | |
| 17 # List of the benchmark that we run during the profiling step. | |
| 18 _BENCHMARKS_TO_RUN = { | |
| 19 'peacekeeper.dom', | |
| 20 'peacekeeper.array', | |
| 21 'peacekeeper.html5', | |
| 22 'peacekeeper.string', | |
| 23 'peacekeeper.render', | |
| 24 'dromaeo.domcoreattr', | |
| 25 'dromaeo.domcoremodify', | |
| 26 'dromaeo.domcorequery', | |
| 27 'dromaeo.domcoretraverse', | |
| 28 'dromaeo.jslibattrjquery', | |
| 29 'dromaeo.jslibattrprototype', | |
| 30 'dromaeo.jslibeventjquery', | |
| 31 'dromaeo.jslibeventprototype', | |
| 32 'dromaeo.jslibmodifyjquery', | |
| 33 'dromaeo.jslibmodifyprototype', | |
| 34 'dromaeo.jslibstylejquery', | |
| 35 'dromaeo.jslibstyleprototype', | |
| 36 'dromaeo.jslibtraversejquery', | |
| 37 'dromaeo.jslibtraverseprototype', | |
| 38 'sunspider', | |
| 39 'jsgamebench', | |
| 40 'kraken', | |
| 41 } | |
| 42 | |
| 43 | |
| 44 # Run a telemetry benchmark under the Windows PGO profiler. | |
| 45 def RunTelemetryBenchmark(api, testname): | |
| 46 return api.python( | |
| 47 'Telemetry benchmark: %s' % testname, | |
| 48 api.path['checkout'].join('tools', 'perf', 'run_benchmark'), | |
| 49 ['--profiler=win_pgo_profiler', '--use-live-sites', testname] | |
| 50 ) | |
| 51 | |
| 52 | |
| 53 def GenSteps(api): | |
| 54 api.step.auto_resolve_conflicts = True | |
| 55 api.chromium.set_config('chrome_pgo_instrument', | |
| 56 { 'BUILD_CONFIG': 'Release' }) | |
|
iannucci
2014/07/03 19:31:41
Just `BUILD_CONFIG='Release'`
Sébastien Marchand
2014/07/03 20:03:26
Done.
| |
| 57 api.gclient.set_config('chromium_lkgr') | |
| 58 | |
| 59 yield api.chromium.taskkill() | |
| 60 yield api.bot_update.ensure_checkout() | |
| 61 | |
| 62 # First step: compilation of the instrumented build. | |
| 63 yield api.chromium.runhooks() | |
| 64 yield api.chromium.compile() | |
| 65 | |
| 66 # Remove the profile files from the previous builds. | |
| 67 yield api.path.rmwildcard('*.pgc', | |
| 68 str(api.chromium.output_dir)) | |
| 69 | |
| 70 # Second step: profiling of the instrumented build. | |
| 71 for benchmark in _BENCHMARKS_TO_RUN: | |
| 72 yield RunTelemetryBenchmark(api, benchmark) | |
| 73 | |
| 74 # Third step: Compilation of the optimized build, this will use the profile | |
| 75 # data files produced by the previous step. | |
| 76 api.chromium.set_config('chrome_pgo_optimize', { 'BUILD_CONFIG': 'Release' }) | |
|
iannucci
2014/07/03 19:31:41
same deal w/ kwargs. Right now the second paramete
Sébastien Marchand
2014/07/03 20:03:26
Thanks for the explanation, fixed :)
| |
| 77 yield api.chromium.runhooks() | |
| 78 yield api.chromium.compile() | |
| 79 | |
| 80 | |
| 81 def GenTests(api): | |
| 82 mastername = 'chromium.fyi' | |
| 83 buildername = 'Chromium Win PGO Builder' | |
| 84 | |
| 85 def _sanitize_nonalpha(text): | |
| 86 return ''.join(c if c.isalnum() else '_' for c in text) | |
| 87 | |
| 88 yield ( | |
| 89 api.test('full_%s_%s' % (_sanitize_nonalpha(mastername), | |
| 90 _sanitize_nonalpha(buildername))) + | |
| 91 api.properties.generic(mastername=mastername, buildername=buildername) + | |
| 92 api.platform('win', 32) | |
| 93 ) | |
| OLD | NEW |