• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Contributing to Perfetto
2
3## Repository
4
5This project uses [Android AOSP Gerrit][perfetto-gerrit] for code reviews,
6follows the [Google C++ style][google-cpp-style], and targets `-std=c++11`.
7
8Development happens in the AOSP repository:
9https://android.googlesource.com/platform/external/perfetto/
10
11https://github.com/google/perfetto is an up-to-date and actively maintained
12read-only mirror of the above. Pull requests through GitHub are not accepted.
13
14## Code Reviews
15
16All submissions, including submissions by project members, require review.
17We use [Android AOSP Gerrit][perfetto-gerrit] for this purpose.
18
19`git cl upload` from [Chromium depot tools][depot-tools] is the preferred
20workflow to upload patches, as it takes care of runing presubmit tests,
21build-file generators and code formatting.
22
23If you submit code directly through `repo` and your CL touches build files or
24.proto files, it's very likely that it will fail in the CI because the
25aforementioned generators are bypassed.
26
27## Continuous integration
28
29There are two levels of CI / TryBots involved when submitting a Perfetto CL:
30
31- [ci.perfetto.dev](https://ci.perfetto.dev): it covers building and testing
32  on most platforms and toolchains within ~15 mins. Anecdotally most build
33  failures and bugs are detected at the Perfetto CI level.
34
35- The [Android CI](https://ci.android.com) (also known as TreeHugger) builds a
36  full system image and runs full integration tests within ~2-4 hours. This can
37  shake a number of more rare integration bugs, often related with SELinux,
38  initrc files or similar.
39
40Both CIs are kicked in when the `Presubmit-Ready: +1` is set and will publish a
41comment like [this][ci-example] on the CL.
42
43You need to wait for both CIs to go green before submitting. The only
44exceptions are UI-only, docs-only or GN-only changes, for which the Android CI
45can be bypassed, as those are not built as part of the Android tree.
46
47## Community
48
49You can reach us on our [Discord channel](https://discord.gg/35ShE3A).
50If you prefer using IRC we have an experimental Discord <> IRC bridge
51synced with `#perfetto-dev` on [Freenode](https://webchat.freenode.net/).
52
53Mailing list: https://groups.google.com/forum/#!forum/perfetto-dev
54
55This project follows
56[Google's Open Source Community Guidelines](https://opensource.google/conduct/).
57
58### Bugs
59
60For bugs affecting Android or the tracing internals:
61
62* **Googlers**: use the internal bug tracker [go/perfetto-bugs](http://goto.google.com/perfetto-bugs)
63* **Non-Googlers**: use [GitHub issues](https://github.com/google/perfetto/issues).
64
65For bugs affecting Chrome Tracing:
66
67* Use http://crbug.com `Component:Speed>Tracing label:Perfetto`.
68
69## Contributor License Agreement
70
71Contributions to this project must be accompanied by a Contributor License
72Agreement. You (or your employer) retain the copyright to your contribution;
73this simply gives us permission to use and redistribute your contributions as
74part of the project. Head over to <https://cla.developers.google.com/> to see
75your current agreements on file or to sign a new one.
76
77You generally only need to submit a CLA once, so if you've already submitted one
78(even if it was for a different project), you probably don't need to do it
79again.
80
81[perfetto-gerrit]: https://android-review.googlesource.com/q/project:platform%252Fexternal%252Fperfetto+status:open
82[google-cpp-style]: https://google.github.io/styleguide/cppguide.html
83[depot-tools]: https://dev.chromium.org/developers/how-tos/depottools
84[ci-example]: https://android-review.googlesource.com/c/platform/external/perfetto/+/1108253/3#message-09fd27fb92ca8357abade3ec725919ac3445f3af
85