• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Debug Tracks
2
3Debug Tracks are a way to display tabular results from running a PerfettoSQL
4query as a new so-called "debug" track. Specifically, if the resultant table can
5be visualised in a slice format (for example, the
6[`slice`](sql-tables.autogen#slice) table), a debug track can be created from
7it.
8
9For a result table to be able to be visualised in a slice format, it should
10include:
11
121.  A name (the name of the slice) column.
131.  A non-null timestamp (the timestamp, in nanoseconds, at the start of the
14    slice) column.
151.  (Optionally) a duration (the duration, in nanoseconds, of the slice) column.
16
17To create a new debug track:
18
191.  Run a SQL query, and ensure its results are `slice`-like (as described
20    above).
21    ![Query for debug track](/docs/images/debug-tracks/debug-tracks-query.png)
221.  Navigate to the Timeline view, and click on "Show debug track" to set up a
23    new debug track. Note that the names of the columns in the result table do
24    not necessarily have to be `name`, `ts`, or `dur`. Columns which
25    *semantically* match but have a different name can be selected from the
26    drop-down selectors.
27    ![Create a new debug track](/docs/images/debug-tracks/debug-tracks-create.png)
281.  The debug track is visible as a pinned track near the top of the Timeline
29    view with slices from the table from which the track was created (note that
30    slices with no/zero duration will be displayed as instant events). The debug
31    track may be manually unpinned and then it should appear on the top of other
32    unpinned tracks.
33    ![Resultant debug track](/docs/images/debug-tracks/debug-tracks-result.png)
34