• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Quickstart: Trace conversion
2
3_This quickstart demonstrates how Perfetto traces can be converted into other trace formats using the `traceconv` tool._
4
5![](/docs/images/traceconv-summary.png)
6
7## Prerequisites
8
9- A host running Linux or MacOS
10- A Perfetto protobuf trace file
11
12The supported output formats are:
13
14- `text` - protobuf text format: a text based representation of protos
15- `json` - Chrome JSON format: the format used by chrome://tracing
16- `systrace`: the ftrace text format used by Android systrace
17- `profile` (heap profiler only): pprof-like format. This is only valid for
18  traces with [native heap profiler](/docs/data-sources/native-heap-profiler.md)
19  dumps.
20
21## Setup
22
23```bash
24curl -LO https://get.perfetto.dev/traceconv
25chmod +x traceconv
26./traceconv [text|json|systrace|profile] [input proto file] [output file]
27```
28
29## Converting to systrace text format
30
31`./traceconv systrace [input proto file] [output systrace file]`
32
33## Converting to Chrome Tracing JSON format
34
35`./traceconv json [input proto file] [output json file]`
36
37## Opening in the legacy systrace UI
38
39If you just want to open a Perfetto trace with the legacy (Catapult) trace
40viewer, you can just navigate to [ui.perfetto.dev](https://ui.perfetto.dev),
41and use the the _"Open with legacy UI"_ link. This runs `traceconv` within
42the browser using WebAssembly and passes the converted trace seamlessly to
43chrome://tracing.
44