perfetto-trace-analysis

Analyze Perfetto traces to isolate latency, memory, and jank root causes in Android apps.

4|Updated Aug 18, 2016
One-click install
npx skills add https://github.com/esafirm/dotfiles --skill perfetto-trace-analysis-esafirm
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: perfetto-trace-analysis
Source: https://github.com/esafirm/dotfiles/tree/main/.gemini/skills/perfetto-trace-analysis
Command: npx skills add https://github.com/esafirm/dotfiles --skill perfetto-trace-analysis-esafirm

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps you diagnose why an Android app or device is slow by turning Perfetto traces into a clear root-cause analysis for latency, jank, memory pressure, I/O stalls, and scheduling contention.

Core Features & Use Cases

  • Trace Interpretation: Reads Perfetto trace data and identifies the most relevant threads, slices, counters, and dependencies.
  • Root-Cause Debugging: Verifies whether time is spent running, waiting, blocked, or preempted before drawing conclusions.
  • Cross-System Analysis: Follows CPU, graphics, I/O, IPC, memory, and power signals to find the primary bottleneck and any secondary issues.
  • Use Case: Investigate an app launch that feels sluggish, a UI flow that drops frames, or a system stall that only appears under load, then trace the evidence back to the blocking component.

Quick Start

Ask me to analyze the attached Perfetto trace and explain the main cause of the slowdown, jank, or stall.

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 app jank using a Perfetto trace?

To find the root cause of Android app jank, analyze the Perfetto trace to verify thread states and identify whether UI stutters stem from CPU contention, I/O stalls, or binder delays. This isolates the exact blocking component causing frame drops.

What is the best way to debug Android app startup slowdowns from a system trace?

Debugging Android app startup slowdowns requires cross-process dependency tracing within the Perfetto trace to follow CPU, memory, and I/O signals. This process pinpoints latency bottlenecks by demanding trace-bound evidence before drawing conclusions.

Can I use standard Perfetto SQL queries to diagnose CPU contention and scheduling stalls?

Yes, you can use standard-library Perfetto SQL queries to diagnose CPU contention and scheduling stalls. The analysis verifies thread states and traces cross-system dependencies to isolate whether threads are running, waiting, blocked, or preempted.

Does Perfetto trace analysis work for diagnosing cross-process IPC and binder delays?

Perfetto trace analysis works for diagnosing cross-process IPC and binder delays by following IPC signals across the system. It traces dependencies between processes to identify the primary bottleneck causing communication stalls.

How do I trace memory pressure and power-related stalls in Android using Perfetto?

To trace memory pressure and power-related stalls in Android, analyze the relevant counters and slices in the Perfetto trace. This cross-system analysis follows memory and power signals to find the primary bottleneck and any secondary issues.

Why does my Android UI drop frames under load despite no obvious CPU spikes?

Android UI frame drops under load without obvious CPU spikes often result from I/O stalls, binder delays, or scheduling contention. Analyzing the Perfetto trace verifies thread states and traces cross-process dependencies to reveal the hidden bottleneck.