process_stats improvement
Hi, I would like to know if the following can be supported for the above data source in Linux:
1: Can we show the runtime_kernel_ns and runtime_user_ns as delta instead of value by default in the Perfetto UI - since that seems to be always more useful than the default viewing its (accumulative) value as we care about the CPU use increased value at this moment;
2: Can we provide a filter option for this data source to only track user space processes and ignore kernel threads/processes;
Thanks.
- Delta vs Value
The UI already supports this - counter tracks have three display modes: value (cumulative), delta (change per sample), and rate (change per second). You can switch modes by right-clicking on the track and accessing the track settings.
In the future we might cache the user settings, but it's not available right now.
- Filtering out kernel threads This isn't currently supported. The ProcessStatsConfig doesn't have an option to exclude kernel threads. Implementing this would require:
- Adding a new config option (e.g., exclude_kernel_threads) to the proto
- Modifying the data source to skip processes that are kernel threads
If this is important for your use case, feel free to file a feature request!
(small tangent: since it was such a small change, I actually ended up doing 1) separately anyway since I think having that as a default makes total sense - https://github.com/google/perfetto/pull/4289 for this)