Windows port: LITTLE_ENDIAN, ENTRYPOINT and minor test fixes

- Introduce PERFETTO_IS_LITTLE_ENDIAN(), as MSVC doesn't
  have __BYTE_ORDER__. All windows builds are assumed to be
  little-endian (which really is the case).
- Add PERFETTO_EXPORT_ENTRYPOINT to export xxxMain() functions
  (e.g. ProbesMain()) in Android/Linux non-monolithic builds.
- Fix a test that accidentally assume that Producer.DataSourceStop
  and Consumer.OnTracingDisabled happen in a particular order.
  For whatever reason the order is less deterministic on Windows.
- Remove a bunch of unnecessary <unistd.h> includes, likely just
  copy/paste artifacts.
- Minor GN fixes (e.g. add .exe extension)

Bug: 174454879
Test: Manual on Windows + CI on other platforms
Change-Id: I837183bcdd4e8b82a51fb44bbc30d4ff7dcfca92
24 files changed
tree: 7cf88571b525d87306acd745524a17c9ccff96f1
  1. .github/
  2. bazel/
  3. build_overrides/
  4. buildtools/
  5. debian/
  6. docs/
  7. examples/
  8. gn/
  9. include/
  10. infra/
  11. protos/
  12. src/
  13. test/
  14. tools/
  15. ui/
  16. .clang-format
  17. .clang-tidy
  18. .gitignore
  19. .gn
  20. .style.yapf
  21. Android.bp
  22. Android.bp.extras
  23. BUILD
  24. BUILD.extras
  25. BUILD.gn
  26. CHANGELOG
  27. codereview.settings
  28. heapprofd.rc
  29. LICENSE
  30. METADATA
  31. MODULE_LICENSE_APACHE2
  32. OWNERS
  33. perfetto.rc
  34. PRESUBMIT.py
  35. README.chromium
  36. README.md
  37. TEST_MAPPING
  38. traced_perf.rc
  39. 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.