whatisgithub

What is perfetto?

google/perfetto — explained in plain English

Analysis updated 2026-06-26

5,920C++Audience · developerComplexity · 4/5LicenseSetup · moderate

In one sentence

Perfetto is Google's open-source performance tracing toolkit built into Android and Chrome, letting developers record what software is doing and analyze it visually in a browser or with SQL queries.

Mindmap

mindmap
  root((perfetto))
    What it does
      Records program activity
      Analyzes performance
      Timeline visualization
    Tech stack
      C++
      Android
      Linux
      SQL engine
    Use cases
      App startup analysis
      Frame drop diagnosis
      Memory investigation
      Automated metrics
    Audience
      Android developers
      C++ developers
      Browser engineers
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Record an Android app trace to diagnose slow startup or dropped frames and view it as a timeline in the browser

USE CASE 2

Add Perfetto's C++ library to your own code to mark specific operations and visualize their timing on a flamechart

USE CASE 3

Write SQL queries against a Perfetto trace file to extract performance metrics for automated regression testing

USE CASE 4

Capture system-wide CPU and memory usage on Linux using the Perfetto daemon to investigate a performance problem

What is it built with?

C++AndroidLinuxSQLJavaScript

How does it compare?

google/perfettoalexandrerouma/sdrplusplusjbeder/yaml-cpp
Stars5,9205,9205,919
LanguageC++C++C++
Setup difficultymoderatemoderatemoderate
Complexity4/53/52/5
Audiencedevelopergeneraldeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 30min

Recording a trace requires an Android device or Linux machine, the browser viewer needs no installation but trace capture has platform-specific setup steps.

Open-source under the Apache 2.0 license, use freely for any purpose including commercial, as long as you keep the license notice.

So what is it?

Perfetto is a collection of open-source tools from Google for recording and analyzing what a piece of software is doing while it runs. Developers use it to figure out why an app starts slowly, why frames drop, or why a system is using too much memory. It is the default tracing system built into the Android operating system and the Chromium browser, so it has been tested at production scale. The project has several parts that work together. There are high-performance background processes that record activity from many programs at once and save it to a single file. There is a lightweight library that C++ developers can add directly to their own code to mark specific events and timings. There are also probes that capture system-wide information on Android and Linux, such as which programs are running, how the CPU is being used, and how memory is being allocated. Once you have a recording, Perfetto provides a browser-based tool for viewing it as a timeline. You can zoom in on specific moments, see how different processes interacted, and trace a slow operation back to its cause. The viewer works in any modern browser and requires no installation. For deeper analysis, Perfetto also has a SQL-based engine, meaning you can write queries to pull out specific measurements or build automated reports. The tool is useful for Android app developers, C and C++ developers on desktop systems, browser engineers, and anyone doing performance investigation on Linux. It can also read trace formats from other tools, including Linux perf and macOS Instruments, so you are not locked into one recording format. Documentation and the browser-based UI are available at perfetto.dev.

Copy-paste prompts

Prompt 1
Using the Perfetto browser UI, load this Android trace file and show me which functions are causing the most CPU time during app startup
Prompt 2
How do I add Perfetto tracing events to my C++ code so custom timing marks appear in the timeline viewer at ui.perfetto.dev?
Prompt 3
Write a Perfetto SQL query that finds all frames that took longer than 16ms to render in this trace file
Prompt 4
How do I record a Perfetto system trace on an Android device to investigate memory spikes in my app?

Frequently asked questions

What is perfetto?

Perfetto is Google's open-source performance tracing toolkit built into Android and Chrome, letting developers record what software is doing and analyze it visually in a browser or with SQL queries.

What language is perfetto written in?

Mainly C++. The stack also includes C++, Android, Linux.

What license does perfetto use?

Open-source under the Apache 2.0 license, use freely for any purpose including commercial, as long as you keep the license notice.

How hard is perfetto to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is perfetto for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.