Contributing to Perfetto

Quickstart

NOTE: In March 2025 our team has moved the primary development of Perfetto to GitHub (previously on Android Gerrit)

Perfetto can be built on Windows, Mac or Linux. However, setting up the environment on Windows is complicated so is not covered by this quickstart.

Prerequisites: git and python3.

Setup:

git clone https://github.com/google/perfetto.git cd perfetto tools/install-build-deps tools/setup_all_configs.py

Building

On Linux

For production:

tools/ninja -C out/linux_clang_release

For debug:

tools/ninja -C out/linux_clang_debug

On Mac

For production:

tools/ninja -C out/mac_release

For debug:

tools/ninja -C out/mac_debug

Contributing

Google-employees: follow instructions at go/perfetto-github-instructions

  1. Make sure you/your organization has signed the Google CLA at cla.developers.google.com
  2. Send pull requests to our project on GitHub.
  3. Create a branch with the change:git checkout -b first-contribution
  4. Make change in the repo.
  5. Add, commit and upload the change:git add . git commit -m "My first contribution" gh pr create # Requires cli.github.com

Repository

This project uses GitHub pull requests for code reviews, follows the Google C++ style, and targets -std=c++17.

Development happens in the GitHub repository: https://github.com/google/perfetto

Continuous integration

The Perfetto CI on GitHub Actions covers building and testing on most platforms and toolchains within ~30 mins. Anecdotally most build failures and bugs are detected at the Perfetto CI level.

You can also test a pending Perfetto CL against Chrome's TryBots.

Community

You can reach us on our Discord channel.

Mailing list: https://groups.google.com/forum/#!forum/perfetto-dev

This project follows Google's Open Source Community Guidelines.

Bugs

For bugs affecting Android or the tracing internals:

For bugs affecting Chrome Tracing:

Contributor License Agreement

Contributions to this project must be accompanied by a Contributor License Agreement. You (or your employer) retain the copyright to your contribution; this simply gives us permission to use and redistribute your contributions as part of the project. Head over to https://cla.developers.google.com/ to see your current agreements on file or to sign a new one.

You generally only need to submit a CLA once, so if you've already submitted one (even if it was for a different project), you probably don't need to do it again.