Perfetto: first commit. Introduce build files

This CL sets up the directory structure, build files and
README for Perfetto. The build files are complete enough
to build a hello-world unittest, gtest, gmock and protobuf
from Linux and Mac OSX without depending on any external
tool. This will allow to build the project without a full
Android checkouot and hence being able to get test coverage
on other waterfalls (Chrome, Travis CI) and with a larger
set of compiler toolchains.
The plan is to generate Android.bp build files in the
next CLs to build the same targets also from the Android tree.

Change-Id: I7a15dcfdb24d5f857fc8c3a70757745741b92545
19 files changed
tree: e905adf9b34f47c192b8d7d5cc4f83d01ef48fbb
  1. build/
  2. buildtools/
  3. libtracing/
  4. .clang-format
  5. .gitignore
  6. .gn
  7. BUILD.gn
  8. codereview.settings
  9. README.md
README.md

Perfetto - Open-source building blocks for the full performance lifecycle of Google client platforms

Docs

See go/perfetto-one-pager

Building from a standalone checkout

If you are a chromium developer and have depot_tools installed you can avoid the build/ prefix below and just use gn/ninja from depot_tools.

  • Run build/install-build-deps to install third-party build deps (NDK etc)
  • Run build/gn args out/android to generate build files and enter in the editor:
    target_os = "android"  # or "linux" for local testing
    target_cpu = "arm"  # or "arm64"
    is_debug = true  # or false for release
    
  • Run build/ninja -C out/android all

Building from the Android tree

TODO. The plan is to autogenerate the Android.bp build files from the master GN build files (or temporarily maintain both until we can autogenerate them). Will come in next CLs.