Android Performance

Android Systrace -- Series Article Index

Word count: 1kReading time: 6 min
2019/05/26
loading

As Systrace becomes increasingly feature-rich, combined with Android version iterations, the previous Systrace series tutorials have become somewhat outdated. Additionally, as my own skills have improved, I’ve been able to extract more information from Systrace, which has been very helpful in solving various performance issues. I need to document these skills to enhance my summarization and organization abilities, and if it helps those who read these articles, that would be excellent.

The purpose of this series is to view the overall operation of the Android system from a different perspective using Systrace, while also providing an alternative angle for learning the Framework. Perhaps you’ve read many articles about the Framework but can never remember the code, or you’re unclear about the execution flow. Maybe from Systrace’s graphical perspective, you can gain a deeper understanding.

As Google announced the deprecation of the Systrace tool and introduced Perfetto, Perfetto has essentially replaced Systrace in my daily work. Meanwhile, major manufacturers like OPPO and Vivo have also switched from Systrace to Perfetto. Many newcomers to Android performance optimization find Perfetto’s dazzling interface and complex features overwhelming, and they’ve been hoping I could present the previous Systrace articles using Perfetto.

This series aims to examine the overall operation of the Android system from a new perspective using Perfetto. Additionally, it provides a different angle for learning key modules such as App, Framework, and Linux. Although you may have read many articles about Android Framework, App development, and performance optimization, you might still feel confused because you can’t remember the code or don’t understand the execution flow. Through Perfetto, this graphical tool, you may gain a deeper understanding.

Perfetto Series Index

  1. Android Perfetto Series Index
  2. Android Perfetto Series 1: Introduction to Perfetto
  3. Android Perfetto Series 2: Capturing Perfetto Traces
  4. Android Perfetto Series 3: Getting Familiar with Perfetto View
  5. Android Perfetto Series 4: Opening Large Traces Locally Using Command Line
  6. Android Perfetto Series 5: Android App Rendering Pipeline Based on Choreographer
  7. Android Perfetto Series 6: Why 120Hz? Advantages and Challenges of High Refresh Rate
  8. Android Perfetto Series 7 - MainThread and RenderThread Explained
  9. Android Perfetto Series 8: Deep Dive into Vsync Mechanism and Performance Analysis
  10. Android Perfetto Series 9 - CPU Information Explained
  11. Video (Bilibili) - Android Perfetto Basics and Case Studies

Systrace Series Article Index

This article serves as an index. After subsequent articles are updated, they will be aggregated here. The content is as follows:

  1. Systrace Introduction
  2. Systrace Basics - Systrace Prerequisites
  3. Systrace Basics - Why 60 fps?
  4. Systrace Basics - SystemServer Explained
  5. Systrace Basics - SurfaceFlinger Explained
  6. Systrace Basics - Input Explained
  7. Systrace Basics - Vsync Explained
  8. Systrace Basics - Vsync-App: Detailed Explanation of Choreographer-Based Rendering Mechanism
  9. Systrace Basics - MainThread and RenderThread Explained
  10. Systrace Basics - Binder and Lock Contention Explained
  11. Systrace Basics - Triple Buffer Explained
  12. Systrace Basics - CPU Info Explained
  13. Systrace Smoothness Practice 1: Understanding Jank Principles
  14. Systrace Smoothness Practice 2: Case Analysis - MIUI Launcher Scroll Jank Analysis
  15. Systrace Smoothness Practice 3: Questions During Jank Analysis
  16. Systrace Response Speed Practice 1: Understanding Response Speed Principles
  17. Systrace Response Speed Practice 2: Response Speed Analysis - Using App Startup as an Example
  18. Systrace Response Speed Practice 3: Extended Knowledge on Response Speed
  19. Systrace Thread CPU State Analysis Tips - Runnable
  20. Systrace Thread CPU State Analysis Tips - Running
  21. Systrace Thread CPU State Analysis Tips - Sleep and Uninterruptible Sleep

2023-10 update:

Starting to prepare the Perfetto series

Target Audience

This series of articles is suitable for both application developers and system developers. I will consider both perspectives when writing. As a system developer, here are roughly my advantages:

  1. Access to system source code, making it convenient to debug and modify code, and see results on the phone at any time
  2. Certain understanding of the system framework
  3. Certain understanding of system tuning

Based on these points, I will leverage these advantages in my writing to bring you something different:

  1. Learning Android Framework through Systrace
  2. Modifying certain system configurations to show everyone the results: for example, the impact of Buffer count on applications
  3. Introducing considerations and trade-offs that system manufacturers make when building systems
  4. Introducing important but often overlooked points during application development

Update Log

The plan is to update one article per week, giving myself a goal and accountability.

  1. 2018-03-30 Index update: Systrace Series Article Index
  2. 2018-04-01 Article update: Systrace Basics - Why 60 fps?
  3. 2019-07-23 Article update: Systrace Basics - Systrace Prerequisites
  4. 2019-10-22 Article update: Systrace Basics - Vsync-App: Detailed Explanation of Choreographer-Based Rendering Mechanism
  5. 2019-11-04 Article update: Systrace Basics - Input Explained
  6. 2019-11-06 Article update: Systrace Basics - MainThread and RenderThread Explained
  7. 2019-12-01 Article update: Systrace Basics - Vsync Explained
  8. 2019-12-06 Article update: Systrace Basics - Binder and Lock Contention Explained
  9. 2019-12-15 Article update: Systrace Basics - Triple Buffer Explained
  10. 2019-12-21 Article update: Systrace Basics - CPU Info Explained
  11. 2020-02-04 Article update: Systrace Basics - SystemServer Explained
  12. 2020-02-14 Article update: Systrace Basics - SurfaceFlinger Explained
  13. 2021-04-24 Article update: Systrace Smoothness Practice 1: Understanding Jank Principles
  14. 2021-04-24 Article update: Systrace Smoothness Practice 2: Case Analysis - MIUI Launcher Scroll Jank Analysis
  15. 2021-04-24 Article update: Systrace Smoothness Practice 3: Questions During Jank Analysis
  16. 2021-10-28 Article update: Systrace Response Speed Practice 1: Understanding Response Speed Principles
  17. 2021-10-28 Article update: Systrace Response Speed Practice 2: Response Speed Analysis - Using App Startup as an Example
  18. 2021-10-28 Article update: Systrace Response Speed Practice 3: Extended Knowledge on Response Speed

About Me && Blog

Below is my personal introduction and related links. I look forward to exchanging ideas with fellow professionals. When three walk together, one can always be my teacher!

  1. Blogger Introduction: Contains my personal WeChat and WeChat group links.
  2. Blog Content Navigation: A navigation guide for my blog content.
  3. Curated Collection of Excellent Blog Articles - Android Performance Optimization Must-Knows: Welcome to recommend articles (via WeChat private message)
  4. Android Performance Optimization Knowledge Planet: Welcome to join, thank you for your support~

One person can walk faster, but a group can walk further

Scan WeChat QR Code

CATALOG
  1. 1. Perfetto Series Index
  2. 2. Systrace Series Article Index
    1. 2.1. Target Audience
    2. 2.2. Update Log
  3. 3. About Me && Blog