gecko-dev/taskcluster/taskgraph/transforms/run_pgo_profile.py
Mike Shal 8e7f2fc16c Bug 1507334 - Taskcluster configurations for 3-tier PGO; r=tomprince,firefox-build-system-reviewers,chmanchester#firefox-build-system-reviewers
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
2019-01-10 01:34:58 +00:00

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