| OLD | NEW |
| 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 self.m.file.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', 'vs_files', 'VC', 'bin') | 62 'win_toolchain', 'vs_files', 'VC', 'bin') |
| 63 # Make sure that we're using the x64 version of pgosweep for the x64 builds. |
| 64 if self.m.chromium.c.TARGET_BITS == 64: |
| 65 pgosweep_path = pgosweep_path.join('amd64') |
| 63 pgo_env = { | 66 pgo_env = { |
| 64 'PATH': '%s;%s;%s' % ( | 67 'PATH': '%s;%s;%s' % ( |
| 65 pgosweep_path, self.m.chromium.output_dir, '%(PATH)s'), | 68 pgosweep_path, self.m.chromium.output_dir, '%(PATH)s'), |
| 66 'PogoSafeMode': 1 | 69 'PogoSafeMode': 1 |
| 67 } | 70 } |
| 68 pgo_args = ['--profiler=win_pgo_profiler'] | 71 pgo_args = ['--profiler=win_pgo_profiler'] |
| 69 | 72 |
| 70 for benchmark in _BENCHMARKS_TO_RUN: | 73 for benchmark in _BENCHMARKS_TO_RUN: |
| 71 try: | 74 try: |
| 72 self.m.chromium.run_telemetry_benchmark(benchmark_name=benchmark, | 75 self.m.chromium.run_telemetry_benchmark(benchmark_name=benchmark, |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 | 110 |
| 108 # First step: compilation of the instrumented build. | 111 # First step: compilation of the instrumented build. |
| 109 self._compile_instrumented_image(bot_config) | 112 self._compile_instrumented_image(bot_config) |
| 110 | 113 |
| 111 # Second step: profiling of the instrumented build. | 114 # Second step: profiling of the instrumented build. |
| 112 self._run_pgo_benchmarks() | 115 self._run_pgo_benchmarks() |
| 113 | 116 |
| 114 # Third step: Compilation of the optimized build, this will use the | 117 # Third step: Compilation of the optimized build, this will use the |
| 115 # profile data files produced by the previous step. | 118 # profile data files produced by the previous step. |
| 116 self._compile_optimized_image(bot_config) | 119 self._compile_optimized_image(bot_config) |
| OLD | NEW |