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

Side by Side Diff: scripts/slave/recipe_modules/pgo/api.py

Issue 2390753005: Double Builds for Blimp Integration Test Infrastructure on FYI bot (Closed)
Patch Set: Dirk comment Created 4 years, 2 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
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 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 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 from recipe_engine import recipe_api 5 from recipe_engine import recipe_api
6 6
7 7
8 # List of the benchmark that we run during the profiling step. 8 # List of the benchmark that we run during the profiling step.
9 # 9 #
10 # TODO(sebmarchand): Move this into a BenchmarkSuite in telemetry, this way 10 # TODO(sebmarchand): Move this into a BenchmarkSuite in telemetry, this way
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 """ 49 """
50 Generates the instrumented version of the binaries. 50 Generates the instrumented version of the binaries.
51 """ 51 """
52 self.m.chromium.set_config(bot_config['chromium_config_instrument'], 52 self.m.chromium.set_config(bot_config['chromium_config_instrument'],
53 **bot_config.get('chromium_config_kwargs')) 53 **bot_config.get('chromium_config_kwargs'))
54 self.m.chromium.runhooks(name='Runhooks: Instrumentation phase.') 54 self.m.chromium.runhooks(name='Runhooks: Instrumentation phase.')
55 self.m.chromium.run_mb( 55 self.m.chromium.run_mb(
56 self.m.properties['mastername'], 56 self.m.properties['mastername'],
57 self.m.properties['buildername'], 57 self.m.properties['buildername'],
58 use_goma=False, 58 use_goma=False,
59 phase=1) 59 phase='pgo_phase_1')
Dirk Pranke 2016/10/07 19:03:04 See my comments in https://codereview.chromium.org
60 # Remove the profile files from the previous builds. 60 # Remove the profile files from the previous builds.
61 self.m.file.rmwildcard('*.pg[cd]', str(self.m.chromium.output_dir)) 61 self.m.file.rmwildcard('*.pg[cd]', str(self.m.chromium.output_dir))
62 self.m.chromium.compile(name='Compile: Instrumentation phase.') 62 self.m.chromium.compile(name='Compile: Instrumentation phase.')
63 63
64 def _run_pgo_benchmarks(self): 64 def _run_pgo_benchmarks(self):
65 """ 65 """
66 Run a suite of telemetry benchmarks to generate some profiling data. 66 Run a suite of telemetry benchmarks to generate some profiling data.
67 """ 67 """
68 for benchmark in _BENCHMARKS_TO_RUN: 68 for benchmark in _BENCHMARKS_TO_RUN:
69 try: 69 try:
(...skipping 18 matching lines...) Expand all
88 """ 88 """
89 Generates the optimized version of the binaries. 89 Generates the optimized version of the binaries.
90 """ 90 """
91 self.m.chromium.set_config(bot_config['chromium_config_optimize'], 91 self.m.chromium.set_config(bot_config['chromium_config_optimize'],
92 **bot_config.get('chromium_config_kwargs')) 92 **bot_config.get('chromium_config_kwargs'))
93 self.m.chromium.runhooks(name='Runhooks: Optimization phase.') 93 self.m.chromium.runhooks(name='Runhooks: Optimization phase.')
94 self.m.chromium.run_mb( 94 self.m.chromium.run_mb(
95 self.m.properties['mastername'], 95 self.m.properties['mastername'],
96 self.m.properties['buildername'], 96 self.m.properties['buildername'],
97 use_goma=False, 97 use_goma=False,
98 phase=2) 98 phase='pgo_phase_2')
99 self.m.chromium.compile(name='Compile: Optimization phase.') 99 self.m.chromium.compile(name='Compile: Optimization phase.')
100 100
101 def compile_pgo(self, bot_config): 101 def compile_pgo(self, bot_config):
102 """ 102 """
103 Do a PGO build. This takes care of building an instrumented image, profiling 103 Do a PGO build. This takes care of building an instrumented image, profiling
104 it and then compiling the optimized version of it. 104 it and then compiling the optimized version of it.
105 """ 105 """
106 self.m.gclient.set_config(bot_config['gclient_config']) 106 self.m.gclient.set_config(bot_config['gclient_config'])
107 107
108 # Augment the DEPS path if needed. 108 # Augment the DEPS path if needed.
(...skipping 11 matching lines...) Expand all
120 120
121 # First step: compilation of the instrumented build. 121 # First step: compilation of the instrumented build.
122 self._compile_instrumented_image(bot_config) 122 self._compile_instrumented_image(bot_config)
123 123
124 # Second step: profiling of the instrumented build. 124 # Second step: profiling of the instrumented build.
125 self._run_pgo_benchmarks() 125 self._run_pgo_benchmarks()
126 126
127 # Third step: Compilation of the optimized build, this will use the 127 # Third step: Compilation of the optimized build, this will use the
128 # profile data files produced by the previous step. 128 # profile data files produced by the previous step.
129 self._compile_optimized_image(bot_config) 129 self._compile_optimized_image(bot_config)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698