tp stats: introduce "ftrace_cpu_has_data_loss" and downgrade severity of "ftrace_cpu_overrun_delta"

First step on the road to more actionable trace quality reporting in the
UI. Starting with the fact that "ftrace_cpu_overrun_delta" doesn't make
sense for RING_BUFFER traces - the delta is between the start-of-trace
and the final flush, whereas the data remaining in the perfetto ring
buffer will usually cover just the last N seconds of that time frame.

traced_probes already sets a special ftrace_event_bundle.lost_events
marker in traces when it gets told by the kernel that the kernel buffer
overran between userspace reads. So if any such packets are part of the
final trace, care needs to be taken when interpreting the trace data.

Keeping it as a simple bool for now. I'll look into surfacing more info
(affected timestamp range) in the future.

Also explain why kDataLoss traced_buf_patches_failed isn't [usually]
that scary for DISCARD buffer traces. Better than no explanation for
now, but we should improve the actionability of the signal.

Change-Id: I9cf8718b4f05da28626ee44fa19ecca4dccf30dd
6 files changed
tree: d4da2a0d140fe7681db6462d089b21074d4a4f2c
  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. .clang-format
  19. .clang-tidy
  20. .git-blame-ignore-revs
  21. .gitattributes
  22. .gitignore
  23. .gn
  24. .style.yapf
  25. Android.bp
  26. Android.bp.extras
  27. BUILD
  28. BUILD.extras
  29. BUILD.gn
  30. CHANGELOG
  31. codereview.settings
  32. DIR_METADATA
  33. heapprofd.rc
  34. LICENSE
  35. meson.build
  36. METADATA
  37. MODULE_LICENSE_APACHE2
  38. OWNERS
  39. perfetto.rc
  40. PerfettoIntegrationTests.xml
  41. PRESUBMIT.py
  42. README.chromium
  43. README.md
  44. TEST_MAPPING
  45. traced_perf.rc
  46. WATCHLISTS
  47. 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.