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

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

Issue 1101673005: Extract functions from path recipe module so that step can depend on it (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: Created 5 years, 8 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
« no previous file with comments | « scripts/slave/recipe_modules/pgo/__init__.py ('k') | scripts/slave/recipe_modules/skia/api.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 slave import recipe_api 5 from slave 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 super(PGOApi, self).__init__(**kwargs) 43 super(PGOApi, self).__init__(**kwargs)
44 44
45 def _compile_instrumented_image(self, bot_config): 45 def _compile_instrumented_image(self, bot_config):
46 """ 46 """
47 Generates the instrumented version of the binaries. 47 Generates the instrumented version of the binaries.
48 """ 48 """
49 self.m.chromium.set_config(bot_config['chromium_config_instrument'], 49 self.m.chromium.set_config(bot_config['chromium_config_instrument'],
50 **bot_config.get('chromium_config_kwargs')) 50 **bot_config.get('chromium_config_kwargs'))
51 self.m.chromium.runhooks(name='Runhooks: Instrumentation phase.') 51 self.m.chromium.runhooks(name='Runhooks: Instrumentation phase.')
52 # Remove the profile files from the previous builds. 52 # Remove the profile files from the previous builds.
53 self.m.path.rmwildcard('*.pg[cd]', str(self.m.chromium.output_dir)) 53 self.m.file.rmwildcard('*.pg[cd]', str(self.m.chromium.output_dir))
54 self.m.chromium.compile(name='Compile: Instrumentation phase.', 54 self.m.chromium.compile(name='Compile: Instrumentation phase.',
55 force_clobber=bot_config.get('clobber', False)) 55 force_clobber=bot_config.get('clobber', False))
56 56
57 def _run_pgo_benchmarks(self): 57 def _run_pgo_benchmarks(self):
58 """ 58 """
59 Run a suite of telemetry benchmarks to generate some profiling data. 59 Run a suite of telemetry benchmarks to generate some profiling data.
60 """ 60 """
61 pgosweep_path = self.m.path['depot_tools'].join( 61 pgosweep_path = self.m.path['depot_tools'].join(
62 'win_toolchain', 'vs2013_files', 'VC', 'bin') 62 'win_toolchain', 'vs2013_files', 'VC', 'bin')
63 pgo_env = {'PATH': '%s;%s' % (pgosweep_path, '%(PATH)s')} 63 pgo_env = {'PATH': '%s;%s' % (pgosweep_path, '%(PATH)s')}
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 113
114 # First step: compilation of the instrumented build. 114 # First step: compilation of the instrumented build.
115 self._compile_instrumented_image(bot_config) 115 self._compile_instrumented_image(bot_config)
116 116
117 # Second step: profiling of the instrumented build. 117 # Second step: profiling of the instrumented build.
118 self._run_pgo_benchmarks() 118 self._run_pgo_benchmarks()
119 119
120 # Third step: Compilation of the optimized build, this will use the profile 120 # Third step: Compilation of the optimized build, this will use the profile
121 # data files produced by the previous step. 121 # data files produced by the previous step.
122 self._compile_optimized_image(bot_config) 122 self._compile_optimized_image(bot_config)
OLDNEW
« no previous file with comments | « scripts/slave/recipe_modules/pgo/__init__.py ('k') | scripts/slave/recipe_modules/skia/api.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698