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

CPU Sampling Support #54

Closed ivberg closed 3 years ago

ivberg commented 3 years ago

Add cpu sampling support per linked issue #38.

This processes Android 12 perf_sample events and walks the callstack using associated tables. The full callstack is provided and allows default advanced grouping by process, thread, callstack in a hierarchical view to quick/easily see the top callstacks in a UI.

Also -Upgrade all the latest NuGet pkgs including Performance SDK 0.109.24 and fix breaking changes -Fix some bugs with types not matching published schema when parsing previous Perfetto tables

ivberg commented 3 years ago

Can you post a pic of the new table?

Sure thing. Here is the table as showing up in the optional WPA UI

image


In reply to: 941630597

kartelan commented 2 years ago

Thanks for adding this support. Is it normal to see these INVALID_MAP events in the Callstack column. I collected a trace in linux (using perfetto) and I see a lot of these: image

ivberg commented 2 years ago

From the traces I have seen @kartelan those seem to be present in my test traces as well. I don't know if these are normal to get or indicates a bug somewhere in Android in data collection, or in the Perfetto stack including trace processing API. I don't think it's a bug with our CPU Sampling support, but I could be wrong. You can also ask around in the Perfetto email lists or GitHub page. Please do let us know what you find out.