perfetto-trace-analysis

Analyze Perfetto trace files to identify Android performance issue root causes.

28|5|Updated Oct 8, 2024
One-click install
npx skills add https://github.com/kabirnayeem99/Ktor2Curl --skill perfetto-trace-analysis-kabirnayeem99
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: perfetto-trace-analysis
Source: https://github.com/kabirnayeem99/Ktor2Curl/tree/main/.agents/skills/perfetto-trace-analysis
Command: npx skills add https://github.com/kabirnayeem99/Ktor2Curl --skill perfetto-trace-analysis-kabirnayeem99

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill resolves complex Android performance bottlenecks, such as UI jank, high latency, and memory pressure, by providing a structured, evidence-based analysis of Perfetto trace files.

Core Features & Use Cases

  • Automated Root Cause Analysis: Systematically investigates thread states, scheduling latency, and kernel-level blockers to identify the source of performance degradation.
  • Expert Domain Hints: Leverages vetted analysis techniques for CPU, Graphics, I/O, IPC, Memory, and Power subsystems to ensure no bottleneck is overlooked.
  • Use Case: When an app experiences intermittent stuttering, this Skill can pinpoint whether the issue is caused by main thread lock contention, excessive I/O, or graphics memory pressure.

Quick Start

Ask the assistant to analyze the provided trace file to identify the root cause of the observed performance issues.

Frequently Asked Questions about perfetto-trace-analysis

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

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

To analyze a Perfetto trace for Android UI jank, execute iterative SQL queries against the trace data to validate hypotheses across CPU, Graphics, I/O, IPC, Memory, and Power domains. This systematically isolates thread states and kernel-level blockers causing the stuttering.

What is the best way to debug Android performance issues using trace files?

The best way to debug Android performance issues using trace files is to perform structured, evidence-based root cause analysis. By investigating scheduling latency, thread states, and kernel-level blockers, you can pinpoint exactly where memory pressure or main thread lock contention occurs.

Can I use SQL queries to investigate Android memory pressure and latency in Perfetto?

Yes, you can use SQL queries to investigate Android memory pressure and latency in Perfetto. The analysis operates by executing iterative SQL queries against trace data to validate hypotheses across multiple subsystem domains, ensuring no bottleneck is overlooked.

Does Perfetto trace analysis work for diagnosing main thread lock contention?

Perfetto trace analysis works for diagnosing main thread lock contention by systematically investigating thread states and scheduling latency. It leverages vetted analysis techniques to identify if lock contention, excessive I/O, or graphics memory pressure is degrading app performance.

What are the limitations of using SQL for Perfetto trace analysis?

A limitation of using SQL for Perfetto trace analysis is the requirement for strict adherence to a specific SQL execution protocol and maintenance of a local chain of evidence scratchpad, demanding advanced knowledge of trace database schemas and performance domains.

When do I need to perform evidence-based analysis on Android trace files?

You need to perform evidence-based analysis on Android trace files when an app experiences complex performance bottlenecks like intermittent stuttering, high latency, or memory pressure, and you must identify whether the source is I/O, graphics, or CPU scheduling.