tracing: Work around an LLVM bug on Windows

Clang/LLVM doesn't allow evaluating the address of a dllimport symbol
in a constexpr context, e.g.:

  extern __declspec(dllimport) int x;
  constexpr int* y = &x;

This causes a compilation error when trying to pass the array of
per-tracing category enabled state bits to the the constexpr
TrackEventCategoryRegistry while PERFETTO_COMPONENT_EXPORT is
set to __declspec(dllimport).

Luckily, since 2c297b36 the constexpr category registry doesn't
actually need access to the per-category enabled state, so we can work
around this by not passing this data to the registry in the first place.

See https://bugs.llvm.org/show_bug.cgi?id=51558 for the upstream
LLVM bug.

Bug: 189825391
Change-Id: Ib2ececf36dd2b2f16b8633c8ec000c85247d72db
2 files changed
tree: a5297d52d301044a95f81e7eee4e616194b89134
  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. .gitattributes
  19. .gitignore
  20. .gn
  21. .style.yapf
  22. Android.bp
  23. Android.bp.extras
  24. BUILD
  25. BUILD.extras
  26. BUILD.gn
  27. CHANGELOG
  28. codereview.settings
  29. DIR_METADATA
  30. heapprofd.rc
  31. LICENSE
  32. meson.build
  33. METADATA
  34. MODULE_LICENSE_APACHE2
  35. OWNERS
  36. perfetto.rc
  37. PerfettoIntegrationTests.xml
  38. PRESUBMIT.py
  39. README.chromium
  40. README.md
  41. TEST_MAPPING
  42. traced_perf.rc
  43. 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.