perfetto-trace-analysis

Analyze Perfetto trace files with SQL to diagnose Android performance issues.

Updated May 5, 2023
One-click install
npx skills add https://github.com/uyelikanil/AwesomeSunsetWallpapers --skill perfetto-trace-analysis-uyelikanil
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: perfetto-trace-analysis
Source: https://github.com/uyelikanil/AwesomeSunsetWallpapers/tree/main/.agents/skills/perfetto-trace-analysis
Command: npx skills add https://github.com/uyelikanil/AwesomeSunsetWallpapers --skill perfetto-trace-analysis-uyelikanil

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides a rigorous, evidence-based framework for identifying and resolving complex performance bottlenecks like latency, jank, and memory issues in Android applications by analyzing Perfetto trace files.

Core Features & Use Cases

  • Systematic Investigation: Follows a structured protocol to move from broad system metrics to specific root causes using expert-vetted domain hints.
  • SQL-Driven Analysis: Leverages the Perfetto SQL engine to query trace data, ensuring precise identification of thread states, scheduling latencies, and binder transactions.
  • Use Case: When an app experiences intermittent UI jank, use this Skill to correlate frame drops with main thread blocking, I/O stalls, or CPU contention to pinpoint the exact code path responsible.

Quick Start

Analyze the provided trace file to identify the root cause of the reported performance bottleneck by following the established investigation protocol.

Frequently Asked Questions about perfetto-trace-analysis

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I find the root cause of Android UI jank using a Perfetto trace?

To find the root cause of Android UI jank using a Perfetto trace, you execute iterative SQL queries across CPU, graphics, and I/O domains to correlate frame drops with main thread blocking or CPU contention. This isolates the exact code path responsible for the latency.

What is the best way to analyze Android performance bottlenecks in system traces?

The best way to analyze Android performance bottlenecks in system traces is through SQL-driven investigation. Querying Perfetto trace data identifies thread states, scheduling latencies, and binder transactions to systematically isolate memory and latency issues.

Can I use SQL to diagnose main thread blocking and I/O stalls in Android apps?

Yes, you can use SQL to diagnose main thread blocking and I/O stalls in Android apps. The Perfetto SQL engine queries trace data to pinpoint scheduling latencies and binder transactions, validating findings through a strict chain of evidence.

Does Perfetto trace analysis work for diagnosing memory bottlenecks and scheduling latencies?

Perfetto trace analysis works for diagnosing memory bottlenecks and scheduling latencies by leveraging the Perfetto SQL engine. It follows a structured protocol to move from broad system metrics to specific root causes across CPU and IPC domains.

Why does my Android application experience intermittent frame drops during background tasks?

Intermittent frame drops during background tasks often occur due to CPU contention or I/O stalls. Analyzing Perfetto trace files correlates these frame drops with main thread blocking and scheduling latencies to pinpoint the exact code path responsible.

How do I systematically investigate latency issues in Android trace files?

To systematically investigate latency issues in Android trace files, follow a structured protocol moving from broad system metrics to specific root causes. This uses expert-vetted domain analysis techniques and iterative SQL queries to validate findings.