Direct answer: Perfetto is an open-source tracing system built out of Google's Android and Chrome work. It records function runs, syscalls, and GPU jobs with timestamps into one queryable timeline, so slow behavior gets attributed to specific code instead of guessed at.

Every performance conversation starts the same way: the page is slow, the service is slow, the phone is slow. The second sentence decides how the day goes. If it names a measurement, the problem becomes a search with an answer at the end. If it names a theory, the problem becomes a debate with no end built in.

The trending query google/perfetto appears on GitHub Trending (C++) in late November 2026, and the project is the measurement side of that split. Its durable lesson outlasts the trend: before optimizing anything, produce a timeline of what actually ran, then let the timeline pick the target.

What a trace actually records

Tracing records events with timestamps: a function began, a syscall returned, a GPU job finished. Laid out on one axis, those events turn latency into something you can point at. The question stops being why is it slow and becomes which span ate the time, which is a far easier question to answer correctly.

Perfetto's specific contribution is combining traces from layers that normally live in separate tools: kernel scheduling, application code, and hardware-level work. Android and Chrome engineers built it because a slowdown rarely respects tool boundaries. The cause can sit in a driver while the symptom shows up in a layout function, and only a single record across all layers makes that attribution possible.

one request, traced (example)app codewaiting on a lockdatabaseThe longest span sets the priority, and it is rarely the code you were going to tune first.Re-record after each fix: the shape of the time is the evidence.

The loop that replaces folklore

The workflow is a loop: record a trace of the slow behavior, find the longest or most frequent spans, fix one cause, re-record, and compare. Each turn of the loop produces evidence for the next decision. Optimization done without this loop is folklore, passed along as tips that were true somewhere once and now travel on reputation.

The re-record step earns its place in the loop. A fix can shift the bottleneck instead of removing it, and only a second trace shows the new shape of the time. Teams that skip it ship changes that feel faster in a demo and measure the same in production, then argue about which number to believe.

  1. Record a trace while the slowness is happening.
  2. Sort spans by length or by frequency.
  3. Fix the single biggest cause.
  4. Re-record and compare against the first trace.
  5. Stop when the remaining spans are all small.
missedyour Brain mapquiz yourselfmasteredWatch your weak spots turn green.

Drop in your PDF - it doesn't leave your device.
Every miss becomes a red node on your map.
Free plan: 21 nodes, no card, no countdown.

Open Brain - free

Billions of events need a database

Trace formats are designed for compression and queryability, because a busy system produces billions of events and the record still has to stay searchable. That requirement makes tracing a database problem as much as a logging one. Indexing and encodings decide whether an engineer asks the trace a second question or gives up after the first wait.

Perfetto answers with a query interface over the trace, so finding the slow span works like a database query with predicates, closer to SQL than to scrolling text logs. The payoff shows up under pressure. When an incident is live, an answer that arrives quickly is the difference between a precise fix and a wide rollback.

Key takeaways

  • Tracing records events such as function runs, syscalls, and GPU jobs with timestamps into one timeline, so latency gets attributed instead of guessed.
  • Perfetto, built from Android and Chrome development, combines kernel, application, and hardware traces into a single queryable record.
  • The working loop is record, find the longest or most frequent spans, fix one cause, re-record; without it, optimization is folklore.
  • A fix can shift a bottleneck to new code, so the second trace is where the evidence lives.
  • Trace formats are built for compression and queryability, because billions of events must stay searchable, a database problem in disguise.

Quick answers

What is tracing?
Recording events with timestamps into one timeline, so time spent is attributed to specific spans of code.

What makes Perfetto different?
It merges kernel, application, and hardware traces into a single record built by the Android and Chrome teams.

Where do I start with a slow endpoint?
Record one trace of a slow request and sort the spans by duration.

Why re-record after a fix?
Fixes can move the bottleneck somewhere else, and only a fresh trace shows the new shape.

Why is a trace format a database problem?
Billions of events must stay compressed and searchable, or the second question never gets asked.

One thing to do tonight

Pick one thing that annoys you because it is slow, record a trace of it, and find the single longest span. You do not have to fix it tonight. Knowing its name already puts you ahead of the debate you would otherwise have had.