3

New tools for analyzing Android, Linux, and Chromium browser performance - Micro...

 2 years ago
source link: https://devblogs.microsoft.com/performance-diagnostics/new-tools-for-analyzing-android-linux-and-chromium-browser-performance/?WT_mc_id=DOP-MVP-4025064
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

New tools for analyzing Android, Linux, and Chromium browser performance – Microsoft-Performance-Tools for Linux-Android

December 7th, 2021

Introduction

We wanted to announce and introduce you to a new set of powerful open-source tools for analyzing system performance – Microsoft-Performance-Tools for Linux-Android. Recently, we just released version 1.2 adding Perfetto support, which we will cover in a separate blog post!

Microsoft-Performance-Tools for Linux-Android is a set of trace processing tooling that delivers many of the great features, power, methodology and ecosystem, that has been used to drive Windows performance for the past 15+ years with an evolving and refreshed toolset.

This type of tracing & tooling gives amazing depth & insight into what the OS and app code is doing; and can be used in a variety of diagnostic & performance scenarios. If the analysis scenario also involves Windows, then traces can optionally be co-analyzed on the same timeline with Windows performance traces.

The toolset is built on open-source .NET Core and the new microsoft-performance-toolkit-sdk. This means the toolset is cross-platform and traces can be opened and analyzed on any OS that .NET Core supports! We have worked with the OSS community to build on top of the existing best-in-class open-source tracing for any given OS.

Tracing

For Linux, we support LTTng, perf, and Perfetto. For Android and Chromium browsers such as Chrome & Edge Chromium, we support Perfetto.

Here is the current tracing supported:

  • LTTng (Linux Kernel CPU scheduling, Processes, Threads, Block IO/Disk, Syscalls, File events, etc)
  • perf Linux CPU Sampling(cpu-clock)
  • Perfetto Android & Chromium (CPU Scheduling, CPU Sampling, CPU Frequency, FTrace, Android Logs, Generic Events / Default Tracks, GPU Counters)

The tooling supports parsing & analyzing the above tracing. Capturing & recording a trace is different for each type of tracing tool and is covered in How to capture a trace or logs.

You can process or dump events at the cmd-line using your own custom program with only a few lines of code. For example, there is a LTTngDriver which uses Microsoft.Performance.Toolkit.Engine to drive programmatic access to the traces in the C# language.

Any program or GUI on any OS can process events with the Microsoft-Performance-Tools SDK & Linux-Android plugins. Additionally, if you are optionally on a Windows machine to analyze the traces, the toolkit has great integration with Windows Performance Analyzer so that you can use a powerful GUI to analyze the traces.

Figure 1 – Linux LTTng system trace loaded in WPA

Conclusion

We hope you can use the tooling to analyze & improve performance; whatever your OS, device, or scenario! Internally at Microsoft – we are using the toolset to help gain insight and drive performance on these products:

We also hope that you can join the community or contribute to this tooling on our GitHub page.

Ivan Berg

Principal Dev, Windows + Devices Platform Health Performance

Follow


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK