perfetto-trace-analysis

Analyze Perfetto traces to locate Android app latency, memory, and jank root causes.

6.6k|388|Updated Mar 16, 2026
One-click install
npx skills add https://github.com/android/skills --skill perfetto-trace-analysis-android
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: perfetto-trace-analysis
Source: https://github.com/android/skills/tree/main/profilers/perfetto-trace-analysis
Command: npx skills add https://github.com/android/skills --skill perfetto-trace-analysis-android

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps you identify the root cause of latency, memory pressure, or UI jank by rigorously analyzing Perfetto trace evidence instead of guessing.

Core Features & Use Cases

  • Perfetto trace root-cause workflow: Guides an iterative hypothesis → data collection → drill-down loop until definitive bottleneck causes are confirmed.
  • Domain-hinted performance triage: Uses expert-vetted techniques for CPU, graphics, I/O, IPC, memory, and power investigation.
  • Perfetto SQL execution protocol: Enforces correct SQL generation, safe schemas, module inclusion, idempotency, and overlap handling for time windows.
  • Chain-of-evidence reporting: Maintains a strict scratchpad log of verified facts (timestamps, slices, thread IDs/states) to support final conclusions.

Quick Start

Ask the AI to analyze the provided Perfetto trace file to determine why the app is experiencing latency, memory issues, or jank.

Frequently Asked Questions about perfetto-trace-analysis

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

FAQPage Schema
How do I debug Android UI jank using a Perfetto trace?

Debugging Android UI jank with a Perfetto trace involves an iterative hypothesis and drill-down loop across app and system threads to pinpoint the exact latency, memory pressure, or scheduling bottleneck causing frame drops.

What is the best way to find the root cause of Android app latency in a system trace?

Finding the root cause of Android app latency requires rigorous Perfetto trace analysis, maintaining a strict chain-of-evidence scratchpad of verified facts like timestamps, slices, and thread states to confirm definitive bottleneck conclusions.

How do I write Perfetto SQL queries for performance profiling?

Writing Perfetto SQL for performance profiling requires enforcing correct SQL generation, safe schemas, module inclusion, idempotency, and overlap handling for time windows to accurately extract latency and memory metrics from trace data.

Does Perfetto trace analysis work for memory pressure and power investigation?

Yes, Perfetto trace analysis works for memory pressure and power investigation by applying expert-vetted domain-hinted triage techniques across CPU, graphics, I/O, IPC, memory, and power domains to locate system bottlenecks.

When do I need a Perfetto trace for open-ended performance troubleshooting?

You need a Perfetto trace for open-ended performance troubleshooting when experiencing ongoing latency, memory issues, or UI jank across app and system threads and processes that require definitive, evidence-based root cause analysis.

Why does my Perfetto SQL query return incorrect time windows for thread states?

Perfetto SQL queries return incorrect time windows for thread states when overlap handling and module inclusion are not properly enforced, which is why safe schemas and strict SQL generation protocols are required for accurate trace analysis.