Trace Redaction - Use strategy pattern for ftrace events

Following changes else where in the code base, this changes the
top-level ftrace event primitive to use the strategy pattern
to filter and write ftrace events to the new packet.

The "write" function will be used to change the ftrace event pid
during thread merging.

The old remapping primitives had to be removed from the build files
because this change conflicted with them (class designs). Because
these files/classes were going to be revisited, this cost was
accessible.

The ReturnErrorForEmptyAllowList test was removed because it is no
longer a valid test. The allowlist test is done in one of the filters.
Filters cannot return errors. To support that, it would introduce
additional overhead for very little value. If the need to verify
allowlists is so great, build primitive can be used.

Bug: 336807771
Change-Id: I15e4ab548dd985304daec8c1febcf241203980f2
15 files changed
tree: 4d771ac1ddf4000c3949a16c5b007d700a75f1fa
  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. third_party/
  16. tools/
  17. ui/
  18. .bazelignore
  19. .clang-format
  20. .clang-tidy
  21. .git-blame-ignore-revs
  22. .gitattributes
  23. .gitignore
  24. .gn
  25. .style.yapf
  26. Android.bp
  27. Android.bp.extras
  28. BUILD
  29. BUILD.extras
  30. BUILD.gn
  31. CHANGELOG
  32. codereview.settings
  33. DIR_METADATA
  34. heapprofd.rc
  35. LICENSE
  36. meson.build
  37. METADATA
  38. MODULE_LICENSE_APACHE2
  39. OWNERS
  40. perfetto.rc
  41. PerfettoIntegrationTests.xml
  42. persistent_cfg.pbtxt
  43. PRESUBMIT.py
  44. README.chromium
  45. README.md
  46. TEST_MAPPING
  47. traced_perf.rc
  48. WATCHLISTS
  49. 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.