xref: /aosp_15_r20/external/perfetto/docs/tracing-101.md (revision 6dbdd20afdafa5e3ca9b8809fa73465d530080dc)
1*6dbdd20aSAndroid Build Coastguard Worker# Tracing 101
2*6dbdd20aSAndroid Build Coastguard Worker*This page provides a birds-eye view of performance analysis.
3*6dbdd20aSAndroid Build Coastguard WorkerThe aim is to orient people who have no idea what "tracing" is.*
4*6dbdd20aSAndroid Build Coastguard Worker
5*6dbdd20aSAndroid Build Coastguard Worker## Introduction to...
6*6dbdd20aSAndroid Build Coastguard Worker### Performance
7*6dbdd20aSAndroid Build Coastguard WorkerPerformance analysis is concerned with making software run *better*.
8*6dbdd20aSAndroid Build Coastguard WorkerThe definition of *better* varies widely and depends on the situation.
9*6dbdd20aSAndroid Build Coastguard WorkerExamples include:
10*6dbdd20aSAndroid Build Coastguard Worker* performing the same work using fewer resources (CPU, memory,
11*6dbdd20aSAndroid Build Coastguard Worker  network, battery, etc.)
12*6dbdd20aSAndroid Build Coastguard Worker* increasing utilization of available resources
13*6dbdd20aSAndroid Build Coastguard Worker* identifying and eliminating unnecessary work altogether
14*6dbdd20aSAndroid Build Coastguard Worker
15*6dbdd20aSAndroid Build Coastguard WorkerMuch of the difficulty in improving performance comes from
16*6dbdd20aSAndroid Build Coastguard Workeridentifying the root cause of performance issues. Modern software systems are
17*6dbdd20aSAndroid Build Coastguard Workercomplicated, having a lot of components and a web of cross-interactions.
18*6dbdd20aSAndroid Build Coastguard WorkerTechniques which help engineers understand the execution of a system
19*6dbdd20aSAndroid Build Coastguard Workerand pinpoint issues that are critical.
20*6dbdd20aSAndroid Build Coastguard Worker
21*6dbdd20aSAndroid Build Coastguard Worker**Tracing** and **profiling** are two such widely-used techniques for
22*6dbdd20aSAndroid Build Coastguard Workerperformance analysis. **Perfetto** is an open-source suite of tools, combining
23*6dbdd20aSAndroid Build Coastguard Workertracing and profiling to give users powerful insights into their system.
24*6dbdd20aSAndroid Build Coastguard Worker
25*6dbdd20aSAndroid Build Coastguard Worker### Tracing
26*6dbdd20aSAndroid Build Coastguard Worker**Tracing** involves collecting highly detailed data about the execution
27*6dbdd20aSAndroid Build Coastguard Workerof a system. A single continuous session of recording is called a trace file
28*6dbdd20aSAndroid Build Coastguard Workeror **trace** for short.
29*6dbdd20aSAndroid Build Coastguard Worker
30*6dbdd20aSAndroid Build Coastguard WorkerTraces contain enough detail to fully reconstruct the timeline of events.
31*6dbdd20aSAndroid Build Coastguard WorkerThey often include low-level kernel events like scheduler context switches,
32*6dbdd20aSAndroid Build Coastguard Workerthread wakeups, syscalls, etc. With the "right" trace, reproduction of a
33*6dbdd20aSAndroid Build Coastguard Workerperformance bug is not needed as the trace provides all necessary context.
34*6dbdd20aSAndroid Build Coastguard Worker
35*6dbdd20aSAndroid Build Coastguard WorkerApplication code is also **instrumented** in areas of the program which are
36*6dbdd20aSAndroid Build Coastguard Workerconsidered to be *important*. This instrumentation keeps track of what the
37*6dbdd20aSAndroid Build Coastguard Workerprogram was doing over time (e.g. which functions were being run, or how long
38*6dbdd20aSAndroid Build Coastguard Workereach call took) and context about the execution (e.g. what were the parameters
39*6dbdd20aSAndroid Build Coastguard Workerto a function call, or why was a function run).
40*6dbdd20aSAndroid Build Coastguard Worker
41*6dbdd20aSAndroid Build Coastguard WorkerThe level of detail in traces makes it impractical to read traces directly
42*6dbdd20aSAndroid Build Coastguard Workerlike a log file in all but the simplest cases. Instead, a combination of
43*6dbdd20aSAndroid Build Coastguard Worker**trace analysis** libraries and **trace viewers** are used. Trace analysis
44*6dbdd20aSAndroid Build Coastguard Workerlibraries provide a way for users to extract and summarize trace events in
45*6dbdd20aSAndroid Build Coastguard Workera programmatic manner. Trace viewers visualize the events in a trace on a
46*6dbdd20aSAndroid Build Coastguard Workertimeline which give users a graphical view of what their system was doing
47*6dbdd20aSAndroid Build Coastguard Workerover time.
48*6dbdd20aSAndroid Build Coastguard Worker
49*6dbdd20aSAndroid Build Coastguard Worker#### Logging vs tracing
50*6dbdd20aSAndroid Build Coastguard WorkerA good intuition is that logging is to functional testing what
51*6dbdd20aSAndroid Build Coastguard Workertracing is to performance analysis. Tracing is, in a sense, "structured"
52*6dbdd20aSAndroid Build Coastguard Workerlogging: instead of having arbitrary strings emitted from parts of the system,
53*6dbdd20aSAndroid Build Coastguard Workertracing reflects the detailed state of a system in a structured way to allow
54*6dbdd20aSAndroid Build Coastguard Workerreconstruction of the timeline of events.
55*6dbdd20aSAndroid Build Coastguard Worker
56*6dbdd20aSAndroid Build Coastguard WorkerMoreover, tracing frameworks (like Perfetto) place heavy emphasis
57*6dbdd20aSAndroid Build Coastguard Workeron having minimal overhead. This is essential so that the framework
58*6dbdd20aSAndroid Build Coastguard Workerdoes not significantly disrupt whatever is being measured: modern frameworks
59*6dbdd20aSAndroid Build Coastguard Workerare fast enough that they can measure execution at the nanosecond level
60*6dbdd20aSAndroid Build Coastguard Workerwithout significantly impacting the execution speed of the program.
61*6dbdd20aSAndroid Build Coastguard Worker
62*6dbdd20aSAndroid Build Coastguard Worker*Small aside: theoretically, tracing frameworks are powerful enough to act as
63*6dbdd20aSAndroid Build Coastguard Workera logging system as well. However, the utilization of each in practice is
64*6dbdd20aSAndroid Build Coastguard Workerdifferent enough that the two tend to be separate.*
65*6dbdd20aSAndroid Build Coastguard Worker
66*6dbdd20aSAndroid Build Coastguard Worker#### Metrics vs tracing
67*6dbdd20aSAndroid Build Coastguard WorkerMetrics are numerical values which track the performance of a system over time.
68*6dbdd20aSAndroid Build Coastguard WorkerUsually metrics map to high-level concepts. Examples of metrics include: CPU
69*6dbdd20aSAndroid Build Coastguard Workerusage, memory usage, network bandwidth, etc. Metrics are collected directly from
70*6dbdd20aSAndroid Build Coastguard Workerthe app or operating system while the program is running.
71*6dbdd20aSAndroid Build Coastguard Worker
72*6dbdd20aSAndroid Build Coastguard WorkerAfter glimpsing the power of tracing, a natural question arises: why bother
73*6dbdd20aSAndroid Build Coastguard Workerwith high level metrics at all? Why not instead just use tracing and
74*6dbdd20aSAndroid Build Coastguard Workercompute metrics on resulting traces? In some settings, this may indeed be the
75*6dbdd20aSAndroid Build Coastguard Workerright approach. In local and lab situations using **trace-based metrics**,
76*6dbdd20aSAndroid Build Coastguard Workerwhere metrics are computed from traces instead of collecting them directly,
77*6dbdd20aSAndroid Build Coastguard Workeris a powerful approach. If a metric regresses, it's easy to open the trace
78*6dbdd20aSAndroid Build Coastguard Workerto root cause why that happened.
79*6dbdd20aSAndroid Build Coastguard Worker
80*6dbdd20aSAndroid Build Coastguard WorkerHowever, trace-based metrics are not a universal solution. When running in
81*6dbdd20aSAndroid Build Coastguard Workerproduction, the heavyweight nature of traces can make it impractical to collect
82*6dbdd20aSAndroid Build Coastguard Workerthem 24/7. Computing a metric with a trace can take megabytes of data vs bytes
83*6dbdd20aSAndroid Build Coastguard Workerfor direct metric collection.
84*6dbdd20aSAndroid Build Coastguard Worker
85*6dbdd20aSAndroid Build Coastguard WorkerUsing metrics is the right choice when you want to understand the performance
86*6dbdd20aSAndroid Build Coastguard Workerof a system over time but do not want to or can not pay the cost of collecting
87*6dbdd20aSAndroid Build Coastguard Workertraces. In these situations, traces should be used as a **root-causing** tool.
88*6dbdd20aSAndroid Build Coastguard WorkerWhen your metrics show there is a problem, targeted tracing can be rolled out
89*6dbdd20aSAndroid Build Coastguard Workerto understand why the regression may have happened.
90*6dbdd20aSAndroid Build Coastguard Worker
91*6dbdd20aSAndroid Build Coastguard Worker### Profiling
92*6dbdd20aSAndroid Build Coastguard Worker**Profiling** involves sampling some usage of a resource by
93*6dbdd20aSAndroid Build Coastguard Workera program. A single continuous session of recording is known as a **profile**.
94*6dbdd20aSAndroid Build Coastguard Worker
95*6dbdd20aSAndroid Build Coastguard WorkerEach sample collects the function callstack (i.e. the line of code along with
96*6dbdd20aSAndroid Build Coastguard Workerall calling functions). Generally this information is aggregated across the
97*6dbdd20aSAndroid Build Coastguard Workerprofile. For each seen callstack, the aggregation gives the percentage of usage
98*6dbdd20aSAndroid Build Coastguard Workerof the resource by that callstack. By far the most common types of profiling are
99*6dbdd20aSAndroid Build Coastguard Worker**memory profiling** and **CPU profiling**.
100*6dbdd20aSAndroid Build Coastguard Worker
101*6dbdd20aSAndroid Build Coastguard WorkerMemory profiling is used to understand which parts of a program are allocating
102*6dbdd20aSAndroid Build Coastguard Workermemory on the heap. The profiler generally hooks into `malloc` (and `free`)
103*6dbdd20aSAndroid Build Coastguard Workercalls of a native (C/C++/Rust/etc.) program to sample the callstacks
104*6dbdd20aSAndroid Build Coastguard Workercalling `malloc`. Information about how many bytes were allocated is also
105*6dbdd20aSAndroid Build Coastguard Workerretained. CPU profiling is used for understanding where the program is
106*6dbdd20aSAndroid Build Coastguard Workerspending CPU time. The profiler captures the callstack running on a CPU
107*6dbdd20aSAndroid Build Coastguard Workerover time. Generally this is done periodically (e.g. every 50ms), but can be
108*6dbdd20aSAndroid Build Coastguard Workeralso be done when certain events happen in the operating system.
109*6dbdd20aSAndroid Build Coastguard Worker
110*6dbdd20aSAndroid Build Coastguard Worker#### Profiling vs tracing
111*6dbdd20aSAndroid Build Coastguard WorkerThere are two main questions for comparing profiling and tracing:
112*6dbdd20aSAndroid Build Coastguard Worker1. Why profile my program statistically when I can just trace *everything*?
113*6dbdd20aSAndroid Build Coastguard Worker2. Why use tracing to reconstruct the timeline of events when profiling gives me
114*6dbdd20aSAndroid Build Coastguard Worker   the exact line of code using the most resources?
115*6dbdd20aSAndroid Build Coastguard Worker
116*6dbdd20aSAndroid Build Coastguard Worker##### When to use profiling over tracing
117*6dbdd20aSAndroid Build Coastguard WorkerTraces cannot feasibly capture execution of extreme high frequency
118*6dbdd20aSAndroid Build Coastguard Workerevents e.g. every function call. Profiling tools fill this niche: by
119*6dbdd20aSAndroid Build Coastguard Workersampling, they can significantly cut down on how much information they store.
120*6dbdd20aSAndroid Build Coastguard WorkerThe statistical nature of profilers are rarely a problem; the sampling
121*6dbdd20aSAndroid Build Coastguard Workeralgorithms for profilers are specifically designed to capture data which is
122*6dbdd20aSAndroid Build Coastguard Workerhighly representative of the real resource use.
123*6dbdd20aSAndroid Build Coastguard Worker
124*6dbdd20aSAndroid Build Coastguard Worker*Aside: a handful of very specialized tracing tools exist which
125*6dbdd20aSAndroid Build Coastguard Workercan capture every function call (e.g.
126*6dbdd20aSAndroid Build Coastguard Worker[magic-trace](https://github.com/janestreet/magic-trace)) but they output
127*6dbdd20aSAndroid Build Coastguard Worker*gigabytes* of data every second which make them impractical for anything
128*6dbdd20aSAndroid Build Coastguard Workerbeyond investigating tiny snippets of code. They also generally have higher
129*6dbdd20aSAndroid Build Coastguard Workeroverhead than general purpose tracing tools.*
130*6dbdd20aSAndroid Build Coastguard Worker
131*6dbdd20aSAndroid Build Coastguard Worker##### When to use tracing over profiling
132*6dbdd20aSAndroid Build Coastguard WorkerWhile profilers give callstacks where resources are being used, they lack
133*6dbdd20aSAndroid Build Coastguard Workerinformation about *why* that happened. For example, why was malloc being called
134*6dbdd20aSAndroid Build Coastguard Workerby function *foo()* so many times? All they say is *foo()* allocated X bytes
135*6dbdd20aSAndroid Build Coastguard Workerover Y calls to `malloc`. Traces are excellent at providing this exact context:
136*6dbdd20aSAndroid Build Coastguard Workerapplication instrumentation and low-level kernel events together provide
137*6dbdd20aSAndroid Build Coastguard Workerdeep insight into why code was run in the first place.
138*6dbdd20aSAndroid Build Coastguard Worker
139*6dbdd20aSAndroid Build Coastguard WorkerNOTE: Perfetto supports collecting, analyzing and visualizing both profiles
140*6dbdd20aSAndroid Build Coastguard Workerand traces at the same time so you can have the best of both worlds!
141*6dbdd20aSAndroid Build Coastguard Worker
142*6dbdd20aSAndroid Build Coastguard Worker## Perfetto
143*6dbdd20aSAndroid Build Coastguard WorkerPerfetto is a suite of tools for software performance analysis. Its purpose
144*6dbdd20aSAndroid Build Coastguard Workeris to empower engineers to understand where resources are being used by their
145*6dbdd20aSAndroid Build Coastguard Workersystems. It helps identify the changes they can make to improve performance
146*6dbdd20aSAndroid Build Coastguard Workerand verify the impact of those changes.
147*6dbdd20aSAndroid Build Coastguard Worker
148*6dbdd20aSAndroid Build Coastguard WorkerNOTE: In Perfetto, since profiles and traces can be collected simultaneously,
149*6dbdd20aSAndroid Build Coastguard Workerwe call everything a "trace" even if it may contain (only) profiling data
150*6dbdd20aSAndroid Build Coastguard Workerinside.
151*6dbdd20aSAndroid Build Coastguard Worker
152*6dbdd20aSAndroid Build Coastguard Worker### Recording traces
153*6dbdd20aSAndroid Build Coastguard WorkerPerfetto is highly configurable when it comes to recording traces. There are
154*6dbdd20aSAndroid Build Coastguard Workerliterally hundreds of knobs which can be tweaked to control what data is
155*6dbdd20aSAndroid Build Coastguard Workercollected, how it should be collected, how much information a trace should
156*6dbdd20aSAndroid Build Coastguard Workercontain etc.
157*6dbdd20aSAndroid Build Coastguard Worker
158*6dbdd20aSAndroid Build Coastguard Worker[Record traces on Linux quickstart](/docs/quickstart/linux-tracing.md) is
159*6dbdd20aSAndroid Build Coastguard Workera good place to start if you're unfamiliar with Perfetto. For Android
160*6dbdd20aSAndroid Build Coastguard Workerdevelopers,
161*6dbdd20aSAndroid Build Coastguard Worker[Record traces on Android quickstart](/docs/quickstart/android-tracing.md) will
162*6dbdd20aSAndroid Build Coastguard Workerbe more applicable. The [trace configuration](/docs/concepts/config.md) page
163*6dbdd20aSAndroid Build Coastguard Workeris also useful to consult as a reference.
164*6dbdd20aSAndroid Build Coastguard Worker
165*6dbdd20aSAndroid Build Coastguard WorkerThe following sub-sections give an overview of various points worth considering
166*6dbdd20aSAndroid Build Coastguard Workerwhen recording Perfetto traces.
167*6dbdd20aSAndroid Build Coastguard Worker
168*6dbdd20aSAndroid Build Coastguard Worker#### Kernel tracing
169*6dbdd20aSAndroid Build Coastguard WorkerPerfetto integrates closely with the Linux kernel's
170*6dbdd20aSAndroid Build Coastguard Worker[ftrace](https://www.kernel.org/doc/Documentation/trace/ftrace.txt) tracing
171*6dbdd20aSAndroid Build Coastguard Workersystem to record kernel events (e.g. scheduling, syscalls, wakeups). The
172*6dbdd20aSAndroid Build Coastguard Worker[scheduling](/docs/data-sources/cpu-scheduling.md),
173*6dbdd20aSAndroid Build Coastguard Worker[syscall](/docs/data-sources/syscalls.md) and
174*6dbdd20aSAndroid Build Coastguard Worker[CPU frequency](/docs/data-sources/cpu-freq.md) data source pages give
175*6dbdd20aSAndroid Build Coastguard Workerexamples of configuring ftrace collection.
176*6dbdd20aSAndroid Build Coastguard Worker
177*6dbdd20aSAndroid Build Coastguard WorkerNatively supported ftrace events can be found in the fields of
178*6dbdd20aSAndroid Build Coastguard Worker[this proto message](/docs/reference/trace-packet-proto.autogen#FtraceEvent).
179*6dbdd20aSAndroid Build Coastguard WorkerPerfetto also supports collecting ftrace events it does not natively understand
180*6dbdd20aSAndroid Build Coastguard Worker(i.e. it does not have a protobuf message for) as a
181*6dbdd20aSAndroid Build Coastguard Worker["generic"](/docs/reference/trace-packet-proto.autogen#GenericFtraceEvent)
182*6dbdd20aSAndroid Build Coastguard Workerevents. These events are encoded as key-value pairs, similar to a JSON
183*6dbdd20aSAndroid Build Coastguard Workerdictionary.
184*6dbdd20aSAndroid Build Coastguard Worker
185*6dbdd20aSAndroid Build Coastguard WorkerIt is strongly discouraged to rely on generic events for production use cases:
186*6dbdd20aSAndroid Build Coastguard Workerthe inefficient encoding causes trace size bloat and the
187*6dbdd20aSAndroid Build Coastguard Worker[trace processor](/docs/analysis/trace-processor.md) cannot parse them
188*6dbdd20aSAndroid Build Coastguard Workermeaningfully. Instead, support should be added for parsing important ftrace
189*6dbdd20aSAndroid Build Coastguard Workerevents to Perfetto:
190*6dbdd20aSAndroid Build Coastguard Worker[here](/docs/contributing/common-tasks.md#add-a-new-ftrace-event) is a simple
191*6dbdd20aSAndroid Build Coastguard Workerset of steps to follow which are found.
192*6dbdd20aSAndroid Build Coastguard Worker
193*6dbdd20aSAndroid Build Coastguard Worker#### Instrumentation with Perfetto SDK
194*6dbdd20aSAndroid Build Coastguard WorkerPerfetto has a [C++ SDK](https://perfetto.dev/docs/instrumentation/tracing-sdk)
195*6dbdd20aSAndroid Build Coastguard Workerwhich can be used to instrument programs to emit tracing events. The SDK is
196*6dbdd20aSAndroid Build Coastguard Workerdesigned to be very low-overhead and is distributed in an "amalgamated" form
197*6dbdd20aSAndroid Build Coastguard Workerof a one `.cc` and one `.h` file, making it easy to integrate in any build
198*6dbdd20aSAndroid Build Coastguard Workersystem.
199*6dbdd20aSAndroid Build Coastguard Worker
200*6dbdd20aSAndroid Build Coastguard WorkerA C SDK is under active development and should be available for general
201*6dbdd20aSAndroid Build Coastguard Workerusage by Q2 2023. See [this doc](https://bit.ly/perfetto-c) for details (note
202*6dbdd20aSAndroid Build Coastguard Workerviewing this doc requires being a member of
203*6dbdd20aSAndroid Build Coastguard Worker[this group](https://groups.google.com/forum/#!forum/perfetto-dev))
204*6dbdd20aSAndroid Build Coastguard Worker
205*6dbdd20aSAndroid Build Coastguard WorkerA Java/Kotlin SDK for Android (as a
206*6dbdd20aSAndroid Build Coastguard Worker[JetPack library](https://developer.android.com/jetpack/androidx)).
207*6dbdd20aSAndroid Build Coastguard WorkerThis is under development but there is no set timescale for when an official
208*6dbdd20aSAndroid Build Coastguard Workerrelease will happen.
209*6dbdd20aSAndroid Build Coastguard Worker
210*6dbdd20aSAndroid Build Coastguard Worker##### android.os.Trace (atrace) vs Perfetto SDK
211*6dbdd20aSAndroid Build Coastguard WorkerNOTE: This section is only relevant for Android platform developers or Android
212*6dbdd20aSAndroid Build Coastguard Workerapp developers with tracing experience. Other readers can safely skip this
213*6dbdd20aSAndroid Build Coastguard Workersection.
214*6dbdd20aSAndroid Build Coastguard Worker
215*6dbdd20aSAndroid Build Coastguard WorkerPerfetto has significant advantages over atrace. Some of the biggest advantages
216*6dbdd20aSAndroid Build Coastguard Workerinclude:
217*6dbdd20aSAndroid Build Coastguard Worker* performance: tracing to Perfetto from system/app code requires just a memory
218*6dbdd20aSAndroid Build Coastguard Worker  write which is far faster than the syscall latency imposed by atrace. This
219*6dbdd20aSAndroid Build Coastguard Worker  generally makes Perfetto anywhere from 3-4x faster than atrace
220*6dbdd20aSAndroid Build Coastguard Worker* features: atrace's API is extremely limited, lacking support for debug
221*6dbdd20aSAndroid Build Coastguard Worker  arguments, custom clocks, flow events. Perfetto has a far richer API allowing
222*6dbdd20aSAndroid Build Coastguard Worker  natural representation of data-flow.
223*6dbdd20aSAndroid Build Coastguard Worker* trace size: Perfetto supports various features (delta encoded timestamps,
224*6dbdd20aSAndroid Build Coastguard Worker  interned strings, protobuf encoding) which vastly reduce to size of trace
225*6dbdd20aSAndroid Build Coastguard Worker  files.
226*6dbdd20aSAndroid Build Coastguard Worker
227*6dbdd20aSAndroid Build Coastguard WorkerUnfortunately, there are also some downsides:
228*6dbdd20aSAndroid Build Coastguard Worker* dedicated thread: a thread dedicated to Perfetto is necessary for every
229*6dbdd20aSAndroid Build Coastguard Worker  process which wants to trace to Perfetto.
230*6dbdd20aSAndroid Build Coastguard Worker* wakeups on tracing start: currently, when tracing starts, every process
231*6dbdd20aSAndroid Build Coastguard Worker  registered for tracing is woken up which significantly limits how many
232*6dbdd20aSAndroid Build Coastguard Worker  processes can be traced. This limitation should be removed in coming quarters.
233*6dbdd20aSAndroid Build Coastguard Worker
234*6dbdd20aSAndroid Build Coastguard WorkerFor now, the recommendation from the Perfetto team is to continue utilizing
235*6dbdd20aSAndroid Build Coastguard Workeratrace for most usecases: if you think you have a usecase which would benefit
236*6dbdd20aSAndroid Build Coastguard Workerfrom the SDK, please reach out to the team directly. By mid-2023, significant
237*6dbdd20aSAndroid Build Coastguard Workerprogress should be made addressing the limitations of the current SDK allowing
238*6dbdd20aSAndroid Build Coastguard Workermore widespread adoption of the SDK.
239*6dbdd20aSAndroid Build Coastguard Worker
240*6dbdd20aSAndroid Build Coastguard Worker<!--
241*6dbdd20aSAndroid Build Coastguard WorkerTODO(lalitm): write the remainder of the doc using the following template
242*6dbdd20aSAndroid Build Coastguard Worker
243*6dbdd20aSAndroid Build Coastguard Worker#### Native heap profiling
244*6dbdd20aSAndroid Build Coastguard Worker
245*6dbdd20aSAndroid Build Coastguard Worker#### Java heap graphs
246*6dbdd20aSAndroid Build Coastguard Worker
247*6dbdd20aSAndroid Build Coastguard Worker#### Callstack sampling
248*6dbdd20aSAndroid Build Coastguard Worker
249*6dbdd20aSAndroid Build Coastguard Worker
250*6dbdd20aSAndroid Build Coastguard Worker#### Flight recorder tracing
251*6dbdd20aSAndroid Build Coastguard WorkerTODO(lalitm): write this.
252*6dbdd20aSAndroid Build Coastguard Worker
253*6dbdd20aSAndroid Build Coastguard Worker##### Field tracing
254*6dbdd20aSAndroid Build Coastguard WorkerTODO(lalitm): write this.
255*6dbdd20aSAndroid Build Coastguard Worker
256*6dbdd20aSAndroid Build Coastguard Worker#### Clock sync
257*6dbdd20aSAndroid Build Coastguard WorkerTODO(lalitm): write this.
258*6dbdd20aSAndroid Build Coastguard Worker
259*6dbdd20aSAndroid Build Coastguard Worker
260*6dbdd20aSAndroid Build Coastguard Worker#### Analysis
261*6dbdd20aSAndroid Build Coastguard WorkerTODO(lalitm): write this.
262*6dbdd20aSAndroid Build Coastguard Worker* Trace processing
263*6dbdd20aSAndroid Build Coastguard Worker* UI
264*6dbdd20aSAndroid Build Coastguard Worker* httpd mode
265*6dbdd20aSAndroid Build Coastguard Worker* metrics
266*6dbdd20aSAndroid Build Coastguard Worker* Python
267*6dbdd20aSAndroid Build Coastguard Worker
268*6dbdd20aSAndroid Build Coastguard Worker
269*6dbdd20aSAndroid Build Coastguard WorkerThe remainder of this
270*6dbdd20aSAndroid Build Coastguard Workerpage will focus on the applications of Perfetto to solve various performance
271*6dbdd20aSAndroid Build Coastguard Workerrelated problems.
272*6dbdd20aSAndroid Build Coastguard Worker
273*6dbdd20aSAndroid Build Coastguard Worker## Solving problems with Perfetto
274*6dbdd20aSAndroid Build Coastguard WorkerTODO(lalitm): write this.
275*6dbdd20aSAndroid Build Coastguard Worker* When to look into callstack sampling
276*6dbdd20aSAndroid Build Coastguard Worker* When to use memory profiling
277*6dbdd20aSAndroid Build Coastguard Worker* When to look at scheduling latency
278*6dbdd20aSAndroid Build Coastguard Worker
279*6dbdd20aSAndroid Build Coastguard Worker
280*6dbdd20aSAndroid Build Coastguard WorkerTODO(lalitm): write this.
281*6dbdd20aSAndroid Build Coastguard Worker
282*6dbdd20aSAndroid Build Coastguard Worker-->