{"id":456,"date":"2021-12-07T15:10:41","date_gmt":"2021-12-07T23:10:41","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/performance-diagnostics\/?p=456"},"modified":"2021-12-10T11:15:28","modified_gmt":"2021-12-10T19:15:28","slug":"new-tools-for-analyzing-android-linux-and-chromium-browser-performance","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/performance-diagnostics\/new-tools-for-analyzing-android-linux-and-chromium-browser-performance\/","title":{"rendered":"New tools for analyzing Android, Linux, and Chromium browser performance &#8211; Microsoft-Performance-Tools for Linux-Android"},"content":{"rendered":"<h2>Introduction<\/h2>\n<p>We wanted to announce and introduce you to a new set of powerful open-source tools for analyzing system performance &#8211; <a href=\"https:\/\/github.com\/microsoft\/Microsoft-Performance-Tools-Linux-Android\">Microsoft-Performance-Tools for Linux-Android<\/a>. Recently, we just released version 1.2 adding Perfetto support, which we will cover in a <a href=\"https:\/\/devblogs.microsoft.com\/performance-diagnostics\/perfetto-tooling-for-analyzing-android-linux-and-chromium-browser-performance-microsoft-performance-tools-linux-android\/\">separate blog post<\/a>!<\/p>\n<p>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.<\/p>\n<p>This type of tracing &amp; tooling gives amazing depth &amp; insight into what the OS and app code is doing; and can be used in a variety of diagnostic &amp; performance scenarios. <em>If<\/em> the analysis scenario also involves Windows, then traces can optionally be co-analyzed on the same timeline with Windows performance traces.<\/p>\n<p>The toolset is built on open-source .NET Core and the new <a href=\"https:\/\/github.com\/microsoft\/microsoft-performance-toolkit-sdk\">microsoft-performance-toolkit-sdk<\/a>. 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.<\/p>\n<h2>Tracing<\/h2>\n<p>For Linux, we support LTTng, perf, and Perfetto. For Android and Chromium browsers such as Chrome &amp; Edge Chromium, we support Perfetto.<\/p>\n<p>Here is the current tracing supported:<\/p>\n<ul>\n<li><a href=\"https:\/\/lttng.org\/\">LTTng<\/a> (Linux Kernel CPU scheduling, Processes, Threads, Block IO\/Disk, Syscalls, File events, etc)<\/li>\n<li><a href=\"https:\/\/perf.wiki.kernel.org\/\">perf<\/a> Linux CPU Sampling(cpu-clock)<\/li>\n<li><a href=\"https:\/\/perfetto.dev\/\">Perfetto<\/a>\u00a0Android &amp; Chromium (CPU Scheduling, CPU Sampling, CPU Frequency, FTrace, Android Logs, Generic Events \/ Default Tracks, GPU Counters)<\/li>\n<\/ul>\n<p>The tooling supports parsing &amp; analyzing the above tracing. Capturing &amp; recording a trace is different for each type of tracing tool and is covered in <a href=\"https:\/\/github.com\/microsoft\/Microsoft-Performance-Tools-Linux-Android#how-to-capture-a-trace-or-logs\">How to capture a trace or logs.<\/a><\/p>\n<p>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 <a href=\"https:\/\/github.com\/microsoft\/Microsoft-Performance-Tools-Linux-Android\/blob\/develop\/LTTngDriver\/Program.cs\">LTTngDriver<\/a> which uses <a href=\"https:\/\/github.com\/microsoft\/microsoft-performance-toolkit-sdk\/blob\/main\/documentation\/Using-the-SDK\/Using-the-engine.md\">Microsoft.Performance.Toolkit.Engine<\/a> to drive programmatic access to the traces in the C# language.<\/p>\n<p>Any program or GUI on any OS can process events with the Microsoft-Performance-Tools SDK &amp; Linux-Android plugins. Additionally, if you are optionally on a Windows machine to analyze the traces, the toolkit has great integration with <a href=\"https:\/\/docs.microsoft.com\/en-us\/windows-hardware\/test\/wpt\/windows-performance-analyzer\">Windows Performance Analyzer<\/a> so that you can use a powerful GUI to analyze the traces.<\/p>\n<p><img decoding=\"async\" width=\"1430\" height=\"805\" class=\"wp-image-458\" src=\"https:\/\/devblogs.microsoft.com\/performance-diagnostics\/wp-content\/uploads\/sites\/64\/2021\/11\/graphical-user-interface-table-description-autom.jpeg\" alt=\"Graphical user interface, table Description automatically generated\" srcset=\"https:\/\/devblogs.microsoft.com\/performance-diagnostics\/wp-content\/uploads\/sites\/64\/2021\/11\/graphical-user-interface-table-description-autom.jpeg 1430w, https:\/\/devblogs.microsoft.com\/performance-diagnostics\/wp-content\/uploads\/sites\/64\/2021\/11\/graphical-user-interface-table-description-autom-300x169.jpeg 300w, https:\/\/devblogs.microsoft.com\/performance-diagnostics\/wp-content\/uploads\/sites\/64\/2021\/11\/graphical-user-interface-table-description-autom-1024x576.jpeg 1024w, https:\/\/devblogs.microsoft.com\/performance-diagnostics\/wp-content\/uploads\/sites\/64\/2021\/11\/graphical-user-interface-table-description-autom-768x432.jpeg 768w\" sizes=\"(max-width: 1430px) 100vw, 1430px\" \/><\/p>\n<p>Figure 1 &#8211; Linux LTTng system trace loaded in WPA<\/p>\n<h2>Conclusion<\/h2>\n<p>We hope you can use the tooling to analyze &amp; improve performance; whatever your OS, device, or scenario! Internally at Microsoft \u2013 we are using the toolset to help gain insight and drive performance on these products:<\/p>\n<ul>\n<li><a href=\"https:\/\/docs.microsoft.com\/en-us\/windows\/android\/wsa\/\">Windows Subsystem for Android (WSA)<\/a> which runs native Android apps in a VM with great Windows integration<\/li>\n<li><a href=\"https:\/\/docs.microsoft.com\/en-us\/azure\/virtual-machines\/linux\/overview\">Azure Linux VMs<\/a> and <a href=\"https:\/\/docs.microsoft.com\/en-us\/windows\/wsl\/about\">Windows Subsystem for Linux<\/a> (WSL2) which each run Linux in VMs<\/li>\n<li><a href=\"https:\/\/www.microsoft.com\/en-us\/edge\">Microsoft Edge browser<\/a> which is cross-platform and based on Chromium<\/li>\n<\/ul>\n<p>We also hope that you can join the community or contribute to this tooling on <a href=\"https:\/\/github.com\/microsoft\/Microsoft-Performance-Tools-Linux-Android\">our GitHub page<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introducing the Microsoft Performance Tools for Linux &#038; Android<\/p>\n","protected":false},"author":77202,"featured_media":75,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[39,38,2],"tags":[43,42,40,26,41,14],"class_list":["post-456","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux-android","category-microsoft-performance-tools","category-windows-performance-analyzer","tag-android","tag-linux","tag-perf","tag-performance","tag-tool","tag-windows-performance-analyzer"],"acf":[],"blog_post_summary":"<p>Introducing the Microsoft Performance Tools for Linux &#038; Android<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/performance-diagnostics\/wp-json\/wp\/v2\/posts\/456","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/performance-diagnostics\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/performance-diagnostics\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/performance-diagnostics\/wp-json\/wp\/v2\/users\/77202"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/performance-diagnostics\/wp-json\/wp\/v2\/comments?post=456"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/performance-diagnostics\/wp-json\/wp\/v2\/posts\/456\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/performance-diagnostics\/wp-json\/wp\/v2\/media\/75"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/performance-diagnostics\/wp-json\/wp\/v2\/media?parent=456"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/performance-diagnostics\/wp-json\/wp\/v2\/categories?post=456"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/performance-diagnostics\/wp-json\/wp\/v2\/tags?post=456"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}