Apply Linux-specific fixes

This CL applies the necessary fixes to get cperfetto (and the static
version cperfetto_static) to build under Linux. It patches a few clang
errors and windows-specific code (__declspec).

To compile this code:

 - `python3 ./tools/install-build-deps`
 - `gn gen --args='is_debug=true' out/debug`
 - `ninja -C out/debug cperfetto` or `ninja -C out/debug
   cperfetto_static`

BUG=b:277837670
TEST=compiled cperfetto_static and verified libperfetto_static.a exists

Change-Id: I7a804fbd5f20c685d78bce030136b1abe3e5df02
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/perfetto/+/4669640
Reviewed-by: Colin Downs-Razouk <colindr@google.com>
Auto-Submit: Morg <morg@google.com>
Reviewed-by: Noah Gold <nkgold@google.com>
4 files changed
tree: 1701f40c291dfc714e563378bd731d637aa3bb3d
  1. .github/
  2. bazel/
  3. build_overrides/
  4. buildtools/
  5. debian/
  6. docs/
  7. examples/
  8. gn/
  9. include/
  10. infra/
  11. protos/
  12. python/
  13. src/
  14. test/
  15. tools/
  16. ui/
  17. .clang-format
  18. .clang-tidy
  19. .git-blame-ignore-revs
  20. .gitattributes
  21. .gitignore
  22. .gn
  23. .style.yapf
  24. Android.bp
  25. Android.bp.extras
  26. BUILD
  27. BUILD.extras
  28. BUILD.gn
  29. CHANGELOG
  30. codereview.settings
  31. DIR_METADATA
  32. heapprofd.rc
  33. LICENSE
  34. meson.build
  35. METADATA
  36. MODULE_LICENSE_APACHE2
  37. OWNERS
  38. perfetto.rc
  39. perfetto_fork_commit_hash.txt
  40. PerfettoIntegrationTests.xml
  41. PRESUBMIT.py
  42. README.chromium
  43. README.md
  44. TEST_MAPPING
  45. traced_perf.rc
  46. WORKSPACE
README.md

Perfetto - System profiling, app tracing and trace analysis

Perfetto is a production-grade open-source stack for performance instrumentation and trace analysis. It offers services and libraries and for recording system-level and app-level traces, native + java heap profiling, a library for analyzing traces using SQL and a web-based UI to visualize and explore multi-GB traces.

See https://perfetto.dev/docs or the /docs/ directory for documentation.

This repository is a crosvm-specific copy of a google-internal perfetto repository modified for use on Windows with Rust. It is not a full fork of the external repository as it does not preserve the repo commit history. It is instead checkpointed from a specific (internal) git commit hash.