compact sched_waking: event decoding in trace_processor

Compact waking events are now handled by the sched_event_tracker, which populates the
raw & instants tables. Handling of the default-encoded events hasn't changed.

The emitting pid is inferred from the [pending] scheduling slices, in other
words, sched_switch events. So if you have compact sched_waking, but no
sched_switch, we skip all waking events during parsing. I think this is fine,
and just needs some extra documentation. We could instead start encoding the
emitting pid in the trace to remove this limitation, but I'm not sure who'd want
*compact* sched_waking without any sched_switch events.

Sorter: I've kept the approach of having all events in the same per-cpu queue.
We can theoretically do better with multiple queues, but that also requires
further changes to the sorter that are outside the scope of this cl.  In
practice, this approach does not give significant overheads on typical traces
(especially if there's no write_to_file, as then we sort each queue at most once
at the end).

Change-Id: I1deda1d433b696dd16a5f127604c9ab8f6f8cdc9
17 files changed
tree: b8cf24d2a6f026a48d2e31b917ac25380abf84d3
  1. bazel/
  2. build_overrides/
  3. buildtools/
  4. debian/
  5. docs/
  6. gn/
  7. include/
  8. infra/
  9. protos/
  10. src/
  11. test/
  12. tools/
  13. ui/
  14. .clang-format
  15. .gitignore
  16. .gn
  17. .style.yapf
  18. Android.bp
  19. Android.bp.extras
  20. BUILD
  21. BUILD.extras
  22. BUILD.gn
  23. codereview.settings
  24. heapprofd.rc
  25. MODULE_LICENSE_APACHE2
  26. NOTICE
  27. OWNERS
  28. perfetto.rc
  29. PRESUBMIT.py
  30. README.chromium
  31. README.md
  32. TEST_MAPPING
  33. WORKSPACE
README.md

Perfetto - Performance instrumentation and tracing

Perfetto is an open-source project for performance instrumentation and tracing of Linux/Android/Chrome platforms and user-space apps.

See www.perfetto.dev for docs.

Bugs

  • For bugs affecting Android or the tracing internals use the internal bug tracker (go/perfetto-bugs).
  • For bugs affecting Chrome use http://crbug.com, Component:Speed>Tracing label:Perfetto.

Community

You can reach us on our Discord channel. If you prefer using IRC we have an experimental Discord <> IRC bridge synced with #perfetto-dev on Freenode.