mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-11-11 05:39:41 +02:00
Two new kinds are introduced - 'instrumented-build' and 'generate-profile'. The instrumented-build kind is almost identical to the build kind, except it can be used earlier in the task graph. The 3-tier PGO process becomes: instrumented-build -> generate-profile -> build The final build stage is identical to any other build, except it has the 'use-pgo' flag set to True in its task definition. This flag causes the transforms to add the instrumented-build and generate-profile tasks to the taskgraph. Differential Revision: https://phabricator.services.mozilla.com/D15750 --HG-- extra : moz-landing-system : lando
23 lines
705 B
Python
23 lines
705 B
Python
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
"""
|
|
Apply some defaults and minor modifications to the pgo jobs.
|
|
"""
|
|
|
|
from __future__ import absolute_import, print_function, unicode_literals
|
|
|
|
from taskgraph.transforms.base import TransformSequence
|
|
|
|
import logging
|
|
logger = logging.getLogger(__name__)
|
|
|
|
transforms = TransformSequence()
|
|
|
|
|
|
@transforms.add
|
|
def run_profile_data(config, jobs):
|
|
for job in jobs:
|
|
instr = 'instrumented-build-{}'.format(job['name'])
|
|
job.setdefault('fetches', {})[instr] = ['target.tar.bz2']
|
|
yield job
|