Android Performance

Android Perfetto Series Catalog

Word count: 700Reading time: 4 min
2024/03/27
loading

With Google announcing the deprecation of Systrace in favor of Perfetto, Perfetto has essentially replaced Systrace in my daily workflow. Major manufacturers like OPPO and vivo have also transitioned to Perfetto. Many developers new to Android performance optimization find Perfetto’s complex interface and features overwhelming, which is why I’ve decided to re-present my previous Systrace articles using Perfetto.

This series was born from a few key reasons I shared in my Knowledge Planet (I previously thought the Systrace series was sufficient):

  1. Industry Transition: Manufacturers like OPPO and vivo have already switched to Perfetto for both capturing and analyzing traces. Many new developers are starting with Perfetto, and keeping only the old Systrace series would leave them behind.
  2. Modern Codebase: The previous Systrace series was based on older code. This new Perfetto series is updated using Android 14 source code.
  3. Personal Growth: I haven’t fully mastered all of Perfetto’s high-level features myself. Re-writing this series helps me reinforce my own understanding.
  4. System-Level Focus: Perfetto is a powerful tool backed by the entire Android and Linux ecosystem. This series focuses on the underlying system principles rather than just the tool itself. Mastery lies in understanding how Android works and using tools to uncover the essence of performance issues.
  5. Knowledge Gap: Official Perfetto documentation still misses many nuances of Android system operation. This series aims to fill those gaps and provide high-quality Chinese technical content.
  6. Community Sharing: This content will also serve as material for future technical presentations like Google DevFest.

Paul Graham once said: “Either provide something most people want a little, or something a few people want a lot.“ Perfetto is exactly what a dedicated minority “wants a lot.” Let’s begin. Please feel free to share feedback or point out errors so I can keep this as accurate as possible.

This series aims to provide a fresh perspective on Android system operation through Perfetto. It offers a unique angle to study App, Framework, and Linux internals. Even if you’ve read many articles on performance optimization, you might still feel confused because it’s hard to visualize the flow or remember the code. Through graphical tools like Perfetto, you may gain much deeper insights.

Perfetto Series Catalog

  1. Android Perfetto Series Catalog
  2. Android Perfetto Series 1: Introduction to Perfetto
  3. Android Perfetto Series 2: Capturing Perfetto Traces
  4. Android Perfetto Series 3: Familiarizing with the Perfetto View
  5. Android Perfetto Series 4: Opening Large Traces via Command Line
  6. Android Perfetto Series 5: Choreographer-based Rendering Flow
  7. Android Perfetto Series 6: Why 120Hz? Advantages and Challenges
  8. Android Perfetto Series 7: MainThread and RenderThread Deep Dive
  9. Android Perfetto Series 8: Understanding Vsync and Performance Analysis
  10. Android Perfetto Series 9: Interpreting CPU Information
  11. Video (Bilibili) - Android Perfetto Basics and Case Studies

Systrace Series

Although Systrace is no longer updated, the core content of the previous Systrace series remains relevant. Many companies still use Systrace to analyze system issues. It is a powerful tool for visualizing system operation and learning the Android Framework.

  1. Introduction to Systrace
  2. Systrace Basics: Prerequisites
  3. Systrace Basics: Why 60 fps?
  4. Systrace Basics: Interpreting SystemServer
  5. Systrace Basics: Interpreting Input
  6. Systrace Basics: Vsync Generation and Mechanism
  7. Systrace Basics: Vsync-App - Choreographer Rendering Explained
  8. Systrace Basics: MainThread and RenderThread
  9. Systrace Basics: Binder and Lock Contention
  10. Systrace Basics: Triple Buffer Explained
  11. Systrace Basics: Interpreting CPU Info
  12. Systrace Basics: SurfaceFlinger Explained
  13. Systrace Smoothness in Practice 1: Understanding Jank
  14. Systrace Smoothness in Practice 2: MIUI Desktop Scroll Analysis
  15. Systrace Smoothness in Practice 3: Common Questions
  16. Systrace Responsiveness in Practice 1: Understanding Principles
  17. Systrace Responsiveness in Practice 2: Case Study — App Launch
  18. Systrace Responsiveness in Practice 3: Extended Knowledge
  19. CPU Thread State Analysis 1: Runnable
  20. CPU Thread State Analysis 2: Running
  21. CPU Thread State Analysis 3: Sleep & Uninterruptible Sleep

About Me & My Blog

Here is a quick introduction and relevant links. I welcome communication with fellow developers!

  1. Author Introduction: Includes my WeChat and community links.
  2. Blog Content Map: A navigation guide to this blog.
  3. Android Performance Optimization Skills and Tools: A curated collection of excellent articles.
  4. Android Performance Knowledge Planet: Join our community for deeper discussions.

“If you want to go fast, go alone. If you want to go far, go together.”

WeChat QR Code

CATALOG
  1. 1. Perfetto Series Catalog
  2. 2. Systrace Series
  3. 3. About Me & My Blog