Branching Perfetto for Chrome milestones
Merging a (set of) Perfetto change(s) to a Chrome milestone release requires
creation of a branch in the perfetto repo, cherry-picking of the change(s) to
the branch, and updating the
DEPS file in Chrome's milestone branch to point
to the new perfetto branch's head.
Determine the branch name:
XXXXis the branch number of the milestone (see Chromium Dash). Example for M87:
Look up the appropriate base revision for the branch. You should use the revision that Chromium's
DEPSof the milestone branch points to (search for
perfettoin the file). The
DEPSfile for branch XXXX is at:
Example for M87:
DEPS(at time of writing) points to
Create the branch - the easiest way to do this is via Gerrit's branch page. The
NEW BRANCHbutton on the top right opens a wizard - fill in the branch name and base revision determined above. If this fails with a permission issue, contact the Discord chat or perfetto-dev mailing list.
If there are no merge conflicts, cherry-picking via Gerrit will be easiest. To attempt this, open your change in Gerrit and use the
Cherry pickentry in the overflow menu on the top right, providing the
chromium/XXXXbranch name (see above).
Otherwise, merge the patch locally into a branch tracking
origin/chromium/XXXXand upload a Gerrit change as usual:
git fetch origin git checkout -tb cpick origin/chromium/XXXX git cherry-pick -x <commit hash> # Resolve conflicts manually. tools/gen_all out/xxx # If necessary. git cl upload # Remove "Change-Id:" lines from commit message.
Send the patch for review and land it. Note the commit's revision hash.
Create, send for review, and land a Chromium patch that edits the top-level
DEPSfile on the Chromium's milestone branch. You can also combine this step with cherry-picks of any chromium changes. For details, see Chromium's docs. It amounts to:
$ gclient sync --with_branch_heads $ git fetch $ git checkout -tb perfetto_uprev refs/remotes/branch-heads/XXXX $ ... # Edit DEPS. $ git cl upload