microsoft / Microsoft-Performance-Tools-Linux-Android

Linux, Android and Chromium Performance Tools built using the Microsoft Performance Toolkit. Cross-platform .NET Core + WPA GUI
MIT License
322 stars 35 forks source link

[Feature] Perfetto - Support Android 12 CPU Scheduling CallStacks #52

Open ivberg opened 3 years ago

ivberg commented 3 years ago

Having this feature would enable the Perfetto plugin to show CPU Scheduling callstacks of both kernel & user-mode either at the system or process level. What is collected is dependent on the tracing config.

Users could easily see: -In CPU Scheduling for a given High CPU% process (or any grouping/aggregation) the top callstacks aggregated together

This would mean users can perform manual wait analysis / critical path analysis; and improve system and app performance. Not only could they see the Process & Thread that led to a Wakeup, but the callstacks of what is about to run (what code was blocked before or not running) and the callstack of the alerter (the code that led to the wakeup)

Callstacks are dependent on this issue in Perfetto - Feature - Support callstack capturing for cpu scheduling events

At the capture level, this is Android 12 only and supposedly works in that version although the documentation to capture a trace is a bit cryptic at the moment.