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

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

Issue 2269263002: Make all the rest of the recipes explicitly specify GIT_MODE (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build.git@master
Patch Set: Rebase Created 4 years, 4 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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 self.m.properties['buildername'], 96 self.m.properties['buildername'],
97 use_goma=False, 97 use_goma=False,
98 phase=2) 98 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'], GIT_MODE=True)
107 107
108 # Augment the solution if needed. 108 # Augment the solution if needed.
109 self.m.gclient.c.solutions[0].url += bot_config.get('url_suffix', '') 109 self.m.gclient.c.solutions[0].url += bot_config.get('url_suffix', '')
110 110
111 if self.m.properties.get('slavename') != 'fake_slave': 111 if self.m.properties.get('slavename') != 'fake_slave':
112 self.m.chromium.taskkill() 112 self.m.chromium.taskkill()
113 113
114 self.m.bot_update.ensure_checkout(force=True) 114 self.m.bot_update.ensure_checkout(force=True)
115 if bot_config.get('patch_root'): 115 if bot_config.get('patch_root'):
116 self.m.path['checkout'] = self.m.path['slave_build'].join( 116 self.m.path['checkout'] = self.m.path['slave_build'].join(
117 bot_config.get('patch_root')) 117 bot_config.get('patch_root'))
118 118
119 # First step: compilation of the instrumented build. 119 # First step: compilation of the instrumented build.
120 self._compile_instrumented_image(bot_config) 120 self._compile_instrumented_image(bot_config)
121 121
122 # Second step: profiling of the instrumented build. 122 # Second step: profiling of the instrumented build.
123 self._run_pgo_benchmarks() 123 self._run_pgo_benchmarks()
124 124
125 # Third step: Compilation of the optimized build, this will use the 125 # Third step: Compilation of the optimized build, this will use the
126 # profile data files produced by the previous step. 126 # profile data files produced by the previous step.
127 self._compile_optimized_image(bot_config) 127 self._compile_optimized_image(bot_config)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698