Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(31)

Side by Side Diff: scripts/slave/recipes/chromium_pgo.py

Issue 302763003: First version of the PGO recipe. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: Fix the kwargs passed to set_config Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(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', BUILD_CONFIG='Release')
56 api.gclient.set_config('chromium_lkgr')
57
58 yield api.chromium.taskkill()
59 yield api.bot_update.ensure_checkout()
60
61 # First step: compilation of the instrumented build.
62 yield api.chromium.runhooks()
63 yield api.chromium.compile()
64
65 # Remove the profile files from the previous builds.
66 yield api.path.rmwildcard('*.pgc',
67 str(api.chromium.output_dir))
68
69 # Second step: profiling of the instrumented build.
70 for benchmark in _BENCHMARKS_TO_RUN:
71 yield RunTelemetryBenchmark(api, benchmark)
72
73 # Third step: Compilation of the optimized build, this will use the profile
74 # data files produced by the previous step.
75 api.chromium.set_config('chrome_pgo_optimize', BUILD_CONFIG='Release')
76 yield api.chromium.runhooks()
77 yield api.chromium.compile()
78
79
80 def GenTests(api):
81 mastername = 'chromium.fyi'
82 buildername = 'Chromium Win PGO Builder'
83
84 def _sanitize_nonalpha(text):
85 return ''.join(c if c.isalnum() else '_' for c in text)
86
87 yield (
88 api.test('full_%s_%s' % (_sanitize_nonalpha(mastername),
89 _sanitize_nonalpha(buildername))) +
90 api.properties.generic(mastername=mastername, buildername=buildername) +
91 api.platform('win', 32)
92 )
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698