tp: Parsing device_pm_callback_[start|end] ftrace events This patch does the following: - Parses `device_pm_callback_[start|end]` ftrace events to capture information about the device, associated driver, type of callback etc. - Creates perfetto slices to visualize device PM callbacks executed during a suspend / resume cycle and adds them to the "Suspend / Resume Latency" UI track. - The display name format for the slices is: "<driver name> <device name> <event type>[:<callback phase>]" A 60s trace with ~9 suspend/resume cycles was used to measure the load times on the UI (via the `perfetto.AsyncSlices` plugin). The size of the trace was 41MB. Load times (averaged across 3 runs) With this change: 51 ms Without this change: 28 ms The increase in ftrace_event table entries processed for the "Suspend / Resume Latency" track correspond to `device_pm_callback_[start|end]` events. ``` $ select COUNT(*) from ftrace_event where name like "device_pm_callback%"; 91622 $ select COUNT(*) from ftrace_event where name like "suspend_resume%"; 502 ``` Bug: 330333710 Change-Id: I873efd72a3db271075d5507e03b8b298422348a3
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.