PerfettoSQL standard library

This page documents the PerfettoSQL standard library.

Introduction

The PerfettoSQL standard library is a repository of tables, views, functions and macros, contributed by domain experts, which make querying traces easier Its design is heavily inspired by standard libraries in languages like Python, C++ and Java.

Some of the purposes of the standard library include:

  1. Acting as a way of sharing and commonly written queries without needing to copy/paste large amounts of SQL.
  2. Raising the abstraction level when exposing data in the trace. Many modules in the standard library convert low-level trace concepts e.g. slices, tracks and into concepts developers may be more familar with e.g. for Android developers: app startups, binder transactions etc.

Standard library modules can be included as follows:

-- Include all tables/views/functions from the android.startup.startups -- module in the standard library. INCLUDE PERFETTO MODULE android.startup.startups; -- Use the android_startups table defined in the android.startup.startups -- module. SELECT * FROM android_startups;

Prelude is a special module is automatically included. It contains key helper tables, views and functions which are universally useful.

More information on importing modules is available in the syntax documentation for the INCLUDE PERFETTO MODULE statement.

Package: prelude

Views/Tables

trace_metrics. Lists all metrics built-into trace processor.

VIEW

Column Type Description
name STRING The name of the metric.
trace_bounds. Definition of `trace_bounds` table

VIEW Definition of trace_bounds table. The values are being filled by Trace Processor when parsing the trace. It is recommended to depend on the trace_start() and trace_end() functions rather than directly on trace_bounds.

Column Type Description
start_ts TIMESTAMP First ts in the trace.
end_ts TIMESTAMP End of the trace.
track. Tracks are a fundamental concept in trace processor and represent a "timeline" for events of the same type and with the same context

VIEW Tracks are a fundamental concept in trace processor and represent a "timeline" for events of the same type and with the same context. See https://perfetto.dev/docs/analysis/trace-processor#tracks for a more detailed explanation, with examples.

Column Type Description
id ID Unique identifier for this track. Identical to |track_id|, prefer using |track_id| instead.
name STRING Name of the track; can be null for some types of tracks (e.g. thread tracks).
type STRING The type of a track indicates the type of data the track contains. Every track is uniquely identified by the the combination of the type and a set of dimensions: type allow identifying a set of tracks with the same type of data within the whole universe of tracks while dimensions allow distinguishing between different tracks in that set.
dimension_arg_set_id ARGSETID The dimensions of the track which uniquely identify the track within a given type. Join with the args table or use the EXTRACT_ARG helper function to expand the args.
parent_id JOINID(track.id) The track which is the "parent" of this track. Only non-null for tracks created using Perfetto's track_event API.
source_arg_set_id ARGSETID Generic key-value pairs containing extra information about the track. Join with the args table or use the EXTRACT_ARG helper function to expand the args.
machine_id LONG Machine identifier, non-null for tracks on a remote machine.
cpu. Contains information about the CPUs on the device this trace was taken on.

VIEW

Column Type Description
id ID Unique identifier for this CPU. Identical to |ucpu|, prefer using |ucpu| instead.
ucpu ID Unique identifier for this CPU. Isn't equal to |cpu| for remote machines and is equal to |cpu| for the host machine.
cpu LONG The 0-based CPU core identifier.
cluster_id LONG The cluster id is shared by CPUs in the same cluster.
processor STRING A string describing this core.
machine_id LONG Machine identifier, non-null for CPUs on a remote machine.
capacity LONG Capacity of a CPU of a device, a metric which indicates the relative performance of a CPU on a device For details see: https://www.kernel.org/doc/Documentation/devicetree/bindings/arm/cpu-capacity.txt
arg_set_id ARGSETID Extra key/value pairs associated with this cpu.
cpu_available_frequencies. Contains the frequency values that the CPUs on the device are capable of running at.

VIEW Contains the frequency values that the CPUs on the device are capable of running at.

Column Type Description
id ID Unique identifier for this cpu frequency.
cpu LONG The CPU for this frequency, meaningful only in single machine traces. For multi-machine, join with the cpu table on ucpu to get the CPU identifier of each machine.
freq LONG CPU frequency in KHz.
ucpu LONG The CPU that the slice executed on (meaningful only in single machine traces). For multi-machine, join with the cpu table on ucpu to get the CPU identifier of each machine.
sched_slice. This table holds slices with kernel thread scheduling information

VIEW This table holds slices with kernel thread scheduling information. These slices are collected when the Linux "ftrace" data source is used with the "sched/switch" and "sched/wakeup*" events enabled.

The rows in this table will always have a matching row in the |thread_state| table with |thread_state.state| = 'Running'

Column Type Description
id ID Unique identifier for this scheduling slice.
ts TIMESTAMP The timestamp at the start of the slice.
dur DURATION The duration of the slice.
cpu LONG The CPU that the slice executed on (meaningful only in single machine traces). For multi-machine, join with the cpu table on ucpu to get the CPU identifier of each machine.
utid JOINID(thread.id) The thread's unique id in the trace.
end_state STRING A string representing the scheduling state of the kernel thread at the end of the slice. The individual characters in the string mean the following: R (runnable), S (awaiting a wakeup), D (in an uninterruptible sleep), T (suspended), t (being traced), X (exiting), P (parked), W (waking), I (idle), N (not contributing to the load average), K (wakeable on fatal signals) and Z (zombie, awaiting cleanup).
priority LONG The kernel priority that the thread ran at.
ucpu LONG The unique CPU identifier that the slice executed on.
sched. Shorter alias for table `sched_slice`.

VIEW

Column Type Description
id ID Alias for sched_slice.id.
ts TIMESTAMP Alias for sched_slice.ts.
dur DURATION Alias for sched_slice.dur.
cpu LONG Alias for sched_slice.cpu.
utid JOINID(thread.id) Alias for sched_slice.utid.
end_state STRING Alias for sched_slice.end_state.
priority LONG Alias for sched_slice.priority.
ucpu LONG Alias for sched_slice.ucpu.
ts_end LONG Legacy column, should no longer be used.
thread_state. This table contains the scheduling state of every thread on the system during the trace. The rows in this table which have |state| = 'Running', will have a corresponding row in the |sched_slice| table.

VIEW This table contains the scheduling state of every thread on the system during the trace.

The rows in this table which have |state| = 'Running', will have a corresponding row in the |sched_slice| table.

Column Type Description
id ID Unique identifier for this thread state.
ts TIMESTAMP The timestamp at the start of the slice.
dur DURATION The duration of the slice.
cpu LONG The CPU that the thread executed on (meaningful only in single machine traces). For multi-machine, join with the cpu table on ucpu to get the CPU identifier of each machine.
utid JOINID(thread.id) The thread's unique id in the trace.
state STRING The scheduling state of the thread. Can be "Running" or any of the states described in |sched_slice.end_state|.
io_wait LONG Indicates whether this thread was blocked on IO.
blocked_function STRING The function in the kernel this thread was blocked on.
waker_utid JOINID(thread.id) The unique thread id of the thread which caused a wakeup of this thread.
waker_id JOINID(thread_state.id) The unique thread state id which caused a wakeup of this thread.
irq_context LONG Whether the wakeup was from interrupt context or process context.
ucpu LONG The unique CPU identifier that the thread executed on.
raw. Contains 'raw' events from the trace for some types of events

VIEW Contains 'raw' events from the trace for some types of events. This table only exists for debugging purposes and should not be relied on in production usecases (i.e. metrics, standard library etc.)

Column Type Description
id ID Unique identifier for this raw event.
ts TIMESTAMP The timestamp of this event.
name STRING The name of the event. For ftrace events, this will be the ftrace event name.
cpu LONG The CPU this event was emitted on (meaningful only in single machine traces). For multi-machine, join with the cpu table on ucpu to get the CPU identifier of each machine.
utid JOINID(thread.id) The thread this event was emitted on.
arg_set_id ARGSETID The set of key/value pairs associated with this event.
common_flags LONG Ftrace event flags for this event. Currently only emitted for sched_waking events.
ucpu LONG The unique CPU identifier that this event was emitted on.
ftrace_event. Contains all the ftrace events in the trace

VIEW Contains all the ftrace events in the trace. This table exists only for debugging purposes and should not be relied on in production usecases (i.e. metrics, standard library etc). Note also that this table might be empty if raw ftrace parsing has been disabled.

Column Type Description
id ID Unique identifier for this ftrace event.
ts TIMESTAMP The timestamp of this event.
name STRING The ftrace event name.
cpu LONG The CPU this event was emitted on (meaningful only in single machine traces). For multi-machine, join with the cpu table on ucpu to get the CPU identifier of each machine.
utid JOINID(thread.id) The thread this event was emitted on.
arg_set_id ARGSETID The set of key/value pairs associated with this event.
common_flags LONG Ftrace event flags for this event. Currently only emitted for sched_waking events.
ucpu LONG The unique CPU identifier that this event was emitted on.
experimental_sched_upid. The sched_slice table with the upid column.

VIEW

Column Type Description
id ID Unique identifier for this scheduling slice.
ts TIMESTAMP The timestamp at the start of the slice.
dur DURATION The duration of the slice.
cpu LONG The CPU that the slice executed on (meaningful only in single machine traces). For multi-machine, join with the cpu table on ucpu to get the CPU identifier of each machine.
utid JOINID(thread.id) The thread's unique id in the trace.
end_state STRING A string representing the scheduling state of the kernel thread at the end of the slice. The individual characters in the string mean the following: R (runnable), S (awaiting a wakeup), D (in an uninterruptible sleep), T (suspended), t (being traced), X (exiting), P (parked), W (waking), I (idle), N (not contributing to the load average), K (wakeable on fatal signals) and Z (zombie, awaiting cleanup).
priority LONG The kernel priority that the thread ran at.
ucpu JOINID(cpu.id) The unique CPU identifier that the slice executed on.
upid JOINID(process.id) The process's unique id in the trace.
thread_track. Tracks which are associated to a single thread.

TABLE

Column Type Description
id ID(track.id) Unique identifier for this thread track.
name STRING Name of the track.
type STRING The type of a track indicates the type of data the track contains. Every track is uniquely identified by the the combination of the type and a set of dimensions: type allow identifying a set of tracks with the same type of data within the whole universe of tracks while dimensions allow distinguishing between different tracks in that set.
parent_id JOINID(track.id) The track which is the "parent" of this track. Only non-null for tracks created using Perfetto's track_event API.
source_arg_set_id ARGSETID Args for this track which store information about "source" of this track in the trace. For example: whether this track orginated from atrace, Chrome tracepoints etc.
machine_id LONG Machine identifier, non-null for tracks on a remote machine.
utid JOINID(thread.id) The utid that the track is associated with.
process_track. Tracks which are associated to a single process.

TABLE

Column Type Description
id ID(track.id) Unique identifier for this process track.
name STRING Name of the track.
type STRING The type of a track indicates the type of data the track contains. Every track is uniquely identified by the the combination of the type and a set of dimensions: type allow identifying a set of tracks with the same type of data within the whole universe of tracks while dimensions allow distinguishing between different tracks in that set.
parent_id JOINID(track.id) The track which is the "parent" of this track. Only non-null for tracks created using Perfetto's track_event API.
source_arg_set_id ARGSETID Args for this track which store information about "source" of this track in the trace. For example: whether this track orginated from atrace, Chrome tracepoints etc.
machine_id LONG Machine identifier, non-null for tracks on a remote machine.
upid JOINID(process.id) The upid that the track is associated with.
cpu_track. Tracks which are associated to a single CPU.

TABLE

Column Type Description
id ID(track.id) Unique identifier for this cpu track.
name STRING Name of the track.
type STRING The type of a track indicates the type of data the track contains. Every track is uniquely identified by the the combination of the type and a set of dimensions: type allow identifying a set of tracks with the same type of data within the whole universe of tracks while dimensions allow distinguishing between different tracks in that set.
parent_id JOINID(track.id) The track which is the "parent" of this track. Only non-null for tracks created using Perfetto's track_event API.
source_arg_set_id ARGSETID Args for this track which store information about "source" of this track in the trace. For example: whether this track orginated from atrace, Chrome tracepoints etc.
machine_id LONG Machine identifier, non-null for tracks on a remote machine.
cpu LONG The CPU that the track is associated with.
gpu_track. Table containing tracks which are loosely tied to a GPU. NOTE: this table is deprecated due to inconsistency of it's design with other track tables (e.g

TABLE Table containing tracks which are loosely tied to a GPU.

NOTE: this table is deprecated due to inconsistency of it's design with other track tables (e.g. not having a GPU column, mixing a bunch of different tracks which are barely related). Please use the track table directly instead.

Column Type Description
id ID(track.id) Unique identifier for this cpu track.
name STRING Name of the track.
type STRING The type of a track indicates the type of data the track contains. Every track is uniquely identified by the the combination of the type and a set of dimensions: type allow identifying a set of tracks with the same type of data within the whole universe of tracks while dimensions allow distinguishing between different tracks in that set.
parent_id JOINID(track.id) The track which is the "parent" of this track. Only non-null for tracks created using Perfetto's track_event API.
source_arg_set_id ARGSETID Args for this track which store information about "source" of this track in the trace. For example: whether this track orginated from atrace, Chrome tracepoints etc.
dimension_arg_set_id ARGSETID The dimensions of the track which uniquely identify the track within a given type.
machine_id LONG Machine identifier, non-null for tracks on a remote machine.
scope STRING The source of the track. Deprecated.
description STRING The description for the track.
context_id LONG The context id for the GPU this track is associated to.
counter_track. Tracks containing counter-like events.

VIEW

Column Type Description
id ID(track.id) Unique identifier for this cpu counter track.
name STRING Name of the track.
parent_id JOINID(track.id) The track which is the "parent" of this track. Only non-null for tracks created using Perfetto's track_event API.
type STRING The type of a track indicates the type of data the track contains. Every track is uniquely identified by the the combination of the type and a set of dimensions: type allow identifying a set of tracks with the same type of data within the whole universe of tracks while dimensions allow distinguishing between different tracks in that set.
dimension_arg_set_id ARGSETID The dimensions of the track which uniquely identify the track within a given type.
source_arg_set_id ARGSETID Args for this track which store information about "source" of this track in the trace. For example: whether this track orginated from atrace, Chrome tracepoints etc.
machine_id LONG Machine identifier, non-null for tracks on a remote machine.
unit STRING The units of the counter. This column is rarely filled.
description STRING The description for this track. For debugging purposes only.
cpu_counter_track. Tracks containing counter-like events associated to a CPU.

TABLE

Column Type Description
id ID(track.id) Unique identifier for this cpu counter track.
name STRING Name of the track.
type STRING The type of a track indicates the type of data the track contains. Every track is uniquely identified by the the combination of the type and a set of dimensions: type allow identifying a set of tracks with the same type of data within the whole universe of tracks while dimensions allow distinguishing between different tracks in that set.
parent_id JOINID(track.id) The track which is the "parent" of this track. Only non-null for tracks created using Perfetto's track_event API.
source_arg_set_id ARGSETID Args for this track which store information about "source" of this track in the trace. For example: whether this track orginated from atrace, Chrome tracepoints etc.
machine_id LONG Machine identifier, non-null for tracks on a remote machine.
unit STRING The units of the counter. This column is rarely filled.
description STRING The description for this track. For debugging purposes only.
cpu LONG The CPU that the track is associated with.
gpu_counter_track. Tracks containing counter-like events associated to a GPU.

TABLE

Column Type Description
id ID(track.id) Unique identifier for this gpu counter track.
name STRING Name of the track.
type STRING The type of a track indicates the type of data the track contains. Every track is uniquely identified by the the combination of the type and a set of dimensions: type allow identifying a set of tracks with the same type of data within the whole universe of tracks while dimensions allow distinguishing between different tracks in that set.
parent_id JOINID(track.id) The track which is the "parent" of this track. Only non-null for tracks created using Perfetto's track_event API.
source_arg_set_id ARGSETID Args for this track which store information about "source" of this track in the trace. For example: whether this track orginated from atrace, Chrome tracepoints etc.
machine_id LONG Machine identifier, non-null for tracks on a remote machine.
unit STRING The units of the counter. This column is rarely filled.
description STRING The description for this track. For debugging purposes only.
gpu_id LONG The GPU that the track is associated with.
process_counter_track. Tracks containing counter-like events associated to a process.

TABLE

Column Type Description
id ID(track.id) Unique identifier for this process counter track.
name STRING Name of the track.
type STRING The type of a track indicates the type of data the track contains. Every track is uniquely identified by the the combination of the type and a set of dimensions: type allow identifying a set of tracks with the same type of data within the whole universe of tracks while dimensions allow distinguishing between different tracks in that set.
parent_id JOINID(track.id) The track which is the "parent" of this track. Only non-null for tracks created using Perfetto's track_event API.
source_arg_set_id ARGSETID Args for this track which store information about "source" of this track in the trace. For example: whether this track orginated from atrace, Chrome tracepoints etc.
machine_id LONG Machine identifier, non-null for tracks on a remote machine.
unit STRING The units of the counter. This column is rarely filled.
description STRING The description for this track. For debugging purposes only.
upid LONG The upid of the process that the track is associated with.
thread_counter_track. Tracks containing counter-like events associated to a thread.

TABLE

Column Type Description
id ID(track.id) Unique identifier for this thread counter track.
name STRING Name of the track.
type STRING The type of a track indicates the type of data the track contains. Every track is uniquely identified by the the combination of the type and a set of dimensions: type allow identifying a set of tracks with the same type of data within the whole universe of tracks while dimensions allow distinguishing between different tracks in that set.
parent_id JOINID(track.id) The track which is the "parent" of this track. Only non-null for tracks created using Perfetto's track_event API.
source_arg_set_id JOINID(track.id) Args for this track which store information about "source" of this track in the trace. For example: whether this track orginated from atrace, Chrome tracepoints etc.
machine_id LONG Machine identifier, non-null for tracks on a remote machine.
unit STRING The units of the counter. This column is rarely filled.
description STRING The description for this track. For debugging purposes only.
utid LONG The utid of the thread that the track is associated with.
perf_counter_track. Tracks containing counter-like events collected from Linux perf.

TABLE

Column Type Description
id ID(track.id) Unique identifier for this thread counter track.
name STRING Name of the track.
type STRING The type of a track indicates the type of data the track contains. Every track is uniquely identified by the the combination of the type and a set of dimensions: type allow identifying a set of tracks with the same type of data within the whole universe of tracks while dimensions allow distinguishing between different tracks in that set.
parent_id JOINID(track.id) The track which is the "parent" of this track. Only non-null for tracks created using Perfetto's track_event API.
source_arg_set_id ARGSETID Args for this track which store information about "source" of this track in the trace. For example: whether this track orginated from atrace, Chrome tracepoints etc.
machine_id LONG Machine identifier, non-null for tracks on a remote machine.
unit STRING The units of the counter. This column is rarely filled.
description STRING The description for this track. For debugging purposes only.
perf_session_id LONG The id of the perf session this counter was captured on.
cpu LONG The CPU the counter is associated with.
is_timebase BOOL Whether this counter is the sampling timebase for the session.
counters. Alias of the `counter` table.

VIEW

Column Type Description
id ID Alias of counter.id.
ts TIMESTAMP Alias of counter.ts.
track_id JOINID(track.id) Alias of counter.track_id.
value DOUBLE Alias of counter.value.
arg_set_id LONG Alias of counter.arg_set_id.
name STRING Legacy column, should no longer be used.
unit STRING Legacy column, should no longer be used.
counter. Counters are values put into tracks during parsing of the trace.

VIEW

Column Type Description
id ID Unique id of a counter value
ts TIMESTAMP Time of fetching the counter value.
track_id JOINID(track.id) Track this counter value belongs to.
value DOUBLE Value.
arg_set_id ARGSETID Additional information about the counter value.
slice. Contains slices from userspace which explains what threads were doing during the trace.

VIEW Contains slices from userspace which explains what threads were doing during the trace.

Column Type Description
id ID The id of the slice.
ts TIMESTAMP The timestamp at the start of the slice.
dur DURATION The duration of the slice.
track_id JOINID(track.id) The id of the track this slice is located on.
category STRING The "category" of the slice. If this slice originated with track_event, this column contains the category emitted. Otherwise, it is likely to be null (with limited exceptions).
name STRING The name of the slice. The name describes what was happening during the slice.
depth LONG The depth of the slice in the current stack of slices.
stack_id LONG A unique identifier obtained from the names of all slices in this stack. This is rarely useful and kept around only for legacy reasons.
parent_stack_id LONG The stack_id for the parent of this slice. Rarely useful.
parent_id JOINID(slice.id) The id of the parent (i.e. immediate ancestor) slice for this slice.
arg_set_id ARGSETID The id of the argument set associated with this slice.
thread_ts TIMESTAMP The thread timestamp at the start of the slice. This column will only be populated if thread timestamp collection is enabled with track_event.
thread_dur DURATION The thread time used by this slice. This column will only be populated if thread timestamp collection is enabled with track_event.
thread_instruction_count LONG The value of the CPU instruction counter at the start of the slice. This column will only be populated if thread instruction collection is enabled with track_event.
thread_instruction_delta LONG The change in value of the CPU instruction counter between the start and end of the slice. This column will only be populated if thread instruction collection is enabled with track_event.
cat STRING Alias of category.
slice_id JOINID(slice.id) Alias of id.
instant. Contains instant events from userspace which indicates what happened at a single moment in time.

VIEW Contains instant events from userspace which indicates what happened at a single moment in time.

Column Type Description
ts TIMESTAMP The timestamp of the instant.
track_id JOINID(track.id) The id of the track this instant is located on.
name STRING The name of the instant. The name describes what happened during the instant.
arg_set_id ARGSETID The id of the argument set associated with this instant.
slices. Alternative alias of table `slice`.

VIEW

Column Type Description
id JOINID(slice.id) Alias of slice.id.
ts TIMESTAMP Alias of slice.ts.
dur DURATION Alias of slice.dur.
track_id JOINID(track.id) Alias of slice.track_id.
category STRING Alias of slice.category.
name STRING Alias of slice.name.
depth LONG Alias of slice.depth.
stack_id LONG Alias of slice.stack_id.
parent_stack_id LONG Alias of slice.parent_stack_id.
parent_id JOINID(slice.id) Alias of slice.parent_id.
arg_set_id ARGSETID Alias of slice.arg_set_id.
thread_ts TIMESTAMP Alias of slice.thread_ts.
thread_dur DURATION Alias of slice.thread_dur.
thread_instruction_count LONG Alias of slice.thread_instruction_count.
thread_instruction_delta LONG Alias of slice.thread_instruction_delta.
cat STRING Alias of slice.cat.
slice_id JOINID(slice.id) Alias of slice.slice_id.
thread. Contains information of threads seen during the trace.

VIEW

Column Type Description
id ID The id of the thread. Prefer using utid instead.
utid ID Unique thread id. This is != the OS tid. This is a monotonic number associated to each thread. The OS thread id (tid) cannot be used as primary key because tids and pids are recycled by most kernels.
tid LONG The OS id for this thread. Note: this is not unique over the lifetime of the trace so cannot be used as a primary key. Use |utid| instead.
name STRING The name of the thread. Can be populated from many sources (e.g. ftrace, /proc scraping, track event etc).
start_ts TIMESTAMP The start timestamp of this thread (if known). Is null in most cases unless a thread creation event is enabled (e.g. task_newtask ftrace event on Linux/Android).
end_ts TIMESTAMP The end timestamp of this thread (if known). Is null in most cases unless a thread destruction event is enabled (e.g. sched_process_free ftrace event on Linux/Android).
upid JOINID(process.id) The process hosting this thread.
is_main_thread BOOL Boolean indicating if this thread is the main thread in the process.
machine_id LONG Machine identifier, non-null for threads on a remote machine.
process. Contains information of processes seen during the trace.

VIEW

Column Type Description
id ID The id of the process. Prefer using upid instead.
upid JOINID(process.id) Unique process id. This is != the OS pid. This is a monotonic number associated to each process. The OS process id (pid) cannot be used as primary key because tids and pids are recycled by most kernels.
pid LONG The OS id for this process. Note: this is not unique over the lifetime of the trace so cannot be used as a primary key. Use |upid| instead.
name STRING The name of the process. Can be populated from many sources (e.g. ftrace, /proc scraping, track event etc).
start_ts TIMESTAMP The start timestamp of this process (if known). Is null in most cases unless a process creation event is enabled (e.g. task_newtask ftrace event on Linux/Android).
end_ts TIMESTAMP The end timestamp of this process (if known). Is null in most cases unless a process destruction event is enabled (e.g. sched_process_free ftrace event on Linux/Android).
parent_upid JOINID(process.id) The upid of the process which caused this process to be spawned.
uid LONG The Unix user id of the process.
android_appid LONG Android appid of this process.
cmdline STRING /proc/cmdline for this process.
arg_set_id ARGSETID Extra args for this process.
machine_id LONG Machine identifier, non-null for processes on a remote machine.
args. Arbitrary key-value pairs which allow adding metadata to other, strongly typed tables. Note: for a given row, only one of |int_value|, |string_value|, |real_value| will be non-null.

VIEW Arbitrary key-value pairs which allow adding metadata to other, strongly typed tables. Note: for a given row, only one of |int_value|, |string_value|, |real_value| will be non-null.

Column Type Description
id ID The id of the arg.
arg_set_id ARGSETID The id for a single set of arguments.
flat_key STRING The "flat key" of the arg: this is the key without any array indexes.
key STRING The key for the arg.
int_value LONG The integer value of the arg.
string_value STRING The string value of the arg.
real_value DOUBLE The double value of the arg.
value_type STRING The type of the value of the arg. Will be one of 'int', 'uint', 'string', 'real', 'pointer', 'bool' or 'json'.
display_value STRING The human-readable formatted value of the arg.
perf_session. Contains the Linux perf sessions in the trace.

VIEW

Column Type Description
id LONG The id of the perf session. Prefer using perf_session_id instead.
perf_session_id LONG The id of the perf session.
cmdline STRING Command line used to collect the data.
android_logs. Log entries from Android logcat. NOTE: this table is not sorted by timestamp.

VIEW Log entries from Android logcat.

NOTE: this table is not sorted by timestamp.

Column Type Description
id ID Which row in the table the log corresponds to.
ts TIMESTAMP Timestamp of log entry.
utid JOINID(thread.id) Thread writing the log entry.
prio LONG Priority of the log. 3=DEBUG, 4=INFO, 5=WARN, 6=ERROR.
tag STRING Tag of the log entry.
msg STRING Content of the log entry

Functions

slice_is_ancestor -> BOOL. Given two slice ids, returns whether the first is an ancestor of the second.

Returns BOOL: Whether ancestor_id slice is an ancestor of descendant_id.

Argument Type Description
ancestor_id LONG Id of the potential ancestor slice.
descendant_id LONG Id of the potential descendant slice.
trace_start -> TIMESTAMP. Fetch start of the trace.

Returns TIMESTAMP: Start of the trace.

trace_end -> TIMESTAMP. Fetch end of the trace.

Returns TIMESTAMP: End of the trace.

trace_dur -> DURATION. Fetch duration of the trace.

Returns DURATION: Duration of the trace.

Macros

cast_int. Casts |value| to INT.

Returns: Expr,

Argument Type Description
value Expr Query or subquery that will be cast.
cast_double. Casts |value| to DOUBLE.

Returns: Expr,

Argument Type Description
value Expr Query or subquery that will be cast.
cast_string. Casts |value| to STRING.

Returns: Expr,

Argument Type Description
value Expr Query or subquery that will be cast.

Package: android

android.anrs

Views/Tables

android_anrs. List of all ANRs that occurred in the trace (one row per ANR).

VIEW

Column Type Description
process_name STRING Name of the process that triggered the ANR.
pid LONG PID of the process that triggered the ANR.
upid JOINID(process.id) UPID of the process that triggered the ANR.
error_id STRING UUID of the ANR (generated on the platform).
ts TIMESTAMP Timestamp of the ANR.
subject STRING Subject line of the ANR.

android.app_process_starts

Views/Tables

android_app_process_starts. All app cold starts with information about their cold start reason: broadcast, service, activity or provider.

TABLE All app cold starts with information about their cold start reason: broadcast, service, activity or provider.

Column Type Description
start_id LONG Slice id of the bindApplication slice in the app. Uniquely identifies a process start.
id LONG Slice id of intent received in the app.
track_id JOINID(track.id) Track id of the intent received in the app.
process_name STRING Name of the process receiving the intent.
pid LONG Pid of the process receiving the intent.
upid JOINID(process.id) Upid of the process receiving the intent.
intent STRING Intent action or component responsible for the cold start.
reason STRING Process start reason: activity, broadcast, service or provider.
proc_start_ts TIMESTAMP Timestamp the process start was dispatched from system_server.
proc_start_dur DURATION Duration to dispatch the process start from system_server.
bind_app_ts TIMESTAMP Timestamp the bindApplication started in the app.
bind_app_dur DURATION Duration to complete bindApplication in the app.
intent_ts TIMESTAMP Timestamp the Intent was received in the app.
intent_dur DURATION Duration to handle intent in the app.
total_dur LONG Total duration from proc_start dispatched to intent completed.

android.auto.multiuser

Views/Tables

android_auto_multiuser_timing. Time elapsed between the latest user start and the specific end event like package startup(ex carlauncher) or previous user stop.

TABLE Time elapsed between the latest user start and the specific end event like package startup(ex carlauncher) or previous user stop.

Column Type Description
event_start_user_id STRING Id of the started android user
event_start_time LONG Start event time
event_end_time LONG End event time
event_end_name STRING End event name
event_start_name STRING Start event name
duration LONG User switch duration from start event to end event
android_auto_multiuser_timing_with_previous_user_resource_usage. This table extends `android_auto_multiuser_timing` table with previous user resource usage.

VIEW

Column Type Description
event_start_user_id STRING Start user id
event_start_time LONG Start event time
event_end_time LONG End event time
event_end_name STRING End event name
event_start_name STRING Start event name
duration LONG User switch duration from start event to end event
user_id LONG User id
total_cpu_time LONG Total CPU time for a user
total_memory_usage_kb LONG Total memory user for a user

android.battery

Views/Tables

android_battery_charge. Battery charge at timestamp.

VIEW

Column Type Description
ts TIMESTAMP Timestamp.
current_avg_ua DOUBLE Current average micro ampers.
capacity_percent DOUBLE Current capacity percentage.
charge_uah DOUBLE Current charge in micro ampers.
current_ua DOUBLE Current micro ampers.
voltage_uv DOUBLE Current voltage in micro volts.
energy_counter_uwh DOUBLE Current energy counter in microwatt-hours(µWh).

android.battery.charging_states

Views/Tables

android_charging_states. Device charging states.

TABLE

Column Type Description
id LONG Alias of counter.id if a slice with charging state exists otherwise there will be a single row where id = 1.
ts TIMESTAMP Timestamp at which the device charging state began.
dur DURATION Duration of the device charging state.
charging_state STRING Device charging state, one of: Charging, Discharging, Not charging (when the charger is present but battery is not charging), Full, Unknown

android.battery_stats

Views/Tables

android_battery_stats_state. View of human readable battery stats counter-based states

VIEW View of human readable battery stats counter-based states. These are recorded by BatteryStats as a bitmap where each 'category' has a unique value at any given time.

Column Type Description
ts TIMESTAMP Start of the new barrary state.
dur DURATION The duration the state was active, -1 for incomplete slices.
safe_dur DURATION The same as dur, but extends to trace end for incomplete slices.
track_name STRING The name of the counter track.
value LONG The counter value as a number.
value_name STRING The counter value as a human-readable string.
android_battery_stats_event_slices. View of slices derived from battery_stats events

VIEW View of slices derived from battery_stats events. Battery stats records all events as instants, however some may indicate whether something started or stopped with a '+' or '-' prefix. Events such as jobs, top apps, foreground apps or long wakes include these details and allow drawing slices between instant events found in a trace.

For example, we may see an event like the following on 'battery_stats.top':

-top=10215:"com.google.android.apps.nexuslauncher"

This view will find the associated start ('+top') with the matching suffix (everything after the '=') to construct a slice. It computes the timestamp and duration from the events and extract the details as follows:

track_name='battery_stats.top' str_value='com.google.android.apps.nexuslauncher' int_value=10215
Column Type Description
ts TIMESTAMP Start of a new battery state.
dur DURATION The duration the state was active, -1 for incomplete slices.
safe_dur DURATION The same as dur, but extends to trace end for incomplete slices.
track_name STRING The name of the counter track.
str_value STRING String value.
int_value LONG Int value.

Functions

android_battery_stats_counter_to_string -> STRING. Converts a battery_stats counter value to human readable string.

Returns STRING: The human-readable name for the counter value.

Argument Type Description
track STRING The counter track name (e.g. 'battery_stats.audio').
value DOUBLE The counter value.

android.binder

Views/Tables

android_binder_metrics_by_process. Count Binder transactions per process.

VIEW

Column Type Description
process_name STRING Name of the process that started the binder transaction.
pid LONG PID of the process that started the binder transaction.
slice_name STRING Name of the slice with binder transaction.
event_count LONG Number of binder transactions in process in slice.
android_sync_binder_thread_state_by_txn. Aggregated thread_states on the client and server side per binder txn This builds on the data from |_sync_binder_metrics_by_txn| and for each end (client and server) of the transaction, it returns the aggregated sum of all the thread state durations. The |thread_state_type| column represents whether a given 'aggregated thread_state' row is on the client or server side

VIEW Aggregated thread_states on the client and server side per binder txn This builds on the data from |_sync_binder_metrics_by_txn| and for each end (client and server) of the transaction, it returns the aggregated sum of all the thread state durations. The |thread_state_type| column represents whether a given 'aggregated thread_state' row is on the client or server side. 'binder_txn' is client side and 'binder_reply' is server side.

Column Type Description
binder_txn_id LONG slice id of the binder txn
client_ts TIMESTAMP Client timestamp
client_tid LONG Client tid
binder_reply_id LONG slice id of the binder reply
server_ts TIMESTAMP Server timestamp
server_tid LONG Server tid
thread_state_type STRING whether thread state is on the txn or reply side
thread_state STRING a thread_state that occurred in the txn
thread_state_dur DURATION aggregated dur of the |thread_state| in the txn
thread_state_count LONG aggregated count of the |thread_state| in the txn
android_sync_binder_blocked_functions_by_txn. Aggregated blocked_functions on the client and server side per binder txn This builds on the data from |_sync_binder_metrics_by_txn| and for each end (client and server) of the transaction, it returns the aggregated sum of all the kernel blocked function durations. The |thread_state_type| column represents whether a given 'aggregated blocked_function' row is on the client or server side

VIEW Aggregated blocked_functions on the client and server side per binder txn This builds on the data from |_sync_binder_metrics_by_txn| and for each end (client and server) of the transaction, it returns the aggregated sum of all the kernel blocked function durations. The |thread_state_type| column represents whether a given 'aggregated blocked_function' row is on the client or server side. 'binder_txn' is client side and 'binder_reply' is server side.

Column Type Description
binder_txn_id LONG slice id of the binder txn
client_ts TIMESTAMP Client ts
client_tid LONG Client tid
binder_reply_id LONG slice id of the binder reply
server_ts TIMESTAMP Server ts
server_tid LONG Server tid
thread_state_type STRING whether thread state is on the txn or reply side
blocked_function STRING blocked kernel function in a thread state
blocked_function_dur DURATION aggregated dur of the |blocked_function| in the txn
blocked_function_count LONG aggregated count of the |blocked_function| in the txn
android_binder_txns. Breakdown binder transactions per txn. It returns data about the client and server ends of every binder transaction async.

TABLE Breakdown binder transactions per txn. It returns data about the client and server ends of every binder transaction async.

Column Type Description
aidl_name STRING Fully qualified name of the binder endpoint if existing.
interface STRING Interface of the binder endpoint if existing.
aidl_ts TIMESTAMP Timestamp the binder interface name was emitted. Proxy to 'ts' and 'dur' for async txns.
aidl_dur DURATION Duration of the binder interface name. Proxy to 'ts' and 'dur' for async txns.
binder_txn_id JOINID(slice.id) Slice id of the binder txn.
client_process STRING Name of the client process.
client_thread STRING Name of the client thread.
client_upid JOINID(process.id) Upid of the client process.
client_utid JOINID(thread.id) Utid of the client thread.
client_tid LONG Tid of the client thread.
client_pid LONG Pid of the client thread.
is_main_thread BOOL Whether the txn was initiated from the main thread of the client process.
client_ts TIMESTAMP Timestamp of the client txn.
client_dur DURATION Wall clock dur of the client txn.
binder_reply_id JOINID(slice.id) Slice id of the binder reply.
server_process STRING Name of the server process.
server_thread STRING Name of the server thread.
server_upid JOINID(process.id) Upid of the server process.
server_utid JOINID(thread.id) Utid of the server thread.
server_tid LONG Tid of the server thread.
server_pid LONG Pid of the server thread.
server_ts TIMESTAMP Timestamp of the server txn.
server_dur DURATION Wall clock dur of the server txn.
client_oom_score LONG Oom score of the client process at the start of the txn.
server_oom_score LONG Oom score of the server process at the start of the reply.
is_sync BOOL Whether the txn is synchronous or async (oneway).
client_monotonic_dur DURATION Monotonic clock dur of the client txn.
server_monotonic_dur DURATION Monotonic clock dur of the server txn.
client_package_version_code LONG Client package version_code.
server_package_version_code LONG Server package version_code.
is_client_package_debuggable BOOL Whether client package is debuggable.
is_server_package_debuggable BOOL Whether server package is debuggable.

Table Functions

android_binder_outgoing_graph. Returns a DAG of all outgoing binder txns from a process. The roots of the graph are the threads making the txns and the graph flows from: thread -> server_process -> AIDL interface -> AIDL method. The weights of each node represent the wall execution time in the server_process.

Returns a DAG of all outgoing binder txns from a process. The roots of the graph are the threads making the txns and the graph flows from: thread -> server_process -> AIDL interface -> AIDL method. The weights of each node represent the wall execution time in the server_process.

Argument Type Description
upid JOINID(process.id) Upid of process to generate an outgoing graph for.
Column Type Description
pprof BYTES Pprof of outgoing binder txns.
android_binder_incoming_graph. Returns a DAG of all incoming binder txns from a process. The roots of the graph are the clients making the txns and the graph flows from: client_process -> AIDL interface -> AIDL method. The weights of each node represent the wall execution time in the server_process.

Returns a DAG of all incoming binder txns from a process. The roots of the graph are the clients making the txns and the graph flows from: client_process -> AIDL interface -> AIDL method. The weights of each node represent the wall execution time in the server_process.

Argument Type Description
upid JOINID(process.id) Upid of process to generate an incoming graph for.
Column Type Description
pprof BYTES Pprof of incoming binder txns.
android_binder_graph. Returns a graph of all binder txns in a trace. The nodes are client_process and server_process. The weights of each node represent the wall execution time in the server_process.

Returns a graph of all binder txns in a trace. The nodes are client_process and server_process. The weights of each node represent the wall execution time in the server_process.

Argument Type Description
min_client_oom_score LONG Matches txns from client_processes greater than or equal to the OOM score.
max_client_oom_score LONG Matches txns from client_processes less than or equal to the OOM score.
min_server_oom_score LONG Matches txns to server_processes greater than or equal to the OOM score.
max_server_oom_score LONG Matches txns to server_processes less than or equal to the OOM score.
Column Type Description
pprof BYTES Pprof of binder txns.

android.binder_breakdown

Views/Tables

android_binder_server_breakdown. Server side binder breakdowns per transactions per txn.

TABLE

Column Type Description
binder_txn_id JOINID(slice.id) Client side id of the binder txn.
binder_reply_id JOINID(slice.id) Server side id of the binder txn.
ts TIMESTAMP Timestamp of an exclusive interval during the binder reply with a single reason.
dur DURATION Duration of an exclusive interval during the binder reply with a single reason.
reason STRING Cause of delay during an exclusive interval of the binder reply.
android_binder_client_breakdown. Client side binder breakdowns per transactions per txn.

TABLE

Column Type Description
binder_txn_id JOINID(slice.id) Client side id of the binder txn.
binder_reply_id JOINID(slice.id) Server side id of the binder txn.
ts TIMESTAMP Timestamp of an exclusive interval during the binder txn with a single latency reason.
dur DURATION Duration of an exclusive interval during the binder txn with a single latency reason.
reason STRING Cause of delay during an exclusive interval of the binder txn.
android_binder_client_server_breakdown. Combined client and server side binder breakdowns per transaction.

TABLE

Column Type Description
binder_txn_id JOINID(slice.id) Client side id of the binder txn.
binder_reply_id JOINID(slice.id) Server side id of the binder txn.
ts TIMESTAMP Timestamp of an exclusive interval during the binder txn with a single latency reason.
dur DURATION Duration of an exclusive interval during the binder txn with a single latency reason.
server_reason STRING The server side component of this interval's binder latency reason, if any.
client_reason STRING The client side component of this interval's binder latency reason.
reason STRING Combined reason indicating whether latency came from client or server side.

android.cpu.cluster_type

Views/Tables

android_cpu_cluster_mapping. Stores the mapping of a cpu to its cluster type - e.g

TABLE Stores the mapping of a cpu to its cluster type - e.g. little, medium, big. This cluster type is determined by initially using cpu_capacity from sysfs and grouping clusters with identical capacities, ordered by size. In the case that capacities are not present, max frequency is used instead. If nothing is avaiable, NULL is returned.

Column Type Description
ucpu LONG Alias of cpu.ucpu.
cpu LONG Alias of cpu.cpu.
cluster_type STRING The cluster type of the CPU.

android.desktop_mode

Views/Tables

android_desktop_mode_windows. Desktop Windows with durations they were open.

TABLE

Column Type Description
raw_add_ts TIMESTAMP Window add timestamp; NULL if no add event in the trace.
raw_remove_ts TIMESTAMP Window remove timestamp; NULL if no remove event in the trace.
ts TIMESTAMP Timestamp that the window was added; or trace_start() if no add event in the trace.
dur DURATION Furation the window was open; or until trace_end() if no remove event in the trace.
instance_id LONG Desktop Window instance ID - unique per window.
uid LONG UID of the app running in the window.

android.device

Views/Tables

android_device_name. Extract name of the device based on metadata from the trace.

TABLE

Column Type Description
name STRING Device name.

android.dvfs

Views/Tables

android_dvfs_counters. Dvfs counter with duration.

VIEW

Column Type Description
name STRING Counter name.
ts TIMESTAMP Timestamp when counter value changed.
value DOUBLE Counter value.
dur DURATION Counter duration.
android_dvfs_counter_stats. Aggregates dvfs counter slice for statistic.

TABLE

Column Type Description
name STRING Counter name on which all the other values are aggregated on.
max DOUBLE Max of all counter values for the counter name.
min DOUBLE Min of all counter values for the counter name.
dur DURATION Duration between the first and last counter value for the counter name.
wgt_avg DOUBLE Weighted avergate of all the counter values for the counter name.
android_dvfs_counter_residency. Aggregates dvfs counter slice for residency

VIEW

Column Type Description
name STRING Counter name.
value DOUBLE Counter value.
dur DURATION Counter duration.
pct DOUBLE Counter duration as a percentage of total duration.

android.frames.jank_type

Functions

android_is_sf_jank_type -> BOOL. Categorizes whether the jank was caused by Surface Flinger

Returns BOOL: True when the jank type represents sf jank

Argument Type Description
jank_type STRING the jank type from args.display_value with key = "Jank type"
android_is_app_jank_type -> BOOL. Categorizes whether the jank was caused by the app

Returns BOOL: True when the jank type represents app jank

Argument Type Description
jank_type STRING the jank type from args.display_value with key = "Jank type"

android.frames.per_frame_metrics

Views/Tables

android_frames_overrun. The amount by which each frame missed of hit its deadline

TABLE The amount by which each frame missed of hit its deadline. Negative if the deadline was not missed. Frames are considered janky if overrun is positive. Calculated as the difference between the end of the expected_frame_timeline_slice and actual_frame_timeline_slice for the frame. Availability: from S (API 31). For Googlers: more details in go/android-performance-metrics-glossary.

Column Type Description
frame_id LONG Frame id.
overrun LONG Difference between expected and actual frame ends. Negative if frame didn't miss deadline.
android_frames_ui_time. How much time did the frame's Choreographer callbacks take.

TABLE

Column Type Description
frame_id LONG Frame id
ui_time LONG UI time duration
android_app_vsync_delay_per_frame. App Vsync delay for a frame

TABLE App Vsync delay for a frame. The time between the VSYNC-app signal and the start of Choreographer work. Calculated as time difference between the actual frame start (from actual_frame_timeline_slice) and start of the Choreographer#doFrame slice. For Googlers: more details in go/android-performance-metrics-glossary.

Column Type Description
frame_id LONG Frame id
app_vsync_delay LONG App VSYNC delay.
android_cpu_time_per_frame. How much time did the frame take across the UI Thread + RenderThread. Calculated as sum of `app VSYNC delay` `Choreographer#doFrame` slice duration and summed durations of all `DrawFrame` slices associated with this frame. Availability: from N (API 24). For Googlers: more details in go/android-performance-metrics-glossary.

TABLE How much time did the frame take across the UI Thread + RenderThread. Calculated as sum of app VSYNC delay Choreographer#doFrame slice duration and summed durations of all DrawFrame slices associated with this frame. Availability: from N (API 24). For Googlers: more details in go/android-performance-metrics-glossary.

Column Type Description
frame_id LONG Frame id
app_vsync_delay LONG Difference between actual timeline of the frame and Choreographer#doFrame. See android_app_vsync_delay_per_frame table for more details.
do_frame_dur DURATION Duration of Choreographer#doFrame slice.
draw_frame_dur DURATION Duration of DrawFrame slice. Summed duration of all DrawFrame slices, if more than one. See android_frames_draw_frame for more details.
cpu_time LONG CPU time across the UI Thread + RenderThread.
android_frame_stats. Aggregated stats of the frame. For Googlers: more details in go/android-performance-metrics-glossary.

TABLE Aggregated stats of the frame.

For Googlers: more details in go/android-performance-metrics-glossary.

Column Type Description
frame_id LONG Frame id.
overrun LONG The amount by which each frame missed of hit its deadline. See android_frames_overrun for details.
cpu_time LONG How much time did the frame take across the UI Thread + RenderThread.
ui_time LONG How much time did the frame's Choreographer callbacks take.
was_jank BOOL Was frame janky.
was_slow_frame BOOL CPU time of the frame took over 20ms.
was_big_jank BOOL CPU time of the frame took over 50ms.
was_huge_jank BOOL CPU time of the frame took over 200ms.

android.frames.timeline

Views/Tables

android_frames_choreographer_do_frame. All of the `Choreographer#doFrame` slices with their frame id.

TABLE

Column Type Description
id ID(slice.id) Choreographer#doFrame slice. Slice with the name "Choreographer#doFrame {frame id}".
frame_id LONG Frame id. Taken as the value behind "Choreographer#doFrame" in slice name.
ui_thread_utid JOINID(thread.id) Utid of the UI thread
upid JOINID(process.id) Upid of application process
ts TIMESTAMP Timestamp of the slice.
android_frames_draw_frame. All of the `DrawFrame` slices with their frame id and render thread. There might be multiple DrawFrames slices for a single vsync (frame id). This happens when we are drawing multiple layers (e.g

TABLE All of the DrawFrame slices with their frame id and render thread. There might be multiple DrawFrames slices for a single vsync (frame id). This happens when we are drawing multiple layers (e.g. status bar and notifications).

Column Type Description
id ID(slice.id) DrawFrame slice. Slice with the name "DrawFrame {frame id}".
frame_id LONG Frame id. Taken as the value behind "DrawFrame" in slice name.
render_thread_utid JOINID(thread.id) Utid of the render thread
upid JOINID(process.id) Upid of application process
android_frames_layers. TODO(b/384322064) Match actual timeline slice with correct draw frame using layer name. All slices related to one frame

TABLE TODO(b/384322064) Match actual timeline slice with correct draw frame using layer name. All slices related to one frame. Aggregates Choreographer#doFrame, actual_frame_timeline_slice and expected_frame_timeline_slice slices. This table differs slightly from the android_frames table, as it captures the layer_id for each actual timeline slice too.

Column Type Description
frame_id LONG Frame id.
ts TIMESTAMP Timestamp of the frame. Start of the frame as defined by the start of "Choreographer#doFrame" slice and the same as the start of the frame in `actual_frame_timeline_slice if present.
dur DURATION Duration of the frame, as defined by the duration of the corresponding actual_frame_timeline_slice or, if not present the time between the ts and the end of the final DrawFrame.
do_frame_id JOINID(slice.id) slice.id of "Choreographer#doFrame" slice.
draw_frame_id JOINID(slice.id) slice.id of "DrawFrame" slice. For now, we only support the first DrawFrame slice (due to b/384322064).
actual_frame_timeline_id JOINID(slice.id) slice.id from actual_frame_timeline_slice
expected_frame_timeline_id JOINID(slice.id) slice.id from expected_frame_timeline_slice
render_thread_utid JOINID(thread.id) utid of the render thread.
ui_thread_utid JOINID(thread.id) thread id of the UI thread.
layer_id LONG layer id associated with the actual frame.
layer_name STRING layer name associated with the actual frame.
upid JOINID(process.id) process id.
process_name STRING process name.
android_frames. Table based on the android_frames_layers table

TABLE Table based on the android_frames_layers table. It aggregates time, duration and counts information across different layers for a given frame_id in a given process.

Column Type Description
frame_id LONG Frame id.
ts TIMESTAMP Timestamp of the frame. Start of the frame as defined by the start of "Choreographer#doFrame" slice and the same as the start of the frame in `actual_frame_timeline_slice if present.
dur DURATION Duration of the frame, as defined by the duration of the corresponding actual_frame_timeline_slice or, if not present the time between the ts and the end of the final DrawFrame.
do_frame_id JOINID(slice.id) slice.id of "Choreographer#doFrame" slice.
draw_frame_id JOINID(slice.id) slice.id of "DrawFrame" slice. For now, we only support the first DrawFrame slice (due to b/384322064).
actual_frame_timeline_id JOINID(slice.id) slice.id from actual_frame_timeline_slice
expected_frame_timeline_id JOINID(slice.id) slice.id from expected_frame_timeline_slice
render_thread_utid JOINID(thread.id) utid of the render thread.
ui_thread_utid JOINID(thread.id) thread id of the UI thread.
actual_frame_timeline_count LONG Count of slices in actual_frame_timeline_slice related to this frame.
expected_frame_timeline_count LONG Count of slices in expected_frame_timeline_slice related to this frame.
draw_frame_count LONG Count of draw_frame associated to this frame.
upid JOINID(process.id) process id.
process_name STRING process name.

Table Functions

android_first_frame_after. Returns first frame after the provided timestamp

Returns first frame after the provided timestamp. The returning table has at most one row.

Argument Type Description
ts TIMESTAMP Timestamp.
Column Type Description
frame_id LONG Frame id.
ts TIMESTAMP Start of the frame, the timestamp of the "Choreographer#doFrame" slice.
dur DURATION Duration of the frame.
do_frame_id JOINID(slice.id) "Choreographer#doFrame" slice. The slice with name "Choreographer#doFrame" corresponding to this frame.
draw_frame_id JOINID(slice.id) "DrawFrame" slice. The slice with name "DrawFrame" corresponding to this frame.
actual_frame_timeline_id JOINID(slice.id) actual_frame_timeline_slice` slice related to this frame.
expected_frame_timeline_id JOINID(slice.id) expected_frame_timeline_slice slice related to this frame.
render_thread_utid JOINID(thread.id) utid of the render thread.
ui_thread_utid JOINID(thread.id) utid of the UI thread.

android.freezer

Views/Tables

android_freezer_events. All frozen processes and their frozen duration.

TABLE

Column Type Description
upid JOINID(process.id) Upid of frozen process
pid LONG Pid of frozen process
ts TIMESTAMP Timestamp process was frozen.
dur DURATION Duration process was frozen for.
unfreeze_reason_int LONG Unfreeze reason Integer.
unfreeze_reason_str STRING Unfreeze reason String.

android.garbage_collection

Views/Tables

android_garbage_collection_events. All Garbage collection events with a breakdown of the time spent and heap reclaimed.

TABLE

Column Type Description
tid LONG Tid of thread running garbage collection.
pid LONG Pid of process running garbage collection.
utid JOINID(thread.id) Utid of thread running garbage collection.
upid JOINID(process.id) Upid of process running garbage collection.
thread_name STRING Name of thread running garbage collection.
process_name STRING Name of process running garbage collection.
gc_type STRING Type of garbage collection.
is_mark_compact LONG Whether gargage collection is mark compact or copying.
reclaimed_mb DOUBLE MB reclaimed after garbage collection.
min_heap_mb DOUBLE Minimum heap size in MB during garbage collection.
max_heap_mb DOUBLE Maximum heap size in MB during garbage collection.
gc_id LONG Garbage collection id.
gc_ts TIMESTAMP Garbage collection timestamp.
gc_dur DURATION Garbage collection wall duration.
gc_running_dur DURATION Garbage collection duration spent executing on CPU.
gc_runnable_dur DURATION Garbage collection duration spent waiting for CPU.
gc_unint_io_dur DURATION Garbage collection duration spent waiting in the Linux kernel on IO.
gc_unint_non_io_dur DURATION Garbage collection duration spent waiting in the Linux kernel without IO.
gc_int_dur LONG Garbage collection duration spent waiting in interruptible sleep.

android.gpu.frequency

Views/Tables

android_gpu_frequency. GPU frequency counter per GPU.

TABLE

Column Type Description
ts TIMESTAMP Timestamp
dur DURATION Duration
gpu_id LONG GPU id. Joinable with gpu_counter_track.gpu_id.
gpu_freq LONG GPU frequency

android.gpu.memory

Views/Tables

android_gpu_memory_per_process. Counter for GPU memory per process with duration.

TABLE

Column Type Description
ts TIMESTAMP Timestamp
dur DURATION Duration
upid JOINID(process.id) Upid of the process
gpu_memory LONG GPU memory

android.gpu.work_period

Views/Tables

android_gpu_work_period_track. Tracks for GPU work period events originating from the `power/gpu_work_period` Linux ftrace tracepoint. This tracepoint is usually only available on selected Android devices.

TABLE Tracks for GPU work period events originating from the power/gpu_work_period Linux ftrace tracepoint.

This tracepoint is usually only available on selected Android devices.

Column Type Description
id LONG Unique identifier for this track. Joinable with track.id.
machine_id LONG Machine identifier, non-null for tracks on a remote machine.
uid LONG The UID of the package for which the GPU work period events were emitted.
gpu_id LONG The GPU identifier for which the GPU work period events were emitted.

android.input

Views/Tables

android_input_events. All input events with round trip latency breakdown

TABLE All input events with round trip latency breakdown. Input delivery is socket based and every input event sent from the OS needs to be ACK'ed by the app. This gives us 4 subevents to measure latencies between:

  1. Input dispatch event sent from OS.
  2. Input dispatch event received in app.
  3. Input ACK event sent from app.
  4. Input ACk event received in OS.
Column Type Description
dispatch_latency_dur DURATION Duration from input dispatch to input received.
handling_latency_dur DURATION Duration from input received to input ACK sent.
ack_latency_dur DURATION Duration from input ACK sent to input ACK recieved.
total_latency_dur DURATION Duration from input dispatch to input event ACK received.
end_to_end_latency_dur DURATION Duration from input read to frame present time. Null if an input event has no associated frame event.
tid LONG Tid of thread receiving the input event.
thread_name STRING Name of thread receiving the input event.
pid LONG Pid of process receiving the input event.
process_name STRING Name of process receiving the input event.
event_type STRING Input event type. See InputTransport.h: InputMessage#Type
event_action STRING Input event action.
event_seq STRING Input event sequence number, monotonically increasing for an event channel and pid.
event_channel STRING Input event channel name.
input_event_id STRING Unique identifier for the input event.
read_time LONG Timestamp input event was read by InputReader.
dispatch_track_id JOINID(track.id) Thread track id of input event dispatching thread.
dispatch_ts TIMESTAMP Timestamp input event was dispatched.
dispatch_dur DURATION Duration of input event dispatch.
receive_track_id JOINID(track.id) Thread track id of input event receiving thread.
receive_ts TIMESTAMP Timestamp input event was received.
receive_dur DURATION Duration of input event receipt.
frame_id LONG Vsync Id associated with the input. Null if an input event has no associated frame event.
android_key_events. Key events processed by the Android framework (from android.input.inputevent data source).

VIEW

Column Type Description
id LONG ID of the trace entry
event_id LONG The randomly-generated ID associated with each input event processed by Android Framework, used to track the event through the input pipeline
ts TIMESTAMP The timestamp of when the input event was processed by the system
arg_set_id ARGSETID Details of the input event parsed from the proto message
base64_proto STRING Raw proto message encoded in base64
base64_proto_id LONG String id for raw proto message
android_motion_events. Motion events processed by the Android framework (from android.input.inputevent data source).

VIEW

Column Type Description
id LONG ID of the trace entry
event_id LONG The randomly-generated ID associated with each input event processed by Android Framework, used to track the event through the input pipeline
ts TIMESTAMP The timestamp of when the input event was processed by the system
arg_set_id ARGSETID Details of the input event parsed from the proto message
base64_proto STRING Raw proto message encoded in base64
base64_proto_id LONG String id for raw proto message
android_input_event_dispatch. Input event dispatching information in Android (from android.input.inputevent data source).

VIEW

Column Type Description
id LONG ID of the trace entry
event_id LONG Event ID of the input event that was dispatched
arg_set_id ARGSETID Details of the input event parsed from the proto message
base64_proto STRING Raw proto message encoded in base64
base64_proto_id LONG String id for raw proto message
vsync_id LONG Vsync ID that identifies the state of the windows during which the dispatch decision was made
window_id LONG Window ID of the window receiving the event

android.job_scheduler

Views/Tables

android_job_scheduler_events. All scheduled jobs and their latencies. The table is populated by ATrace using the system server ATrace category (`atrace_categories: "ss"`)

TABLE All scheduled jobs and their latencies.

The table is populated by ATrace using the system server ATrace category (atrace_categories: "ss"). You can also set the atrace_apps of interest.

This differs from the android_job_scheduler_states table in the android.job_scheduler_states module which is populated by the ScheduledJobStateChanged atom.

Using android_job_scheduler_states is preferred when the ATOM_SCHEDULED_JOB_STATE_CHANGED is available in the trace since it includes the constraint, screen, or charging state changes for each job in a trace.

Column Type Description
job_id LONG Id of the scheduled job assigned by the app developer.
uid LONG Uid of the process running the scheduled job.
package_name STRING Package name of the process running the scheduled job.
job_service_name STRING Service component name of the scheduled job.
track_id JOINID(track.id) Thread track id of the job scheduler event slice.
id LONG Slice id of the job scheduler event slice.
ts TIMESTAMP Timestamp the job was scheduled.
dur DURATION Duration of the scheduled job.

android.job_scheduler_states

Views/Tables

android_job_scheduler_states. This table returns constraint changes that a job will go through in a single trace. Values in this table are derived from the the `ScheduledJobStateChanged` atom

TABLE This table returns constraint changes that a job will go through in a single trace.

Values in this table are derived from the the ScheduledJobStateChanged atom. This table differs from the android_job_scheduler_with_screen_charging_states in this module (android.job_scheduler_states) by only having job constraint information.

See documentation for the android_job_scheduler_with_screen_charging_states for how tables in this module differ from android_job_scheduler_events table in the android.job_scheduler module and how to populate this table.

Column Type Description
id ID Unique identifier for job scheduler state.
ts TIMESTAMP Timestamp of job state slice.
dur DURATION Duration of job state slice.
slice_id JOINID(slice.id) Id of the slice.
job_name STRING Name of the job (as named by the app).
uid LONG Uid associated with job.
job_id LONG Id of job (assigned by app for T- builds and system generated in U+ builds).
package_name STRING Package that the job belongs (ex: associated app).
job_namespace STRING Namespace of job.
effective_priority LONG Priority at which JobScheduler ran the job.
has_battery_not_low_constraint BOOL True if app requested job should run when the device battery is not low.
has_charging_constraint BOOL True if app requested job should run when the device is charging.
has_connectivity_constraint BOOL True if app requested job should run when device has connectivity.
has_content_trigger_constraint BOOL True if app requested job should run when there is a content trigger.
has_deadline_constraint BOOL True if app requested there is a deadline by which the job should run.
has_idle_constraint BOOL True if app requested job should run when device is idle.
has_storage_not_low_constraint BOOL True if app requested job should run when device storage is not low.
has_timing_delay_constraint BOOL True if app requested job has a timing delay.
is_prefetch BOOL True if app requested job should run within hours of app launch.
is_requested_expedited_job BOOL True if app requested that the job is run as an expedited job.
is_running_as_expedited_job BOOL The job is run as an expedited job.
num_previous_attempts TIMESTAMP Number of previous attempts at running job.
requested_priority LONG The requested priority at which the job should run.
standby_bucket STRING The job's standby bucket (one of: Active, Working Set, Frequent, Rare, Never, Restricted, Exempt).
is_periodic BOOL Job should run in intervals.
has_flex_constraint BOOL True if the job should run as a flex job.
is_requested_as_user_initiated_job BOOL True is app has requested that a job be run as a user initiated job.
is_running_as_user_initiated_job BOOL True if job is running as a user initiated job.
deadline_ms LONG Deadline that job has requested and valid if has_deadline_constraint is true.
job_start_latency_ms LONG The latency in ms between when a job is scheduled and when it actually starts.
num_uncompleted_work_items LONG Number of uncompleted job work items.
proc_state STRING Process state of the process responsible for running the job.
internal_stop_reason STRING Internal stop reason for a job.
public_stop_reason STRING Public stop reason for a job.
android_job_scheduler_with_screen_charging_states. This table returns the constraint, charging, and screen state changes that a job will go through in a single trace. Values from this table are derived from the `ScheduledJobStateChanged` atom

TABLE This table returns the constraint, charging, and screen state changes that a job will go through in a single trace.

Values from this table are derived from the ScheduledJobStateChanged atom. This differs from the android_job_scheduler_events table in the android.job_scheduler module which is derived from ATrace the system server category (atrace_categories: "ss").

This also differs from the android_job_scheduler_states in this module (android.job_scheduler_states) by providing charging and screen state changes.

To populate this table, enable the Statsd Tracing Config with the ATOM_SCHEDULED_JOB_STATE_CHANGED push atom id. https://perfetto.dev/docs/reference/trace-config-proto#StatsdTracingConfig

This table is preferred over android_job_scheduler_events since it contains more information and should be used whenever ATOM_SCHEDULED_JOB_STATE_CHANGED is available in a trace.

Column Type Description
ts TIMESTAMP Timestamp of job.
dur DURATION Duration of slice in ns.
slice_id JOINID(slice.id) Id of the slice.
job_name STRING Name of the job (as named by the app).
job_id LONG Id of job (assigned by app for T- builds and system generated in U+ builds).
uid LONG Uid associated with job.
job_dur DURATION Duration of entire job in ns.
package_name STRING Package that the job belongs (ex: associated app).
job_namespace STRING Namespace of job.
charging_state STRING Device charging state during job (one of: Charging, Discharging, Not charging, Full, Unknown).
screen_state STRING Device screen state during job (one of: Screen off, Screen on, Always-on display (doze), Unknown).
effective_priority LONG Priority at which JobScheduler ran the job.
has_battery_not_low_constraint BOOL True if app requested job should run when the device battery is not low.
has_charging_constraint BOOL True if app requested job should run when the device is charging.
has_connectivity_constraint BOOL True if app requested job should run when device has connectivity.
has_content_trigger_constraint BOOL True if app requested job should run when there is a content trigger.
has_deadline_constraint BOOL True if app requested there is a deadline by which the job should run.
has_idle_constraint BOOL True if app requested job should run when device is idle.
has_storage_not_low_constraint BOOL True if app requested job should run when device storage is not low.
has_timing_delay_constraint BOOL True if app requested job has a timing delay.
is_prefetch BOOL True if app requested job should run within hours of app launch.
is_requested_expedited_job BOOL True if app requested that the job is run as an expedited job.
is_running_as_expedited_job BOOL The job is run as an expedited job.
num_previous_attempts TIMESTAMP Number of previous attempts at running job.
requested_priority LONG The requested priority at which the job should run.
standby_bucket STRING The job's standby bucket (one of: Active, Working Set, Frequent, Rare, Never, Restricted, Exempt).
is_periodic BOOL Job should run in intervals.
has_flex_constraint BOOL True if the job should run as a flex job.
is_requested_as_user_initiated_job BOOL True is app has requested that a job be run as a user initiated job.
is_running_as_user_initiated_job BOOL True if job is running as a user initiated job.
deadline_ms LONG Deadline that job has requested and valid if has_deadline_constraint is true.
job_start_latency_ms LONG The latency in ms between when a job is scheduled and when it actually starts.
num_uncompleted_work_items LONG Number of uncompleted job work items.
proc_state STRING Process state of the process responsible for running the job.
internal_stop_reason STRING Internal stop reason for a job.
public_stop_reason STRING Public stop reason for a job.

android.memory.dmabuf

Views/Tables

android_dmabuf_allocs. Track dmabuf allocations, re-attributing gralloc allocations to their source (if binder transactions to gralloc are recorded).

TABLE Track dmabuf allocations, re-attributing gralloc allocations to their source (if binder transactions to gralloc are recorded).

Column Type Description
ts TIMESTAMP timestamp of the allocation
buf_size LONG allocation size (will be negative for release)
inode LONG dmabuf inode
utid JOINID(thread.id) utid of thread responsible for the allocation if a dmabuf is allocated by gralloc we follow the binder transaction to the requesting thread (requires binder tracing)
tid LONG tid of thread responsible for the allocation
thread_name STRING thread name
upid JOINID(process.id) upid of process responsible for the allocation (matches utid)
pid LONG pid of process responsible for the allocation
process_name STRING process name

android.memory.heap_graph.class_summary_tree

Views/Tables

android_heap_graph_class_summary_tree. Table containing all the Android heap graphs in the trace converted to a shortest-path tree and then aggregated by class name. This table contains a "flamegraph-like" representation of the contents of the heap graph.

TABLE Table containing all the Android heap graphs in the trace converted to a shortest-path tree and then aggregated by class name.

This table contains a "flamegraph-like" representation of the contents of the heap graph.

Column Type Description
graph_sample_ts TIMESTAMP The timestamp the heap graph was dumped at.
upid JOINID(process.id) The upid of the process.
id LONG The id of the node in the class tree.
parent_id LONG The parent id of the node in the class tree or NULL if this is the root.
name STRING The name of the class.
root_type STRING A string describing the type of Java root if this node is a root or NULL if this node is not a root.
self_count LONG The count of objects with the same class name and the same path to the root.
self_size LONG The size of objects with the same class name and the same path to the root.
cumulative_count LONG The sum of self_count of this node and all descendants of this node.
cumulative_size LONG The sum of self_size of this node and all descendants of this node.

android.memory.heap_graph.dominator_tree

Views/Tables

heap_graph_dominator_tree. All reachable heap graph objects, their immediate dominators and summary of their dominated sets. The heap graph dominator tree is calculated by stdlib graphs.dominator_tree. Each reachable object is a node in the dominator tree, their immediate dominator is their parent node in the tree, and their dominated set is all their descendants in the tree

TABLE All reachable heap graph objects, their immediate dominators and summary of their dominated sets. The heap graph dominator tree is calculated by stdlib graphs.dominator_tree. Each reachable object is a node in the dominator tree, their immediate dominator is their parent node in the tree, and their dominated set is all their descendants in the tree. All size information come from the heap_graph_object prelude table.

Column Type Description
id LONG Heap graph object id.
idom_id LONG Immediate dominator object id of the object. If the immediate dominator is the "super-root" (i.e. the object is a root or is dominated by multiple roots) then idom_id will be NULL.
dominated_obj_count LONG Count of all objects dominated by this object, self inclusive.
dominated_size_bytes LONG Total self_size of all objects dominated by this object, self inclusive.
dominated_native_size_bytes LONG Total native_size of all objects dominated by this object, self inclusive.
depth LONG Depth of the object in the dominator tree. Depth of root objects are 1.

android.memory.heap_graph.heap_graph_class_aggregation

Views/Tables

android_heap_graph_class_aggregation. Class-level breakdown of the java heap. Per type name aggregates the object stats and the dominator tree stats.

TABLE Class-level breakdown of the java heap. Per type name aggregates the object stats and the dominator tree stats.

Column Type Description
upid JOINID(process.id) Process upid
graph_sample_ts TIMESTAMP Heap dump timestamp
type_id LONG Class type id
type_name STRING Class name (deobfuscated if available)
is_libcore_or_array BOOL Is type an instance of a libcore object (java.*) or array
obj_count LONG Count of class instances
size_bytes LONG Size of class instances
native_size_bytes LONG Native size of class instances
reachable_obj_count LONG Count of reachable class instances
reachable_size_bytes LONG Size of reachable class instances
reachable_native_size_bytes LONG Native size of reachable class instances
dominated_obj_count LONG Count of all objects dominated by instances of this class Only applies to reachable objects
dominated_size_bytes LONG Size of all objects dominated by instances of this class Only applies to reachable objects
dominated_native_size_bytes LONG Native size of all objects dominated by instances of this class Only applies to reachable objects

android.memory.heap_profile.summary_tree

Views/Tables

android_heap_profile_summary_tree. Table summarising the amount of memory allocated by each callstack as seen by Android native heap profiling (i.e. profiling information collected by heapprofd). Note: this table collapses data from all processes together into a single table.

TABLE Table summarising the amount of memory allocated by each callstack as seen by Android native heap profiling (i.e. profiling information collected by heapprofd).

Note: this table collapses data from all processes together into a single table.

Column Type Description
id LONG The id of the callstack. A callstack in this context is a unique set of frames up to the root.
parent_id LONG The id of the parent callstack for this callstack.
name STRING The function name of the frame for this callstack.
mapping_name STRING The name of the mapping containing the frame. This can be a native binary, library, JAR or APK.
source_file STRING The name of the file containing the function.
line_number LONG The line number in the file the function is located at.
self_size LONG The amount of memory allocated and not freed with this function as the leaf frame.
cumulative_size LONG The amount of memory allocated and not freed with this function appearing anywhere on the callstack.
self_alloc_size LONG The amount of memory allocated with this function as the leaf frame. This may include memory which was later freed.
cumulative_alloc_size LONG The amount of memory allocated with this function appearing anywhere on the callstack. This may include memory which was later freed.

android.memory.process

Views/Tables

memory_oom_score_with_rss_and_swap_per_process. Process memory and it's OOM adjuster scores

TABLE Process memory and it's OOM adjuster scores. Detects transitions, each new interval means that either the memory or OOM adjuster score of the process changed.

Column Type Description
ts TIMESTAMP Timestamp the oom_adj score or memory of the process changed
dur DURATION Duration until the next oom_adj score or memory change of the process.
score LONG oom adjuster score of the process.
bucket STRING oom adjuster bucket of the process.
upid JOINID(process.id) Upid of the process having an oom_adj update.
process_name STRING Name of the process having an oom_adj update.
pid LONG Pid of the process having an oom_adj update.
oom_adj_id JOINID(slice.id) Slice of the latest oom_adj update in the system_server.
oom_adj_ts TIMESTAMP Timestamp of the latest oom_adj update in the system_server.
oom_adj_dur DURATION Duration of the latest oom_adj update in the system_server.
oom_adj_track_id JOINID(track.id) Track of the latest oom_adj update in the system_server. Alias of track.id.
oom_adj_thread_name STRING Thread name of the latest oom_adj update in the system_server.
oom_adj_reason STRING Reason for the latest oom_adj update in the system_server.
oom_adj_trigger STRING Trigger for the latest oom_adj update in the system_server.
anon_rss LONG Anon RSS counter value
file_rss LONG File RSS counter value
shmem_rss LONG Shared memory RSS counter value
rss LONG Total RSS value. Sum of anon_rss, file_rss and shmem_rss. Returns value even if one of the values is NULL.
swap LONG Swap counter value
anon_rss_and_swap LONG Sum or anon_rss and swap. Returns value even if one of the values is NULL.
rss_and_swap LONG Sum or rss and swap. Returns value even if one of the values is NULL.

android.monitor_contention

Views/Tables

android_monitor_contention. Contains parsed monitor contention slices.

TABLE

Column Type Description
blocking_method STRING Name of the method holding the lock.
blocked_method STRING Blocked_method without arguments and return types.
short_blocking_method STRING Blocking_method without arguments and return types.
short_blocked_method STRING Blocked_method without arguments and return types.
blocking_src STRING File location of blocking_method in form filename:linenumber.
blocked_src STRING File location of blocked_method in form filename:linenumber.
waiter_count LONG Zero indexed number of threads trying to acquire the lock.
blocked_utid JOINID(thread.id) Utid of thread holding the lock.
blocked_thread_name STRING Thread name of thread holding the lock.
blocking_utid JOINID(thread.id) Utid of thread holding the lock.
blocking_thread_name STRING Thread name of thread holding the lock.
blocking_tid LONG Tid of thread holding the lock.
upid JOINID(process.id) Upid of process experiencing lock contention.
process_name STRING Process name of process experiencing lock contention.
id LONG Slice id of lock contention.
ts TIMESTAMP Timestamp of lock contention start.
dur DURATION Wall clock duration of lock contention.
monotonic_dur DURATION Monotonic clock duration of lock contention.
track_id JOINID(track.id) Thread track id of blocked thread.
is_blocked_thread_main LONG Whether the blocked thread is the main thread.
blocked_thread_tid LONG Tid of the blocked thread
is_blocking_thread_main LONG Whether the blocking thread is the main thread.
blocking_thread_tid LONG Tid of thread holding the lock.
binder_reply_id LONG Slice id of binder reply slice if lock contention was part of a binder txn.
binder_reply_ts TIMESTAMP Timestamp of binder reply slice if lock contention was part of a binder txn.
binder_reply_tid LONG Tid of binder reply slice if lock contention was part of a binder txn.
pid LONG Pid of process experiencing lock contention.
android_monitor_contention_chain. Contains parsed monitor contention slices with the parent-child relationships.

TABLE

Column Type Description
parent_id LONG Id of monitor contention slice blocking this contention.
blocking_method STRING Name of the method holding the lock.
blocked_method STRING Blocked_method without arguments and return types.
short_blocking_method STRING Blocking_method without arguments and return types.
short_blocked_method STRING Blocked_method without arguments and return types.
blocking_src STRING File location of blocking_method in form filename:linenumber.
blocked_src STRING File location of blocked_method in form filename:linenumber.
waiter_count LONG Zero indexed number of threads trying to acquire the lock.
blocked_utid JOINID(thread.id) Utid of thread holding the lock.
blocked_thread_name STRING Thread name of thread holding the lock.
blocking_utid JOINID(thread.id) Utid of thread holding the lock.
blocking_thread_name STRING Thread name of thread holding the lock.
blocking_tid LONG Tid of thread holding the lock.
upid JOINID(process.id) Upid of process experiencing lock contention.
process_name STRING Process name of process experiencing lock contention.
id LONG Slice id of lock contention.
ts TIMESTAMP Timestamp of lock contention start.
dur DURATION Wall clock duration of lock contention.
monotonic_dur DURATION Monotonic clock duration of lock contention.
track_id JOINID(track.id) Thread track id of blocked thread.
is_blocked_thread_main LONG Whether the blocked thread is the main thread.
blocked_thread_tid LONG Tid of the blocked thread
is_blocking_thread_main LONG Whether the blocking thread is the main thread.
blocking_thread_tid LONG Tid of thread holding the lock.
binder_reply_id LONG Slice id of binder reply slice if lock contention was part of a binder txn.
binder_reply_ts TIMESTAMP Timestamp of binder reply slice if lock contention was part of a binder txn.
binder_reply_tid LONG Tid of binder reply slice if lock contention was part of a binder txn.
pid LONG Pid of process experiencing lock contention.
child_id LONG Id of monitor contention slice blocked by this contention.
android_monitor_contention_chain_thread_state. Contains the span join of the first waiters in the |android_monitor_contention_chain| with their blocking_thread thread state. Note that we only span join the duration where the lock was actually held and contended. This can be less than the duration the lock was 'waited on' when a different waiter acquired the lock earlier than the first waiter.

TABLE Contains the span join of the first waiters in the |android_monitor_contention_chain| with their blocking_thread thread state.

Note that we only span join the duration where the lock was actually held and contended. This can be less than the duration the lock was 'waited on' when a different waiter acquired the lock earlier than the first waiter.

Column Type Description
id LONG Slice id of lock contention.
ts TIMESTAMP Timestamp of lock contention start.
dur DURATION Wall clock duration of lock contention.
blocking_utid JOINID(thread.id) Utid of the blocking |thread_state|.
blocked_function STRING Blocked kernel function of the blocking thread.
state STRING Thread state of the blocking thread.
android_monitor_contention_chain_thread_state_by_txn. Aggregated thread_states on the 'blocking thread', the thread holding the lock. This builds on the data from |android_monitor_contention_chain| and for each contention slice, it returns the aggregated sum of all the thread states on the blocking thread. Note that this data is only available for the first waiter on a lock.

VIEW Aggregated thread_states on the 'blocking thread', the thread holding the lock. This builds on the data from |android_monitor_contention_chain| and for each contention slice, it returns the aggregated sum of all the thread states on the blocking thread.

Note that this data is only available for the first waiter on a lock.

Column Type Description
id LONG Slice id of the monitor contention.
thread_state STRING A |thread_state| that occurred in the blocking thread during the contention.
thread_state_dur DURATION Total time the blocking thread spent in the |thread_state| during contention.
thread_state_count LONG Count of all times the blocking thread entered |thread_state| during the contention.
android_monitor_contention_chain_blocked_functions_by_txn. Aggregated blocked_functions on the 'blocking thread', the thread holding the lock. This builds on the data from |android_monitor_contention_chain| and for each contention, it returns the aggregated sum of all the kernel blocked function durations on the blocking thread. Note that this data is only available for the first waiter on a lock.

VIEW Aggregated blocked_functions on the 'blocking thread', the thread holding the lock. This builds on the data from |android_monitor_contention_chain| and for each contention, it returns the aggregated sum of all the kernel blocked function durations on the blocking thread.

Note that this data is only available for the first waiter on a lock.

Column Type Description
id LONG Slice id of the monitor contention.
blocked_function STRING Blocked kernel function in a thread state in the blocking thread during the contention.
blocked_function_dur DURATION Total time the blocking thread spent in the |blocked_function| during the contention.
blocked_function_count LONG Count of all times the blocking thread executed the |blocked_function| during the contention.

Functions

android_extract_android_monitor_contention_blocking_thread -> STRING. Extracts the blocking thread from a slice name

Returns STRING: Blocking thread

Argument Type Description
slice_name STRING Name of slice
android_extract_android_monitor_contention_blocking_tid -> LONG. Extracts the blocking thread tid from a slice name

Returns LONG: Blocking thread tid

Argument Type Description
slice_name STRING Name of slice
android_extract_android_monitor_contention_blocking_method -> STRING. Extracts the blocking method from a slice name

Returns STRING: Blocking thread

Argument Type Description
slice_name STRING Name of slice
android_extract_android_monitor_contention_short_blocking_method -> STRING. Extracts a shortened form of the blocking method name from a slice name. The shortened form discards the parameter and return types.

Extracts a shortened form of the blocking method name from a slice name. The shortened form discards the parameter and return types. Returns STRING: Blocking thread

Argument Type Description
slice_name STRING Name of slice
android_extract_android_monitor_contention_blocked_method -> STRING. Extracts the monitor contention blocked method from a slice name

Returns STRING: Blocking thread

Argument Type Description
slice_name STRING Name of slice
android_extract_android_monitor_contention_short_blocked_method -> STRING. Extracts a shortened form of the monitor contention blocked method name from a slice name

Extracts a shortened form of the monitor contention blocked method name from a slice name. The shortened form discards the parameter and return types. Returns STRING: Blocking thread

Argument Type Description
slice_name STRING Name of slice
android_extract_android_monitor_contention_waiter_count -> LONG. Extracts the number of waiters on the monitor from a slice name

Returns LONG: Count of waiters on the lock

Argument Type Description
slice_name STRING Name of slice
android_extract_android_monitor_contention_blocking_src -> STRING. Extracts the monitor contention blocking source location from a slice name

Returns STRING: Blocking thread

Argument Type Description
slice_name STRING Name of slice
android_extract_android_monitor_contention_blocked_src -> STRING. Extracts the monitor contention blocked source location from a slice name

Returns STRING: Blocking thread

Argument Type Description
slice_name STRING Name of slice

Table Functions

android_monitor_contention_graph. Returns a DAG of all Java lock contentions in a process. Each node in the graph is a pair. Each edge connects from a node waiting on a lock to a node holding a lock. The weights of each node represent the cumulative wall time the node blocked other nodes connected to it.

Returns a DAG of all Java lock contentions in a process. Each node in the graph is a <thread:Java method> pair. Each edge connects from a node waiting on a lock to a node holding a lock. The weights of each node represent the cumulative wall time the node blocked other nodes connected to it.

Argument Type Description
upid JOINID(process.id) Upid of process to generate a lock graph for.
Column Type Description
pprof BYTES Pprof of lock graph.

android.network_packets

Views/Tables

android_network_packets. Android network packet events (from android.network_packets data source).

VIEW

Column Type Description
ts TIMESTAMP Timestamp.
dur DURATION Duration (non-zero only in aggregate events)
track_name STRING The track name (interface and direction)
package_name STRING Traffic package source (or uid=$X if not found)
iface STRING Traffic interface name (linux interface name)
direction STRING Traffic direction ('Transmitted' or 'Received')
packet_count LONG Number of packets in this event
packet_length LONG Number of bytes in this event (wire size)
packet_transport STRING Transport used for traffic in this event
packet_tcp_flags LONG TCP flags used by tcp frames in this event
socket_tag STRING The Android traffic tag of the network socket
socket_uid LONG The Linux user id of the network socket
local_port LONG The local port number (for udp or tcp only)
remote_port LONG The remote port number (for udp or tcp only)
packet_icmp_type LONG 1-byte ICMP type identifier.
packet_icmp_code LONG 1-byte ICMP code identifier.
packet_tcp_flags_int LONG Packet's tcp flags bitmask (e.g. FIN=0x1, SYN=0x2).
socket_tag_int LONG Packet's socket tag as an integer.

android.oom_adjuster

Views/Tables

android_oom_adj_intervals. All oom adj state intervals across all processes along with the reason for the state update.

VIEW

Column Type Description
ts TIMESTAMP Timestamp the oom_adj score of the process changed
dur DURATION Duration until the next oom_adj score change of the process.
score LONG oom_adj score of the process.
bucket STRING oom_adj bucket of the process.
upid JOINID(process.id) Upid of the process having an oom_adj update.
process_name STRING Name of the process having an oom_adj update.
oom_adj_id LONG Slice id of the latest oom_adj update in the system_server.
oom_adj_ts TIMESTAMP Timestamp of the latest oom_adj update in the system_server.
oom_adj_dur DURATION Duration of the latest oom_adj update in the system_server.
oom_adj_track_id JOINID(track.id) Track id of the latest oom_adj update in the system_server
oom_adj_thread_name STRING Thread name of the latest oom_adj update in the system_server.
oom_adj_reason STRING Reason for the latest oom_adj update in the system_server.
oom_adj_trigger STRING Trigger for the latest oom_adj update in the system_server.

Functions

android_oom_adj_score_to_bucket_name -> STRING. Converts an oom_adj score Integer to String sample name. One of: cached, background, job, foreground_service, bfgs, foreground and system.

Converts an oom_adj score Integer to String sample name. One of: cached, background, job, foreground_service, bfgs, foreground and system. Returns STRING: Returns the sample bucket based on the oom score.

Argument Type Description
oom_score LONG oom_score value
android_oom_adj_score_to_detailed_bucket_name -> STRING. Converts an oom_adj score Integer to String bucket name. Deprecated: use `android_oom_adj_score_to_bucket_name` instead.

Converts an oom_adj score Integer to String bucket name. Deprecated: use android_oom_adj_score_to_bucket_name instead. Returns STRING: Returns the oom_adj bucket.

Argument Type Description
value LONG oom_adj score.
android_appid LONG android_app id of the process.

android.power_rails

Views/Tables

android_power_rails_counters. Android power rails counters data. For details see: https://perfetto.dev/docs/data-sources/battery-counters#odpm NOTE: Requires dedicated hardware - table is only populated on Pixels.

TABLE Android power rails counters data. For details see: https://perfetto.dev/docs/data-sources/battery-counters#odpm NOTE: Requires dedicated hardware - table is only populated on Pixels.

Column Type Description
id LONG counter.id
ts TIMESTAMP Timestamp of the energy measurement.
dur DURATION Time until the next energy measurement.
power_rail_name STRING Power rail name. Alias of counter_track.name.
raw_power_rail_name STRING Raw power rail name.
energy_since_boot DOUBLE Energy accumulated by this rail since boot in microwatt-seconds (uWs) (AKA micro-joules). Alias of counter.value.
energy_since_boot_at_end DOUBLE Energy accumulated by this rail at next energy measurement in microwatt-seconds (uWs) (AKA micro-joules). Alias of counter.value of the next meaningful (with value change) counter value.
average_power DOUBLE Average power in mW (milliwatts) over between ts and the next energy measurement.
energy_delta DOUBLE The change of energy accumulated by this rails since the last measurement in microwatt-seconds (uWs) (AKA micro-joules).
track_id JOINID(track.id) Power rail track id. Alias of counter_track.id.
value DOUBLE DEPRECATED. Use energy_since_boot instead.

android.process_metadata

Views/Tables

android_process_metadata. Data about packages running on the process.

TABLE

Column Type Description
upid JOINID(process.id) Process upid.
pid LONG Process pid.
process_name STRING Process name.
uid LONG Android app UID.
shared_uid BOOL Whether the UID is shared by multiple packages.
package_name STRING Name of the packages running in this process.
version_code LONG Package version code.
debuggable LONG Whether package is debuggable.

android.screenshots

Views/Tables

android_screenshots. Screenshot slices, used in perfetto UI.

TABLE

Column Type Description
id ID(slice.id) Id of the screenshot slice.
ts TIMESTAMP Slice timestamp.
dur DURATION Slice duration, should be typically 0 since screeenshot slices are of instant type.
name STRING Slice name.

android.services

Views/Tables

android_service_bindings. All service bindings from client app to server app.

TABLE

Column Type Description
client_oom_score LONG OOM score of client process making the binding.
client_process STRING Name of client process making the binding.
client_thread STRING Name of client thread making the binding.
client_pid LONG Pid of client process making the binding.
client_tid LONG Tid of client process making the binding.
client_upid JOINID(process.id) Upid of client process making the binding.
client_utid JOINID(thread.id) Utid of client thread making the binding.
client_ts TIMESTAMP Timestamp the client process made the request.
client_dur DURATION Duration of the client binding request.
server_oom_score LONG OOM score of server process getting bound to.
server_process STRING Name of server process getting bound to
server_thread STRING Name of server thread getting bound to.
server_pid LONG Pid of server process getting bound to.
server_tid LONG Tid of server process getting bound to.
server_upid JOINID(process.id) Upid of server process getting bound to.
server_utid JOINID(thread.id) Utid of server process getting bound to.
server_ts TIMESTAMP Timestamp the server process got bound to.
server_dur DURATION Duration of the server process handling the binding.
token STRING Unique binder identifier for the Service binding.
act STRING Intent action name for the service binding.
cmp STRING Intent component name for the service binding.
flg STRING Intent flag for the service binding.
bind_seq LONG Monotonically increasing id for the service binding.

android.slices

Functions

android_standardize_slice_name -> STRING. Some slice names have params in them

Some slice names have params in them. This functions removes them to make it possible to aggregate by name. Some examples are:

  • Lock/monitor contention slices. The name includes where the lock contention is in the code. That part is removed.
  • DrawFrames/ooFrame. The name also includes the frame number.
  • Apk/oat/dex loading: The name of the apk is removed Returns STRING: Simplified name.
Argument Type Description
name STRING The raw slice name.

android.startup.startup_breakdowns

Views/Tables

android_startup_opinionated_breakdown. Blended thread state and slice breakdown blocking app startups. Each row blames a unique period during an app startup with a reason derived from the slices and thread states on the main thread. Some helpful events to enables are binder transactions, ART, am and view.

TABLE Blended thread state and slice breakdown blocking app startups.

Each row blames a unique period during an app startup with a reason derived from the slices and thread states on the main thread.

Some helpful events to enables are binder transactions, ART, am and view.

Column Type Description
startup_id JOINID(android_startups.startup_id) Startup id.
slice_id JOINID(slice.id) Id of relevant slice blocking startup.
thread_state_id JOINID(thread_state.id) Id of thread_state blocking startup.
ts TIMESTAMP Timestamp of an exclusive interval during the app startup with a single latency reason.
dur DURATION Duration of an exclusive interval during the app startup with a single latency reason.
reason STRING Cause of delay during an exclusive interval of the app startup.

android.startup.startups

Views/Tables

android_startups. All activity startups in the trace by startup id. Populated by different scripts depending on the platform version/contents.

TABLE All activity startups in the trace by startup id. Populated by different scripts depending on the platform version/contents.

Column Type Description
startup_id ID Startup id.
ts TIMESTAMP Timestamp of startup start.
ts_end LONG Timestamp of startup end.
dur DURATION Startup duration.
package STRING Package name.
startup_type STRING Startup type.
android_startup_processes. Maps a startup to the set of processes that handled the activity start. The vast majority of cases should be a single process

TABLE Maps a startup to the set of processes that handled the activity start.

The vast majority of cases should be a single process. However it is possible that the process dies during the activity startup and is respawned.

Column Type Description
startup_id LONG Startup id.
upid JOINID(process.id) Upid of process on which activity started.
pid LONG Pid of process on which activity started.
startup_type STRING Type of the startup.
android_startup_threads. Maps a startup to the set of threads on processes that handled the activity start.

VIEW Maps a startup to the set of threads on processes that handled the activity start.

Column Type Description
startup_id LONG Startup id.
ts TIMESTAMP Timestamp of start.
dur DURATION Duration of startup.
upid JOINID(process.id) Upid of process involved in startup.
pid LONG Pid if process involved in startup.
utid JOINID(thread.id) Utid of the thread.
tid LONG Tid of the thread.
thread_name STRING Name of the thread.
is_main_thread BOOL Thread is a main thread.
android_thread_slices_for_all_startups. All the slices for all startups in trace. Generally, this view should not be used

VIEW All the slices for all startups in trace.

Generally, this view should not be used. Instead, use one of the view functions related to the startup slices which are created from this table.

Column Type Description
startup_ts TIMESTAMP Timestamp of startup.
startup_ts_end LONG Timestamp of startup end.
startup_id LONG Startup id.
utid JOINID(thread.id) UTID of thread with slice.
tid LONG Tid of thread.
thread_name STRING Name of thread.
is_main_thread BOOL Whether it is main thread.
arg_set_id ARGSETID Arg set id.
slice_id JOINID(slice.id) Slice id.
slice_name STRING Name of slice.
slice_ts TIMESTAMP Timestamp of slice start.
slice_dur LONG Slice duration.

Functions

android_sum_dur_for_startup_and_slice -> LONG. Returns duration of startup for slice name. Sums duration of all slices of startup with provided name.

Returns duration of startup for slice name.

Sums duration of all slices of startup with provided name. Returns LONG: Sum of duration.

Argument Type Description
startup_id LONG Startup id.
slice_name STRING Slice name.
android_sum_dur_on_main_thread_for_startup_and_slice -> LONG. Returns duration of startup for slice name on main thread. Sums duration of all slices of startup with provided name only on main thread.

Returns duration of startup for slice name on main thread.

Sums duration of all slices of startup with provided name only on main thread. Returns LONG: Sum of duration.

Argument Type Description
startup_id LONG Startup id.
slice_name STRING Slice name.

Table Functions

android_slices_for_startup_and_slice_name. Given a startup id and GLOB for a slice name, returns matching slices with data.
Argument Type Description
startup_id LONG Startup id.
slice_name STRING Glob of the slice.
Column Type Description
slice_id JOINID(slice.id) Id of the slice.
slice_name STRING Name of the slice.
slice_ts TIMESTAMP Timestamp of start of the slice.
slice_dur DURATION Duration of the slice.
thread_name STRING Name of the thread with the slice.
tid LONG Tid of the thread with the slice.
arg_set_id ARGSETID Arg set id.
android_binder_transaction_slices_for_startup. Returns binder transaction slices for a given startup id with duration over threshold.
Argument Type Description
startup_id LONG Startup id.
threshold DOUBLE Only return slices with duration over threshold.
Column Type Description
id LONG Slice id.
slice_dur DURATION Slice duration.
thread_name STRING Name of the thread with slice.
process STRING Name of the process with slice.
arg_set_id ARGSETID Arg set id.
is_main_thread BOOL Whether is main thread.

android.startup.time_to_display

Views/Tables

android_startup_time_to_display. Startup metric defintions, which focus on the observable time range: TTID - Time To Initial Display * https://developer.android.com/topic/performance/vitals/launch-time#time-initial * end of first RenderThread.DrawFrame - bindApplication TTFD - Time To Full Display * https://developer.android.com/topic/performance/vitals/launch-time#retrieve-TTFD * end of next RT.DrawFrame, after reportFullyDrawn called - bindApplication Googlers: see go/android-performance-metrics-glossary for details.

TABLE Startup metric defintions, which focus on the observable time range: TTID - Time To Initial Display

Column Type Description
startup_id LONG Startup id.
time_to_initial_display LONG Time to initial display (TTID)
time_to_full_display LONG Time to full display (TTFD)
ttid_frame_id LONG android_frames.frame_id of frame for initial display
ttfd_frame_id LONG android_frames.frame_id of frame for full display
upid JOINID(process.id) process.upid of the startup

android.statsd

Views/Tables

android_statsd_atoms. Statsd atoms. A subset of the slice table containing statsd atom instant events.

VIEW Statsd atoms.

A subset of the slice table containing statsd atom instant events.

Column Type Description
id LONG Unique identifier for this slice.
ts TIMESTAMP The timestamp at the start of the slice.
dur DURATION The duration of the slice.
arg_set_id ARGSETID The id of the argument set associated with this slice.
thread_instruction_count LONG The value of the CPU instruction counter at the start of the slice. This column will only be populated if thread instruction collection is enabled with track_event.
thread_instruction_delta LONG The change in value of the CPU instruction counter between the start and end of the slice. This column will only be populated if thread instruction collection is enabled with track_event.
track_id JOINID(track.id) The id of the track this slice is located on.
category STRING The "category" of the slice. If this slice originated with track_event, this column contains the category emitted. Otherwise, it is likely to be null (with limited exceptions).
name STRING The name of the slice. The name describes what was happening during the slice.
depth LONG The depth of the slice in the current stack of slices.
stack_id LONG A unique identifier obtained from the names of all slices in this stack. This is rarely useful and kept around only for legacy reasons.
parent_stack_id LONG The stack_id for the parent of this slice. Rarely useful.
parent_id LONG The id of the parent (i.e. immediate ancestor) slice for this slice.
thread_ts TIMESTAMP The thread timestamp at the start of the slice. This column will only be populated if thread timestamp collection is enabled with track_event.
thread_dur LONG The thread time used by this slice. This column will only be populated if thread timestamp collection is enabled with track_event.

android.suspend

Views/Tables

android_suspend_state. Table of suspended and awake slices. Selects either the minimal or full ftrace source depending on what's available, marks suspended periods, and complements them to give awake periods.

TABLE Table of suspended and awake slices.

Selects either the minimal or full ftrace source depending on what's available, marks suspended periods, and complements them to give awake periods.

Column Type Description
ts TIMESTAMP Timestamp
dur DURATION Duration
power_state STRING 'awake' or 'suspended'

android.winscope.inputmethod

Views/Tables

android_inputmethod_clients. Android inputmethod clients state dumps (from android.inputmethod data source).

VIEW

Column Type Description
id LONG Dump id
ts TIMESTAMP Timestamp when the dump was triggered
arg_set_id ARGSETID Extra args parsed from the proto message
base64_proto STRING Raw proto message encoded in base64
base64_proto_id LONG String id for raw proto message
android_inputmethod_manager_service. Android inputmethod manager service state dumps (from android.inputmethod data source).

VIEW

Column Type Description
id LONG Dump id
ts TIMESTAMP Timestamp when the dump was triggered
arg_set_id ARGSETID Extra args parsed from the proto message
base64_proto STRING Raw proto message encoded in base64
base64_proto_id LONG String id for raw proto message
android_inputmethod_service. Android inputmethod service state dumps (from android.inputmethod data source).

VIEW

Column Type Description
id LONG Dump id
ts TIMESTAMP Timestamp when the dump was triggered
arg_set_id ARGSETID Extra args parsed from the proto message
base64_proto STRING Raw proto message encoded in base64
base64_proto_id LONG String id for raw proto message

android.winscope.viewcapture

Views/Tables

android_viewcapture. Android viewcapture (from android.viewcapture data source).

VIEW

Column Type Description
id LONG Snapshot id
ts TIMESTAMP Timestamp when the snapshot was triggered
arg_set_id ARGSETID Extra args parsed from the proto message
base64_proto STRING Raw proto message encoded in base64
base64_proto_id LONG String id for raw proto message

android.winscope.windowmanager

Views/Tables

android_windowmanager. Android WindowManager (from android.windowmanager data source).

VIEW

Column Type Description
id LONG Snapshot id
ts TIMESTAMP Timestamp when the snapshot was triggered
arg_set_id ARGSETID Extra args parsed from the proto message
base64_proto STRING Raw proto message encoded in base64
base64_proto_id LONG String id for raw proto message

Package: chrome

chrome.android_input

Views/Tables

chrome_deliver_android_input_event. DeliverInputEvent is the third step in the input pipeline. It is responsible for routing the input events within browser process.

TABLE DeliverInputEvent is the third step in the input pipeline. It is responsible for routing the input events within browser process.

Column Type Description
ts TIMESTAMP Timestamp.
dur DURATION Touch move processing duration.
utid LONG Utid.
android_input_id STRING Input id (assigned by the system, used by InputReader and InputDispatcher)
chrome_android_input. Collects information about input reader, input dispatcher and DeliverInputEvent steps for the given Android input id.

TABLE Collects information about input reader, input dispatcher and DeliverInputEvent steps for the given Android input id.

Column Type Description
android_input_id STRING Input id.
input_reader_processing_start_ts TIMESTAMP Input reader step start timestamp.
input_reader_processing_end_ts TIMESTAMP Input reader step end timestamp.
input_reader_utid LONG Input reader step utid.
input_dispatcher_processing_start_ts TIMESTAMP Input dispatcher step start timestamp.
input_dispatcher_processing_end_ts TIMESTAMP Input dispatcher step end timestamp.
input_dispatcher_utid LONG Input dispatcher step utid.
deliver_input_event_start_ts TIMESTAMP DeliverInputEvent step start timestamp.
deliver_input_event_end_ts TIMESTAMP DeliverInputEvent step end timestamp.
deliver_input_event_utid LONG DeliverInputEvent step utid.

chrome.chrome_scrolls

Views/Tables

chrome_scroll_update_input_info. Timestamps and durations for the input-associated (before coalescing inputs into a frame) stages of a scroll.

TABLE Timestamps and durations for the input-associated (before coalescing inputs into a frame) stages of a scroll.

Column Type Description
id LONG Id of the LatencyInfo.Flow slices corresponding to this scroll event.
presented_in_frame_id LONG Id of the frame that this input was presented in. Can be joined with chrome_scroll_update_frame_info.id.
is_presented BOOL Whether this input event was presented.
is_janky BOOL Whether the corresponding frame is janky. This comes directly from perfetto.protos.EventLatency.
is_inertial BOOL Whether the corresponding scroll is inertial (fling). If this is true, "generation" and "touch_move" related timestamps and durations will be null.
is_first_scroll_update_in_scroll BOOL Whether this is the first update in a scroll. First scroll update can never be janky.
is_first_scroll_update_in_frame BOOL Whether this is the first input that was presented in frame presented_in_frame_id.
generation_ts TIMESTAMP Input generation timestamp (from the Android system).
generation_to_browser_main_dur DURATION Duration from input generation to when the browser received the input.
browser_utid LONG Utid for the browser main thread.
touch_move_received_slice_id LONG Slice id for the STEP_SEND_INPUT_EVENT_UI slice for the touch move.
touch_move_received_ts TIMESTAMP Timestamp for the STEP_SEND_INPUT_EVENT_UI slice for the touch move.
touch_move_processing_dur DURATION Duration for processing a TouchMove event.
scroll_update_created_slice_id LONG Slice id for the STEP_SEND_INPUT_EVENT_UI slice for the gesture scroll.
scroll_update_created_ts TIMESTAMP Timestamp for the STEP_SEND_INPUT_EVENT_UI slice for the gesture scroll.
scroll_update_processing_dur DURATION Duration for creating a GestureScrollUpdate from a TouchMove event.
scroll_update_created_end_ts TIMESTAMP End timestamp for the STEP_SEND_INPUT_EVENT_UI slice for the above.
browser_to_compositor_delay_dur DURATION Duration between the browser and compositor dispatch.
compositor_utid LONG Utid for the renderer compositor thread.
compositor_dispatch_slice_id LONG Slice id for the STEP_HANDLE_INPUT_EVENT_IMPL slice.
compositor_dispatch_ts TIMESTAMP Timestamp for the STEP_HANDLE_INPUT_EVENT_IMPL slice or the containing task (if available).
compositor_dispatch_dur DURATION Duration for the compositor dispatch itself.
compositor_dispatch_end_ts TIMESTAMP End timestamp for the STEP_HANDLE_INPUT_EVENT_IMPL slice.
compositor_dispatch_to_coalesced_input_handled_dur DURATION Duration between compositor dispatch and coalescing input.
compositor_coalesced_input_handled_slice_id LONG Slice id for the STEP_DID_HANDLE_INPUT_AND_OVERSCROLL slice.
compositor_coalesced_input_handled_ts TIMESTAMP Timestamp for the STEP_DID_HANDLE_INPUT_AND_OVERSCROLL slice.
compositor_coalesced_input_handled_dur DURATION Duration for the STEP_DID_HANDLE_INPUT_AND_OVERSCROLL slice.
compositor_coalesced_input_handled_end_ts TIMESTAMP End timestamp for the STEP_DID_HANDLE_INPUT_AND_OVERSCROLL slice.
chrome_scroll_update_frame_info. Timestamps and durations for the frame-associated (after coalescing inputs into a frame) stages of a scroll.

TABLE Timestamps and durations for the frame-associated (after coalescing inputs into a frame) stages of a scroll.

Column Type Description
id LONG Id of the LatencyInfo.Flow slices corresponding to this scroll event.
vsync_interval_ms DOUBLE Vsync interval (in milliseconds).
compositor_resample_slice_id LONG Slice id for the STEP_RESAMPLE_SCROLL_EVENTS slice.
compositor_resample_ts TIMESTAMP Timestamp for the STEP_RESAMPLE_SCROLL_EVENTS slice.
compositor_generate_compositor_frame_slice_id LONG Slice id for the STEP_GENERATE_COMPOSITOR_FRAME slice.
compositor_generate_compositor_frame_ts TIMESTAMP Timestamp for the STEP_GENERATE_COMPOSITOR_FRAME slice or the containing task (if available).
compositor_generate_frame_to_submit_frame_dur DURATION Duration between generating and submitting the compositor frame.
compositor_submit_compositor_frame_slice_id LONG Slice id for the STEP_SUBMIT_COMPOSITOR_FRAME slice.
compositor_submit_compositor_frame_ts TIMESTAMP Timestamp for the STEP_SUBMIT_COMPOSITOR_FRAME slice.
compositor_submit_frame_dur DURATION Duration for submitting the compositor frame (to viz).
compositor_submit_compositor_frame_end_ts TIMESTAMP End timestamp for the STEP_SUBMIT_COMPOSITOR_FRAME slice.
compositor_to_viz_delay_dur DURATION Delay when a compositor frame is sent from the renderer to viz.
viz_compositor_utid LONG Utid for the viz compositor thread.
viz_receive_compositor_frame_slice_id LONG Slice id for the STEP_RECEIVE_COMPOSITOR_FRAME slice.
viz_receive_compositor_frame_ts TIMESTAMP Timestamp for the STEP_RECEIVE_COMPOSITOR_FRAME slice or the containing task (if available).
viz_receive_compositor_frame_dur DURATION Duration of the viz work done on receiving the compositor frame.
viz_receive_compositor_frame_end_ts TIMESTAMP End timestamp for the STEP_RECEIVE_COMPOSITOR_FRAME slice.
viz_wait_for_draw_dur DURATION Duration between viz receiving the compositor frame to frame draw.
viz_draw_and_swap_slice_id LONG Slice id for the STEP_DRAW_AND_SWAP slice.
viz_draw_and_swap_ts TIMESTAMP Timestamp for the STEP_DRAW_AND_SWAP slice or the containing task (if available).
viz_draw_and_swap_dur DURATION Duration for the viz drawing/swapping work for this frame.
viz_send_buffer_swap_slice_id LONG Slice id for the STEP_SEND_BUFFER_SWAP slice.
viz_send_buffer_swap_end_ts TIMESTAMP End timestamp for the STEP_SEND_BUFFER_SWAP slice.
viz_to_gpu_delay_dur DURATION Delay between viz work on compositor thread and CompositorGpuThread.
viz_gpu_thread_utid LONG Utid for the viz CompositorGpuThread.
viz_swap_buffers_slice_id LONG Slice id for the STEP_BUFFER_SWAP_POST_SUBMIT slice.
viz_swap_buffers_ts TIMESTAMP Timestamp for the STEP_BUFFER_SWAP_POST_SUBMIT slice or the containing task (if available).
viz_swap_buffers_dur DURATION Duration of frame buffer swapping work on viz.
viz_swap_buffers_end_ts TIMESTAMP End timestamp for the STEP_BUFFER_SWAP_POST_SUBMIT slice.
viz_swap_buffers_to_latch_dur DURATION Duration of EventLatency's BufferReadyToLatch step.
latch_timestamp TIMESTAMP Timestamp for EventLatency's LatchToSwapEnd step.
viz_latch_to_swap_end_dur DURATION Duration of EventLatency's LatchToSwapEnd step.
swap_end_timestamp TIMESTAMP Timestamp for EventLatency's SwapEndToPresentationCompositorFrame step.
swap_end_to_presentation_dur DURATION Duration of EventLatency's SwapEndToPresentationCompositorFrame step.
presentation_timestamp TIMESTAMP Presentation timestamp for the frame.
chrome_scrolls. Defines slices for all of the individual scrolls in a trace based on the LatencyInfo-based scroll definition. NOTE: this view of top level scrolls is based on the LatencyInfo definition of a scroll, which differs subtly from the definition based on EventLatencies. TODO(b/278684408): add support for tracking scrolls across multiple Chrome/ WebView instances

TABLE Defines slices for all of the individual scrolls in a trace based on the LatencyInfo-based scroll definition.

NOTE: this view of top level scrolls is based on the LatencyInfo definition of a scroll, which differs subtly from the definition based on EventLatencies. TODO(b/278684408): add support for tracking scrolls across multiple Chrome/ WebView instances. Currently gesture_scroll_id unique within an instance, but is not unique across multiple instances. Switching to an EventLatency based definition of scrolls should resolve this.

Column Type Description
id LONG The unique identifier of the scroll.
ts TIMESTAMP The start timestamp of the scroll.
dur DURATION The duration of the scroll.
gesture_scroll_begin_ts TIMESTAMP The earliest timestamp of the EventLatency slice of the GESTURE_SCROLL_BEGIN type for the corresponding scroll id.
gesture_scroll_end_ts TIMESTAMP The earliest timestamp of the EventLatency slice of the GESTURE_SCROLL_END type / the latest timestamp of the EventLatency slice of the GESTURE_SCROLL_UPDATE type for the corresponding scroll id.
chrome_scroll_update_info. Timestamps and durations for the critical path stages during scrolling. This table covers both the input-associated (before coalescing inputs into a frame) and frame-associated (after coalescing inputs into a frame) stages of a scroll: ... | +--------------+--------------+ | | V V +-------------------------+ +-------------------------+ | _scroll_update_INPUT_ | | _scroll_update_FRAME_ | | timestamps_and_metadata | | timestamps_and_metadata | +------------+------------+ +------------+------------+ | | V V +-----------------------+ +-----------------------+ | chrome_scroll_update_ | | chrome_scroll_update_ | | INPUT_info | | FRAME_info | +-----------+-----------+ +-----------+-----------+ | | +--------------+--------------+ | V +---------------------------+ | chrome_scroll_update_info | +---------------------------+

TABLE Timestamps and durations for the critical path stages during scrolling. This table covers both the input-associated (before coalescing inputs into a frame) and frame-associated (after coalescing inputs into a frame) stages of a scroll:

... | +--------------+--------------+ | | V V

+-------------------------+ +-------------------------+ | scroll_update_INPUT | | scroll_update_FRAME | | timestamps_and_metadata | | timestamps_and_metadata | +------------+------------+ +------------+------------+ | | V V +-----------------------+ +-----------------------+ | chrome_scroll_update_ | | chrome_scroll_update_ | | INPUT_info | | FRAME_info | +-----------+-----------+ +-----------+-----------+ | | +--------------+--------------+ | V +---------------------------+ | chrome_scroll_update_info | +---------------------------+

Column Type Description
id LONG Id of the LatencyInfo.Flow slices corresponding to this scroll event.
vsync_interval_ms DOUBLE Vsync interval (in milliseconds).
is_presented BOOL Whether this input event was presented.
is_janky BOOL Whether the corresponding frame is janky. This comes directly from perfetto.protos.EventLatency.
is_inertial BOOL Whether the corresponding scroll is inertial (fling). If this is true, "generation" and "touch_move" related timestamps and durations will be null.
is_first_scroll_update_in_scroll BOOL Whether this is the first update in a scroll. First scroll update can never be janky.
is_first_scroll_update_in_frame BOOL Whether this is the first input that was presented in the frame.
generation_ts TIMESTAMP Input generation timestamp (from the Android system).
generation_to_browser_main_dur DURATION Duration from input generation to when the browser received the input.
browser_utid LONG Utid for the browser main thread.
touch_move_received_slice_id LONG Slice id for the STEP_SEND_INPUT_EVENT_UI slice for the touch move.
touch_move_received_ts TIMESTAMP Timestamp for the STEP_SEND_INPUT_EVENT_UI slice for the touch move.
touch_move_processing_dur DURATION Duration for processing a TouchMove event.
scroll_update_created_slice_id LONG Slice id for the STEP_SEND_INPUT_EVENT_UI slice for the gesture scroll.
scroll_update_created_ts TIMESTAMP Timestamp for the STEP_SEND_INPUT_EVENT_UI slice for the gesture scroll.
scroll_update_processing_dur DURATION Duration for creating a GestureScrollUpdate from a TouchMove event.
scroll_update_created_end_ts TIMESTAMP End timestamp for the STEP_SEND_INPUT_EVENT_UI slice for the above.
browser_to_compositor_delay_dur DURATION Duration between the browser and compositor dispatch.
compositor_utid LONG Utid for the renderer compositor thread.
compositor_dispatch_slice_id LONG Slice id for the STEP_HANDLE_INPUT_EVENT_IMPL slice.
compositor_dispatch_ts TIMESTAMP Timestamp for the STEP_HANDLE_INPUT_EVENT_IMPL slice or the containing task (if available).
compositor_dispatch_dur DURATION Duration for the compositor dispatch itself.
compositor_dispatch_end_ts TIMESTAMP End timestamp for the STEP_HANDLE_INPUT_EVENT_IMPL slice.
compositor_dispatch_to_on_begin_frame_delay_dur DURATION Duration between compositor dispatch and input resampling work.
compositor_resample_slice_id LONG Slice id for the STEP_RESAMPLE_SCROLL_EVENTS slice.
compositor_coalesced_input_handled_slice_id LONG Slice id for the STEP_DID_HANDLE_INPUT_AND_OVERSCROLL slice.
compositor_on_begin_frame_ts TIMESTAMP Start timestamp for work done on the input during "OnBeginFrame".
compositor_on_begin_frame_dur DURATION Duration of the "OnBeginFrame" work for this input.
compositor_on_begin_frame_end_ts TIMESTAMP End timestamp for work done on the input during "OnBeginFrame".
compositor_on_begin_frame_to_generation_delay_dur DURATION Delay until the compositor work for generating the frame begins.
compositor_generate_compositor_frame_slice_id LONG Slice id for the STEP_GENERATE_COMPOSITOR_FRAME slice.
compositor_generate_compositor_frame_ts TIMESTAMP Timestamp for the STEP_GENERATE_COMPOSITOR_FRAME slice or the containing task (if available).
compositor_generate_frame_to_submit_frame_dur DURATION Duration between generating and submitting the compositor frame.
compositor_submit_compositor_frame_slice_id LONG Slice id for the STEP_SUBMIT_COMPOSITOR_FRAME slice.
compositor_submit_compositor_frame_ts TIMESTAMP Timestamp for the STEP_SUBMIT_COMPOSITOR_FRAME slice.
compositor_submit_frame_dur DURATION Duration for submitting the compositor frame (to viz).
compositor_submit_compositor_frame_end_ts TIMESTAMP End timestamp for the STEP_SUBMIT_COMPOSITOR_FRAME slice.
compositor_to_viz_delay_dur DURATION Delay when a compositor frame is sent from the renderer to viz.
viz_compositor_utid LONG Utid for the viz compositor thread.
viz_receive_compositor_frame_slice_id LONG Slice id for the STEP_RECEIVE_COMPOSITOR_FRAME slice.
viz_receive_compositor_frame_ts TIMESTAMP Timestamp for the STEP_RECEIVE_COMPOSITOR_FRAME slice or the containing task (if available).
viz_receive_compositor_frame_dur DURATION Duration of the viz work done on receiving the compositor frame.
viz_receive_compositor_frame_end_ts TIMESTAMP End timestamp for the STEP_RECEIVE_COMPOSITOR_FRAME slice.
viz_wait_for_draw_dur DURATION Duration between viz receiving the compositor frame to frame draw.
viz_draw_and_swap_slice_id LONG Slice id for the STEP_DRAW_AND_SWAP slice.
viz_draw_and_swap_ts TIMESTAMP Timestamp for the STEP_DRAW_AND_SWAP slice or the containing task (if available).
viz_draw_and_swap_dur DURATION Duration for the viz drawing/swapping work for this frame.
viz_send_buffer_swap_slice_id LONG Slice id for the STEP_SEND_BUFFER_SWAP slice.
viz_send_buffer_swap_end_ts TIMESTAMP End timestamp for the STEP_SEND_BUFFER_SWAP slice.
viz_to_gpu_delay_dur DURATION Delay between viz work on compositor thread and CompositorGpuThread.
viz_gpu_thread_utid LONG Utid for the viz CompositorGpuThread.
viz_swap_buffers_slice_id LONG Slice id for the STEP_BUFFER_SWAP_POST_SUBMIT slice.
viz_swap_buffers_ts TIMESTAMP Timestamp for the STEP_BUFFER_SWAP_POST_SUBMIT slice or the containing task (if available).
viz_swap_buffers_dur DURATION Duration of frame buffer swapping work on viz.
viz_swap_buffers_end_ts TIMESTAMP End timestamp for the STEP_BUFFER_SWAP_POST_SUBMIT slice.
viz_swap_buffers_to_latch_dur DURATION Duration of EventLatency's BufferReadyToLatch step.
latch_timestamp TIMESTAMP Timestamp for EventLatency's LatchToSwapEnd step.
viz_latch_to_swap_end_dur DURATION Duration of EventLatency's LatchToSwapEnd step.
swap_end_timestamp TIMESTAMP Timestamp for EventLatency's SwapEndToPresentationCompositorFrame step.
swap_end_to_presentation_dur DURATION Duration of EventLatency's SwapEndToPresentationCompositorFrame step.
presentation_timestamp TIMESTAMP Presentation timestamp for the frame.
chrome_scroll_update_info_step_templates. Source of truth for the definition of the stages of a scroll

TABLE Source of truth for the definition of the stages of a scroll. Mainly intended for visualization purposes (e.g. in Chrome Scroll Jank plugin).

Column Type Description
step_name STRING The name of a stage of a scroll.
ts_column_name STRING The name of the column in chrome_scroll_update_info which contains the timestamp of the stage.
dur_column_name STRING The name of the column in chrome_scroll_update_info which contains the duration of the stage. NULL if the stage doesn't have a duration.

chrome.cpu_powerups

Views/Tables

chrome_cpu_power_slice. The CPU power transitions in the trace. Power states are encoded as non-negative integers, with zero representing full-power operation and positive values representing increasingly deep sleep states. On ARM systems, power state 1 represents the WFI (Wait For Interrupt) sleep state that the CPU enters while idle.

VIEW The CPU power transitions in the trace. Power states are encoded as non-negative integers, with zero representing full-power operation and positive values representing increasingly deep sleep states.

On ARM systems, power state 1 represents the WFI (Wait For Interrupt) sleep state that the CPU enters while idle.

Column Type Description
ts TIMESTAMP The timestamp at the start of the slice.
dur DURATION The duration of the slice.
cpu LONG The CPU on which the transition occurred
power_state LONG The power state that the CPU was in at time 'ts' for duration 'dur'.
previous_power_state LONG The power state that the CPU was previously in.
powerup_id LONG A unique ID for the CPU power-up.
chrome_cpu_power_first_sched_slice_after_powerup. The Linux scheduler slices that executed immediately after a CPU power up.

TABLE The Linux scheduler slices that executed immediately after a CPU power up.

Column Type Description
ts TIMESTAMP The timestamp at the start of the slice.
dur DURATION The duration of the slice.
cpu LONG The cpu on which the slice executed.
sched_id LONG Id for the sched_slice table.
utid LONG Unique id for the thread that ran within the slice.
previous_power_state LONG The CPU's power state before this slice.
powerup_id LONG A unique ID for the CPU power-up.
chrome_cpu_power_post_powerup_slice. A table holding the slices that executed within the scheduler slice that ran on a CPU immediately after power-up.

TABLE A table holding the slices that executed within the scheduler slice that ran on a CPU immediately after power-up.

Column Type Description
ts TIMESTAMP Timestamp of the resulting slice
dur DURATION Duration of the slice.
cpu LONG The CPU the sched slice ran on.
utid LONG Unique thread id for the slice.
sched_id LONG 'id' field from the sched_slice table.
slice_id LONG Id of the top-level slice for this (sched) slice.
previous_power_state LONG Previous power state.
powerup_id LONG Id of the powerup.
chrome_cpu_power_first_toplevel_slice_after_powerup. The first top-level slice that ran after a CPU power-up.

VIEW

Column Type Description
slice_id LONG ID of the slice in the slice table.
previous_power_state LONG The power state of the CPU prior to power-up.

chrome.event_latency

Views/Tables

chrome_event_latencies. All EventLatency slices.

TABLE

Column Type Description
id LONG Slice Id for the EventLatency scroll event.
name STRING Slice name.
ts TIMESTAMP The start timestamp of the scroll.
dur DURATION The duration of the scroll.
scroll_update_id LONG The id of the scroll update event.
is_presented BOOL Whether this input event was presented.
event_type STRING EventLatency event type.
track_id LONG Perfetto track this slice is found on.
vsync_interval_ms DOUBLE Vsync interval (in milliseconds).
is_janky_scrolled_frame BOOL Whether the corresponding frame is janky.
buffer_available_timestamp LONG Timestamp of the BufferAvailableToBufferReady substage.
buffer_ready_timestamp LONG Timestamp of the BufferReadyToLatch substage.
latch_timestamp LONG Timestamp of the LatchToSwapEnd substage.
swap_end_timestamp LONG Timestamp of the SwapEndToPresentationCompositorFrame substage.
presentation_timestamp LONG Frame presentation timestamp aka the timestamp of the SwapEndToPresentationCompositorFrame substage. TODO(b/341047059): temporarily use LatchToSwapEnd as a workaround if SwapEndToPresentationCompositorFrame is missing due to b/247542163.
chrome_gesture_scroll_events. All scroll-related events (frames) including gesture scroll updates, begins and ends with respective scroll ids and start/end timestamps, regardless of being presented

TABLE All scroll-related events (frames) including gesture scroll updates, begins and ends with respective scroll ids and start/end timestamps, regardless of being presented. This includes pinches that were presented. See b/315761896 for context on pinches.

Column Type Description
id LONG Slice Id for the EventLatency scroll event.
name STRING Slice name.
ts TIMESTAMP The start timestamp of the scroll.
dur DURATION The duration of the scroll.
scroll_update_id LONG The id of the scroll update event.
scroll_id LONG The id of the scroll.
is_presented BOOL Whether this input event was presented.
presentation_timestamp LONG Frame presentation timestamp aka the timestamp of the SwapEndToPresentationCompositorFrame substage. TODO(b/341047059): temporarily use LatchToSwapEnd as a workaround if SwapEndToPresentationCompositorFrame is missing due to b/247542163.
event_type STRING EventLatency event type.
track_id LONG Perfetto track this slice is found on.

Functions

chrome_get_most_recent_scroll_begin_id -> LONG. Extracts scroll id for the EventLatency slice at `ts`.

Returns LONG: The event_latency_id of the EventLatency slice with the type GESTURE_SCROLL_BEGIN that is the closest to ts.

Argument Type Description
ts TIMESTAMP Timestamp of the EventLatency slice to get the scroll id for.

chrome.event_latency_description

Views/Tables

chrome_event_latency_stage_descriptions. Source of truth of the descriptions of EventLatency stages.

TABLE

Column Type Description
name STRING The name of the EventLatency stage.
description STRING A description of the EventLatency stage.

chrome.graphics_pipeline

Views/Tables

chrome_graphics_pipeline_surface_frame_steps. `Graphics.Pipeline` steps corresponding to work done by a Viz client to produce a frame (i.e

TABLE Graphics.Pipeline steps corresponding to work done by a Viz client to produce a frame (i.e. before surface aggregation). Covers steps:

  • STEP_ISSUE_BEGIN_FRAME
  • STEP_RECEIVE_BEGIN_FRAME
  • STEP_GENERATE_RENDER_PASS
  • STEP_GENERATE_COMPOSITOR_FRAME
  • STEP_SUBMIT_COMPOSITOR_FRAME
  • STEP_RECEIVE_COMPOSITOR_FRAME
  • STEP_RECEIVE_BEGIN_FRAME_DISCARD
  • STEP_DID_NOT_PRODUCE_FRAME
  • STEP_DID_NOT_PRODUCE_COMPOSITOR_FRAME
Column Type Description
id LONG Slice Id of the Graphics.Pipeline slice.
ts TIMESTAMP The start timestamp of the slice/step.
dur DURATION The duration of the slice/step.
step STRING Step name of the Graphics.Pipeline slice.
surface_frame_trace_id LONG Id of the graphics pipeline, pre-surface aggregation.
utid LONG Utid of the thread where this slice exists.
task_start_time_ts TIMESTAMP Start time of the parent Chrome scheduler task (if any) of this step.
chrome_graphics_pipeline_display_frame_steps. `Graphics.Pipeline` steps corresponding to work done on creating and presenting one frame during/after surface aggregation

TABLE Graphics.Pipeline steps corresponding to work done on creating and presenting one frame during/after surface aggregation. Covers steps:

  • STEP_DRAW_AND_SWAP
  • STEP_SURFACE_AGGREGATION
  • STEP_SEND_BUFFER_SWAP
  • STEP_BUFFER_SWAP_POST_SUBMIT
  • STEP_FINISH_BUFFER_SWAP
  • STEP_SWAP_BUFFERS_ACK
Column Type Description
id LONG Slice Id of the Graphics.Pipeline slice.
ts TIMESTAMP The start timestamp of the slice/step.
dur DURATION The duration of the slice/step.
step STRING Step name of the Graphics.Pipeline slice.
display_trace_id LONG Id of the graphics pipeline, post-surface aggregation.
utid LONG Utid of the thread where this slice exists.
task_start_time_ts TIMESTAMP Start time of the parent Chrome scheduler task (if any) of this step.
chrome_graphics_pipeline_aggregated_frames. Links surface frames (`chrome_graphics_pipeline_surface_frame_steps`) to the display frame (`chrome_graphics_pipeline_display_frame_steps`) into which they are merged

TABLE Links surface frames (chrome_graphics_pipeline_surface_frame_steps) to the display frame (chrome_graphics_pipeline_display_frame_steps) into which they are merged. In other words, in general, multiple surface_frame_trace_ids will correspond to one display_trace_id.

Column Type Description
surface_frame_trace_id LONG Id of the graphics pipeline, pre-surface aggregation.
display_trace_id LONG Id of the graphics pipeline, post-surface aggregation.
chrome_graphics_pipeline_inputs_to_surface_frames. Links inputs (`chrome_input_pipeline_steps.latency_id`) to the surface frame (`chrome_graphics_pipeline_surface_frame_steps`) to which they correspond. In other words, in general, multiple `latency_id`s will correspond to one `surface_frame_trace_id`.

TABLE Links inputs (chrome_input_pipeline_steps.latency_id) to the surface frame (chrome_graphics_pipeline_surface_frame_steps) to which they correspond. In other words, in general, multiple latency_ids will correspond to one surface_frame_trace_id.

Column Type Description
latency_id LONG Id corresponding to the input pipeline.
surface_frame_trace_id LONG Id of the graphics pipeline, post-surface aggregation.

chrome.histograms

Views/Tables

chrome_histograms. A helper view on top of the histogram events emitted by Chrome. Requires "disabled-by-default-histogram_samples" Chrome category.

TABLE A helper view on top of the histogram events emitted by Chrome. Requires "disabled-by-default-histogram_samples" Chrome category.

Column Type Description
name STRING The name of the histogram.
value LONG The value of the histogram sample.
ts TIMESTAMP Alias of |slice.ts|.
thread_name STRING Thread name.
utid LONG Utid of the thread.
tid LONG Tid of the thread.
process_name STRING Process name.
upid LONG Upid of the process.
pid LONG Pid of the process.

chrome.input

Views/Tables

chrome_inputs. Each row represents one input pipeline.

TABLE

Column Type Description
latency_id LONG Id of this Chrome input pipeline (LatencyInfo).
input_type STRING Input type.
chrome_input_pipeline_steps. Since not all steps have associated input type (but all steps for a given latency id should have the same input type), populate input type for steps where it would be NULL.

TABLE Since not all steps have associated input type (but all steps for a given latency id should have the same input type), populate input type for steps where it would be NULL.

Column Type Description
latency_id LONG Id of this Chrome input pipeline (LatencyInfo).
slice_id LONG Slice id
ts TIMESTAMP The step timestamp.
dur DURATION Step duration.
utid LONG Utid of the thread.
step STRING Step name (ChromeLatencyInfo.step).
input_type STRING Input type.
task_start_time_ts TIMESTAMP Start time of the parent Chrome scheduler task (if any) of this step.
chrome_coalesced_inputs. For each input, if it was coalesced into another input, get the other input's latency id.

TABLE For each input, if it was coalesced into another input, get the other input's latency id.

Column Type Description
coalesced_latency_id LONG The latency_id of the coalesced input.
presented_latency_id LONG The latency_id of the other input that the current input was coalesced into. Guaranteed to be different from coalesced_latency_id.
chrome_touch_move_to_scroll_update. Each scroll update event (except flings) in Chrome starts its life as a touch move event, which is then eventually converted to a scroll update itself. Each of these events is represented by its own LatencyInfo

TABLE Each scroll update event (except flings) in Chrome starts its life as a touch move event, which is then eventually converted to a scroll update itself. Each of these events is represented by its own LatencyInfo. This table contains a mapping between touch move events and scroll update events they were converted into.

Column Type Description
touch_move_latency_id LONG Latency id of the touch move input (LatencyInfo).
scroll_update_latency_id LONG Latency id of the corresponding scroll update input (LatencyInfo).
chrome_dispatch_android_input_event_to_touch_move. Matches Android input id to the corresponding touch move event.

TABLE

Column Type Description
android_input_id STRING Input id (assigned by the system, used by InputReader and InputDispatcher)
touch_move_latency_id LONG Latency id.

chrome.interactions

Views/Tables

chrome_interactions. All critical user interaction events, including type and table with associated metrics.

TABLE All critical user interaction events, including type and table with associated metrics.

Column Type Description
scoped_id LONG Identifier of the interaction; this is not guaranteed to be unique to the table - rather, it is unique within an individual interaction type. Combine with type to get a unique identifier in this table.
type STRING Type of this interaction, which together with scoped_id uniquely identifies this interaction. Also corresponds to a SQL table name containing more details specific to this type of interaction.
name STRING Interaction name - e.g. 'PageLoad', 'Tap', etc. Interactions will have unique metrics stored in other tables.
ts TIMESTAMP Timestamp of the CUI event.
dur DURATION Duration of the CUI event.

chrome.metadata

Functions

chrome_hardware_class -> STRING. Returns hardware class of the device, often use to find device brand and model.

Returns hardware class of the device, often use to find device brand and model. Returns STRING: Hardware class name.

chrome.page_loads

Views/Tables

chrome_page_loads. Chrome page loads, including associated high-level metrics and properties.

TABLE

Column Type Description
id LONG ID of the navigation and Chrome browser process; this combination is unique to every individual navigation.
navigation_id LONG ID of the navigation associated with the page load (i.e. the cross-document navigation in primary main frame which created this page's main document). Also note that navigation_id is specific to a given Chrome browser process, and not globally unique.
navigation_start_ts TIMESTAMP Timestamp of the start of navigation.
fcp LONG Duration between the navigation start and the first contentful paint event (web.dev/fcp).
fcp_ts TIMESTAMP Timestamp of the first contentful paint.
lcp LONG Duration between the navigation start and the largest contentful paint event (web.dev/lcp).
lcp_ts TIMESTAMP Timestamp of the largest contentful paint.
dom_content_loaded_event_ts TIMESTAMP Timestamp of the DomContentLoaded event: https://developer.mozilla.org/en-US/docs/Web/API/Document/DOMContentLoaded_event
load_event_ts TIMESTAMP Timestamp of the window load event: https://developer.mozilla.org/en-US/docs/Web/API/Window/load_event
mark_fully_loaded_ts TIMESTAMP Timestamp of the page self-reporting as fully loaded through the performance.mark('mark_fully_loaded') API.
mark_fully_visible_ts TIMESTAMP Timestamp of the page self-reporting as fully visible through the performance.mark('mark_fully_visible') API.
mark_interactive_ts TIMESTAMP Timestamp of the page self-reporting as fully interactive through the performance.mark('mark_interactive') API.
url STRING URL at the page load event.
browser_upid LONG The unique process id (upid) of the browser process where the page load occurred.

chrome.scroll_interactions

Views/Tables

chrome_scroll_interactions. Top level scroll events, with metrics.

TABLE

Column Type Description
id LONG Unique id for an individual scroll.
name STRING Name of the scroll event.
ts TIMESTAMP Start timestamp of the scroll.
dur DURATION Duration of the scroll.
frame_count LONG The total number of frames in the scroll.
vsync_count LONG The total number of vsyncs in the scroll.
missed_vsync_max LONG The maximum number of vsyncs missed during any and all janks.
missed_vsync_sum LONG The total number of vsyncs missed during any and all janks.
delayed_frame_count LONG The number of delayed frames.
predictor_janky_frame_count LONG The number of frames that are deemed janky to the human eye after Chrome has applied its scroll prediction algorithm.
renderer_upid LONG The process id this event occurred on.

chrome.scroll_jank.predictor_error

Views/Tables

chrome_predictor_error. The scrolling offsets and predictor jank values for the actual (applied) scroll events.

TABLE The scrolling offsets and predictor jank values for the actual (applied) scroll events.

Column Type Description
scroll_id LONG An ID that ties all EventLatencies in a particular scroll. (implementation note: This is the EventLatency TraceId of the GestureScrollbegin).
event_latency_slice_id LONG An ID for this particular EventLatency regardless of it being presented or not.
scroll_update_id LONG An ID that ties this |event_latency_id| with the Trace Id (another event_latency_id) that it was presented with.
present_ts TIMESTAMP Presentation timestamp.
delta_y DOUBLE The delta in raw coordinates between this presented EventLatency and the previous presented frame.
relative_offset_y DOUBLE The pixel offset of this presented EventLatency compared to the initial one.
prev_delta DOUBLE The delta in raw coordinates of the previous scroll update event.
next_delta DOUBLE The delta in raw coordinates of the subsequent scroll update event.
predictor_jank DOUBLE The jank value based on the discrepancy between scroll predictor coordinates and the actual deltas between scroll update events.
delta_threshold DOUBLE The threshold used to determine if jank occurred.

chrome.scroll_jank.scroll_jank_cause_map

Views/Tables

chrome_scroll_jank_cause_descriptions. Source of truth of the descriptions of EventLatency-based scroll jank causes.

TABLE

Column Type Description
event_latency_stage STRING The name of the EventLatency stage.
cause_process STRING The process where the cause of scroll jank occurred.
cause_thread STRING The thread where the cause of scroll jank occurred.
cause_description STRING A description of the cause of scroll jank.
chrome_scroll_jank_causes_with_event_latencies. Combined description of scroll jank cause and associated event latency stage.

VIEW

Column Type Description
name STRING The name of the EventLatency stage.
description STRING Description of the EventLatency stage.
cause_process STRING The process name that may cause scroll jank.
cause_thread STRING The thread name that may cause scroll jank. The thread will be on the cause_process.
cause_description STRING Description of the cause of scroll jank on this process and thread.

chrome.scroll_jank.scroll_jank_cause_utils

Table Functions

chrome_select_scroll_jank_cause_thread. Function to retrieve the thread id of the thread on a particular process if there are any slices during a particular EventLatency slice duration; this upid/thread combination refers to a cause of Scroll Jank.

Function to retrieve the thread id of the thread on a particular process if there are any slices during a particular EventLatency slice duration; this upid/thread combination refers to a cause of Scroll Jank.

Argument Type Description
event_latency_id LONG The slice id of an EventLatency slice.
process_type STRING The process type that the thread is on: one of 'Browser', 'Renderer' or 'GPU'.
thread_name STRING The name of the thread.
Column Type Description
utid JOINID(thread.id) The utid associated with

chrome.scroll_jank.scroll_jank_intervals

Views/Tables

chrome_janky_event_latencies_v3. Selects EventLatency slices that correspond with janks in a scroll

TABLE Selects EventLatency slices that correspond with janks in a scroll. This is based on the V3 version of scroll jank metrics.

Column Type Description
id LONG The slice id.
ts TIMESTAMP The start timestamp of the slice.
dur DURATION The duration of the slice.
track_id LONG The track_id for the slice.
name STRING The name of the slice (EventLatency).
cause_of_jank STRING The stage of EventLatency that the caused the jank.
sub_cause_of_jank STRING The stage of cause_of_jank that caused the jank.
delayed_frame_count LONG How many vsyncs this frame missed its deadline by.
frame_jank_ts TIMESTAMP The start timestamp where frame presentation was delayed.
frame_jank_dur LONG The duration in ms of the delay in frame presentation.
chrome_janky_frame_presentation_intervals. Frame presentation interval is the delta between when the frame was supposed to be presented and when it was actually presented.

VIEW Frame presentation interval is the delta between when the frame was supposed to be presented and when it was actually presented.

Column Type Description
id LONG Unique id.
ts TIMESTAMP The start timestamp of the slice.
dur DURATION The duration of the slice.
delayed_frame_count LONG How many vsyncs this frame missed its deadline by.
cause_of_jank STRING The stage of EventLatency that the caused the jank.
sub_cause_of_jank STRING The stage of cause_of_jank that caused the jank.
event_latency_id LONG The id of the associated event latency in the slice table.
chrome_scroll_stats. Scroll jank frame presentation stats for individual scrolls.

TABLE

Column Type Description
scroll_id LONG Id of the individual scroll.
frame_count LONG The number of frames in the scroll.
missed_vsyncs LONG The number of missed vsyncs in the scroll.
presented_frame_count LONG The number presented frames in the scroll.
janky_frame_count LONG The number of janky frames in the scroll.
janky_frame_percent DOUBLE The % of frames that janked in the scroll.
chrome_scroll_jank_intervals_v3. Defines slices for all of janky scrolling intervals in a trace.

TABLE

Column Type Description
id LONG The unique identifier of the janky interval.
ts TIMESTAMP The start timestamp of the janky interval.
dur DURATION The duration of the janky interval.

chrome.scroll_jank.scroll_jank_v3

Views/Tables

chrome_gesture_scroll_updates. Grabs all gesture updates with respective scroll ids and start/end timestamps, regardless of being presented.

TABLE Grabs all gesture updates with respective scroll ids and start/end timestamps, regardless of being presented.

Column Type Description
ts TIMESTAMP The start timestamp of the scroll.
dur DURATION The duration of the scroll.
id LONG Slice id for the scroll.
scroll_update_id LONG The id of the scroll update event.
scroll_id LONG The id of the scroll.
is_presented BOOL Whether this input event was presented.
presentation_timestamp LONG Frame presentation timestamp aka the timestamp of the SwapEndToPresentationCompositorFrame substage.
event_type STRING EventLatency event type.
chrome_presented_gesture_scrolls. Scroll updates, corresponding to all input events that were converted to a presented scroll update.

TABLE Scroll updates, corresponding to all input events that were converted to a presented scroll update.

Column Type Description
id LONG Minimum slice id for input presented in this frame, the non-presented input.
ts TIMESTAMP The start timestamp for producing the frame.
dur DURATION The duration between producing and presenting the frame.
last_presented_input_ts TIMESTAMP The timestamp of the last input that arrived and got presented in the frame.
scroll_update_id LONG The id of the scroll update event, a unique identifier to the gesture.
scroll_id LONG The id of the ongoing scroll.
presentation_timestamp LONG Frame presentation timestamp.
event_type STRING EventLatency event type.
chrome_scroll_updates_with_deltas. Associate every trace_id with it's perceived delta_y on the screen after prediction.

TABLE Associate every trace_id with it's perceived delta_y on the screen after prediction.

Column Type Description
scroll_update_id LONG The id of the scroll update event.
delta_y DOUBLE The perceived delta_y on the screen post prediction.
chrome_full_frame_view. Obtain the subset of input events that were fully presented.

TABLE

Column Type Description
id LONG ID of the frame.
ts TIMESTAMP Start timestamp of the frame.
last_presented_input_ts TIMESTAMP The timestamp of the last presented input.
scroll_id LONG ID of the associated scroll.
scroll_update_id LONG ID of the associated scroll update.
event_latency_id LONG ID of the associated EventLatency.
dur DURATION Duration of the associated EventLatency.
presentation_timestamp LONG Frame presentation timestamp.
chrome_full_frame_delta_view. Join deltas with EventLatency data.

TABLE

Column Type Description
id LONG ID of the frame.
ts TIMESTAMP Start timestamp of the frame.
scroll_id LONG ID of the associated scroll.
scroll_update_id LONG ID of the associated scroll update.
last_presented_input_ts TIMESTAMP The timestamp of the last presented input.
delta_y DOUBLE The perceived delta_y on the screen post prediction.
event_latency_id LONG ID of the associated EventLatency.
dur DURATION Duration of the associated EventLatency.
presentation_timestamp LONG Frame presentation timestamp.
chrome_merged_frame_view. Group all gestures presented at the same timestamp together in a single row.

TABLE Group all gestures presented at the same timestamp together in a single row.

Column Type Description
id LONG ID of the frame.
max_start_ts TIMESTAMP The timestamp of the last presented input.
min_start_ts TIMESTAMP The earliest frame start timestamp.
scroll_id LONG ID of the associated scroll.
scroll_update_id LONG ID of the associated scroll update.
encapsulated_scroll_ids STRING All scroll updates associated with the frame presentation timestamp.
total_delta DOUBLE Sum of all perceived delta_y values at the frame presentation timestamp.
segregated_delta_y STRING Lists all of the perceived delta_y values at the frame presentation timestamp.
event_latency_id LONG ID of the associated EventLatency.
dur DURATION Maximum duration of the associated EventLatency.
presentation_timestamp LONG Frame presentation timestamp.
chrome_frame_info_with_delay. View contains all chrome presented frames during gesture updates while calculating delay since last presented which usually should equal to |VSYNC_INTERVAL| if no jank is present.

TABLE View contains all chrome presented frames during gesture updates while calculating delay since last presented which usually should equal to |VSYNC_INTERVAL| if no jank is present.

Column Type Description
id LONG gesture scroll slice id.
max_start_ts TIMESTAMP OS timestamp of the last touch move arrival within a frame.
min_start_ts TIMESTAMP OS timestamp of the first touch move arrival within a frame.
scroll_id LONG The scroll which the touch belongs to.
scroll_update_id LONG ID of the associated scroll update.
encapsulated_scroll_ids STRING Trace ids of all frames presented in at this vsync.
total_delta DOUBLE Summation of all delta_y of all gesture scrolls in this frame.
segregated_delta_y STRING All delta y of all gesture scrolls comma separated, summing those gives |total_delta|.
event_latency_id LONG Event latency id of the presented frame.
dur DURATION Duration of the EventLatency.
presentation_timestamp LONG Timestamp at which the frame was shown on the screen.
delay_since_last_frame DOUBLE Time elapsed since the previous frame was presented, usually equals |VSYNC| if no frame drops happened.
delay_since_last_input DOUBLE Difference in OS timestamps of inputs in the current and the previous frame.
prev_event_latency_id LONG The event latency id that will be used as a reference to determine the jank cause.
chrome_vsyncs. Calculate |VSYNC_INTERVAL| as the lowest vsync seen in the trace or the minimum delay between frames larger than zero. TODO(~M130): Remove the lowest vsync since we should always have vsync_interval_ms.

TABLE Calculate |VSYNC_INTERVAL| as the lowest vsync seen in the trace or the minimum delay between frames larger than zero.

TODO(~M130): Remove the lowest vsync since we should always have vsync_interval_ms.

Column Type Description
vsync_interval DOUBLE The lowest delay between frames larger than zero.
chrome_janky_frames_no_cause. Filter the frame view only to frames that had missed vsyncs.

TABLE

Column Type Description
delay_since_last_frame DOUBLE Time elapsed since the previous frame was presented, will be more than |VSYNC| in this view.
event_latency_id LONG Event latency id of the presented frame.
vsync_interval DOUBLE Vsync interval at the time of recording the trace.
hardware_class STRING Device brand and model.
scroll_id LONG The scroll corresponding to this frame.
prev_event_latency_id LONG The event latency id that will be used as a reference to determine the jank cause.
chrome_janky_frames_no_subcause. Janky frame information including the jank cause.

TABLE

Column Type Description
delay_since_last_frame DOUBLE Time elapsed since the previous frame was presented, will be more than |VSYNC| in this view.
event_latency_id LONG Event latency id of the presented frame.
vsync_interval DOUBLE Vsync interval at the time of recording the trace.
hardware_class STRING Device brand and model.
scroll_id LONG The scroll corresponding to this frame.
prev_event_latency_id LONG The event latency id that will be used as a reference to determine the jank cause.
cause_id LONG Id of the slice corresponding to the offending stage.
chrome_janky_frames. Finds all causes of jank for all janky frames, and a cause of sub jank if the cause of jank was GPU related.

TABLE Finds all causes of jank for all janky frames, and a cause of sub jank if the cause of jank was GPU related.

Column Type Description
cause_of_jank STRING The reason the Vsync was missed.
sub_cause_of_jank STRING Further breakdown if the root cause was GPU related.
delay_since_last_frame DOUBLE Time elapsed since the previous frame was presented, will be more than |VSYNC| in this view.
event_latency_id LONG Event latency id of the presented frame.
vsync_interval DOUBLE Vsync interval at the time of recording the trace.
hardware_class STRING Device brand and model.
scroll_id LONG The scroll corresponding to this frame.
chrome_unique_frame_presentation_ts. Counting all unique frame presentation timestamps.

TABLE

Column Type Description
presentation_timestamp LONG The unique frame presentation timestamp.
chrome_janky_frames_percentage. Dividing missed frames over total frames to get janky frame percentage. This represents the v3 scroll jank metrics. Reflects Event.Jank.DelayedFramesPercentage UMA metric.

TABLE Dividing missed frames over total frames to get janky frame percentage. This represents the v3 scroll jank metrics. Reflects Event.Jank.DelayedFramesPercentage UMA metric.

Column Type Description
delayed_frame_percentage DOUBLE The percent of missed frames relative to total frames - aka the percent of janky frames.
chrome_frames_per_scroll. Number of frames and janky frames per scroll.

TABLE

Column Type Description
scroll_id LONG The ID of the scroll.
num_frames LONG The number of frames in the scroll.
num_janky_frames LONG The number of delayed/janky frames.
scroll_jank_percentage DOUBLE The percentage of janky frames relative to total frames.
chrome_causes_per_scroll. Scroll jank causes per scroll.

VIEW

Column Type Description
scroll_id LONG The ID of the scroll.
max_delay_since_last_frame DOUBLE The maximum time a frame was delayed after the presentation of the previous frame.
vsync_interval DOUBLE The expected vsync interval.
scroll_jank_causes BYTES A proto amalgamation of each scroll jank cause including cause name, sub cause and the duration of the delay since the previous frame was presented.

chrome.scroll_jank.scroll_jank_v3_cause

Functions

chrome_get_v3_jank_cause_id -> LONG. Given two slice Ids A and B, find the maximum difference between the durations of it's direct children with matching names for example if slice A has children named (X, Y, Z) with durations of (10, 10, 5) and slice B has children named (X, Y) with durations of (9, 9), the function will return the slice id of the slice named Z that is A's child, as no matching slice named Z was found under B, making 5 - 0 = 5 the maximum delta between both slice's direct children

Given two slice Ids A and B, find the maximum difference between the durations of it's direct children with matching names for example if slice A has children named (X, Y, Z) with durations of (10, 10, 5) and slice B has children named (X, Y) with durations of (9, 9), the function will return the slice id of the slice named Z that is A's child, as no matching slice named Z was found under B, making 5 - 0 = 5 the maximum delta between both slice's direct children Returns LONG: The slice id of the breakdown that has the maximum duration delta.

Argument Type Description
janky_slice_id LONG The slice id of the parent slice that we want to cause among it's children.
prev_slice_id LONG The slice id of the parent slice that's the reference in comparison to |janky_slice_id|.

chrome.scroll_jank.scroll_offsets

Views/Tables

chrome_scroll_input_offsets. The raw coordinates and pixel offsets for all input events which were part of a scroll.

TABLE The raw coordinates and pixel offsets for all input events which were part of a scroll.

Column Type Description
scroll_id LONG An ID that ties all EventLatencies in a particular scroll. (implementation note: This is the EventLatency TraceId of the GestureScrollbegin).
event_latency_slice_id LONG An ID for this particular EventLatency regardless of it being presented or not.
scroll_update_id LONG An ID that ties this |event_latency_id| with the Trace Id (another event_latency_id) that it was presented with.
ts TIMESTAMP Timestamp the of the scroll input event.
delta_y DOUBLE The delta in raw coordinates between this scroll update event and the previous.
relative_offset_y DOUBLE The pixel offset of this scroll update event compared to the initial one.
chrome_presented_scroll_offsets. The scrolling offsets for the actual (applied) scroll events

TABLE The scrolling offsets for the actual (applied) scroll events. These are not necessarily inclusive of all user scroll events, rather those scroll events that are actually processed.

Column Type Description
scroll_id LONG An ID that ties all EventLatencies in a particular scroll. (implementation note: This is the EventLatency TraceId of the GestureScrollbegin).
event_latency_slice_id LONG An ID for this particular EventLatency regardless of it being presented or not.
scroll_update_id LONG An ID that ties this |event_latency_id| with the Trace Id (another event_latency_id) that it was presented with.
ts TIMESTAMP Presentation timestamp.
delta_y DOUBLE The delta in raw coordinates between this scroll update event and the previous.
relative_offset_y DOUBLE The pixel offset of this scroll update event compared to the initial one.

chrome.scroll_jank.utils

Table Functions

chrome_select_long_task_slices. Extract mojo information for the long-task-tracking scenario for specific names

Extract mojo information for the long-task-tracking scenario for specific names. For example, LongTaskTracker slices may have associated IPC metadata, or InterestingTask slices for input may have associated IPC to determine whether the task is fling/etc.

Argument Type Description
name STRING The name of slice.
Column Type Description
interface_name STRING Name of the interface of the IPC call.
ipc_hash LONG Hash of the IPC call.
message_type STRING Message type (e.g. reply).
id LONG The slice id.

chrome.speedometer

Views/Tables

chrome_speedometer_measure. Augmented slices for Speedometer measurements. These are the intervals of time Speedometer uses to compute the final score. There are two intervals that are measured for every test: sync and async

TABLE Augmented slices for Speedometer measurements. These are the intervals of time Speedometer uses to compute the final score. There are two intervals that are measured for every test: sync and async

Column Type Description
ts TIMESTAMP Start timestamp of the measure slice
dur DURATION Duration of the measure slice
name STRING Full measure name
iteration LONG Speedometer iteration the slice belongs to.
suite_name STRING Suite name
test_name STRING Test name
measure_type STRING Type of the measure (sync or async)
chrome_speedometer_iteration. Slice that covers one Speedometer iteration. Depending on the Speedometer version these slices might need to be estimated as older versions of Speedometer to not emit marks for this interval

TABLE Slice that covers one Speedometer iteration. Depending on the Speedometer version these slices might need to be estimated as older versions of Speedometer to not emit marks for this interval. The metrics associated are the same ones Speedometer would output, but note we use ns precision (Speedometer uses ~100us) so the actual values might differ a bit.

Column Type Description
ts TIMESTAMP Start timestamp of the iteration
dur DURATION Duration of the iteration
name STRING Iteration name
iteration LONG Iteration number
geomean DOUBLE Geometric mean of the suite durations for this iteration.
score DOUBLE Speedometer score for this iteration (The total score for a run in the average of all iteration scores).

Functions

chrome_speedometer_score -> DOUBLE. Returns the Speedometer score for all iterations in the trace

Returns DOUBLE: Speedometer score

chrome_speedometer_renderer_main_utid -> LONG. Returns the utid for the main thread that ran Speedometer 3

Returns LONG: Renderer main utid

chrome.speedometer_2_1

Views/Tables

chrome_speedometer_2_1_measure. Augmented slices for Speedometer measurements. These are the intervals of time Speedometer uses to compute the final score. There are two intervals that are measured for every test: sync and async sync is the time between the start and sync-end marks, async is the time between the sync-end and async-end marks.

TABLE Augmented slices for Speedometer measurements. These are the intervals of time Speedometer uses to compute the final score. There are two intervals that are measured for every test: sync and async sync is the time between the start and sync-end marks, async is the time between the sync-end and async-end marks.

Column Type Description
ts TIMESTAMP Start timestamp of the measure slice
dur DURATION Duration of the measure slice
name STRING Full measure name
iteration LONG Speedometer iteration the slice belongs to.
suite_name STRING Suite name
test_name STRING Test name
measure_type STRING Type of the measure (sync or async)
chrome_speedometer_2_1_iteration. Slice that covers one Speedometer iteration. This slice is actually estimated as a default Speedometer run will not emit marks to cover this interval

TABLE Slice that covers one Speedometer iteration. This slice is actually estimated as a default Speedometer run will not emit marks to cover this interval. The metrics associated are the same ones Speedometer would output, but note we use ns precision (Speedometer uses ~100us) so the actual values might differ a bit. Also note Speedometer returns the values in ms these here and in ns.

Column Type Description
ts TIMESTAMP Start timestamp of the iteration
dur DURATION Duration of the iteration
name STRING Iteration name
iteration LONG Iteration number
geomean DOUBLE Geometric mean of the suite durations for this iteration.
score DOUBLE Speedometer score for this iteration (The total score for a run in the average of all iteration scores).

Functions

chrome_speedometer_2_1_score -> DOUBLE. Returns the Speedometer 2.1 score for all iterations in the trace

Returns DOUBLE: Speedometer 2.1 score

chrome_speedometer_2_1_renderer_main_utid -> LONG. Returns the utid for the main thread that ran Speedometer 2.1

Returns LONG: Renderer main utid

chrome.speedometer_3

Views/Tables

chrome_speedometer_3_measure. Augmented slices for Speedometer measurements. These are the intervals of time Speedometer uses to compute the final score. There are two intervals that are measured for every test: sync and async.

TABLE Augmented slices for Speedometer measurements. These are the intervals of time Speedometer uses to compute the final score. There are two intervals that are measured for every test: sync and async.

Column Type Description
ts TIMESTAMP Start timestamp of the measure slice
dur DURATION Duration of the measure slice
name STRING Full measure name
iteration LONG Speedometer iteration the slice belongs to.
suite_name STRING Suite name
test_name STRING Test name
measure_type STRING Type of the measure (sync or async)
chrome_speedometer_3_iteration. Slice that covers one Speedometer iteration. The metrics associated are the same ones Speedometer would output, but note we use ns precision (Speedometer uses ~100us) so the actual values might differ a bit.

TABLE Slice that covers one Speedometer iteration. The metrics associated are the same ones Speedometer would output, but note we use ns precision (Speedometer uses ~100us) so the actual values might differ a bit.

Column Type Description
ts TIMESTAMP Start timestamp of the iteration
dur DURATION Duration of the iteration
name STRING Iteration name
iteration LONG Iteration number
geomean DOUBLE Geometric mean of the suite durations for this iteration.
score DOUBLE Speedometer score for this iteration (The total score for a run in the average of all iteration scores).

Functions

chrome_speedometer_3_score -> DOUBLE. Returns the Speedometer 3 score for all iterations in the trace

Returns DOUBLE: Speedometer 3 score

chrome_speedometer_3_renderer_main_utid -> LONG. Returns the utid for the main thread that ran Speedometer 3

Returns LONG: Renderer main utid

chrome.startups

Views/Tables

chrome_startups. Chrome startups, including launch cause.

TABLE

Column Type Description
id LONG Unique ID
activity_id LONG Chrome Activity event id of the launch.
name STRING Name of the launch start event.
startup_begin_ts TIMESTAMP Timestamp that the startup occurred.
first_visible_content_ts TIMESTAMP Timestamp to the first visible content.
launch_cause STRING Launch cause. See Startup.LaunchCauseType in chrome_track_event.proto.
browser_upid LONG Process ID of the Browser where the startup occurred.

chrome.tasks

Views/Tables

chrome_java_views. A list of slices corresponding to operations on interesting (non-generic) Chrome Java views

VIEW A list of slices corresponding to operations on interesting (non-generic) Chrome Java views. The view is considered interested if it's not a system (ContentFrameLayout) or generic library (CompositorViewHolder) views.

TODO(altimin): Add "columns_from slice" annotation. TODO(altimin): convert this to EXTEND_TABLE when it becomes available.

Column Type Description
filtered_name STRING Name of the view.
is_software_screenshot BOOL Whether this slice is a part of non-accelerated capture toolbar screenshot.
is_hardware_screenshot BOOL Whether this slice is a part of accelerated capture toolbar screenshot.
slice_id LONG Slice id.
chrome_scheduler_tasks. A list of tasks executed by Chrome scheduler.

VIEW

Column Type Description
id LONG Slice id.
type STRING Type.
name STRING Name of the task.
ts TIMESTAMP Timestamp.
dur DURATION Duration.
utid LONG Utid of the thread this task run on.
thread_name STRING Name of the thread this task run on.
upid LONG Upid of the process of this task.
process_name STRING Name of the process of this task.
track_id LONG Same as slice.track_id.
category STRING Same as slice.category.
depth LONG Same as slice.depth.
parent_id LONG Same as slice.parent_id.
arg_set_id LONG Same as slice.arg_set_id.
thread_ts TIMESTAMP Same as slice.thread_ts.
thread_dur DURATION Same as slice.thread_dur.
posted_from STRING Source location where the PostTask was called.
chrome_tasks. A list of "Chrome tasks": top-level execution units (e.g

VIEW A list of "Chrome tasks": top-level execution units (e.g. scheduler tasks / IPCs / system callbacks) run by Chrome. For a given thread, the slices corresponding to these tasks will not intersect.

Column Type Description
id LONG Id for the given task, also the id of the slice this task corresponds to.
name STRING Name for the given task.
task_type STRING Type of the task (e.g. "scheduler").
thread_name STRING Thread name.
utid LONG Utid.
process_name STRING Process name.
upid LONG Upid.
ts TIMESTAMP Alias of |slice.ts|.
dur DURATION Alias of |slice.dur|.
track_id LONG Alias of |slice.track_id|.
category STRING Alias of |slice.category|.
arg_set_id LONG Alias of |slice.arg_set_id|.
thread_ts TIMESTAMP Alias of |slice.thread_ts|.
thread_dur DURATION Alias of |slice.thread_dur|.
full_name STRING STRING Legacy alias for |name|.

chrome.vsync_intervals

Views/Tables

chrome_vsync_intervals. A simple table that checks the time between VSync (this can be used to determine if we're refreshing at 90 FPS or 60 FPS). Note: In traces without the "Java" category there will be no VSync TraceEvents and this table will be empty.

TABLE A simple table that checks the time between VSync (this can be used to determine if we're refreshing at 90 FPS or 60 FPS).

Note: In traces without the "Java" category there will be no VSync TraceEvents and this table will be empty.

Column Type Description
slice_id LONG Slice id of the vsync slice.
ts TIMESTAMP Timestamp of the vsync slice.
dur DURATION Duration of the vsync slice.
track_id LONG Track id of the vsync slice.
time_to_next_vsync LONG Duration until next vsync arrives.

Functions

chrome_calculate_avg_vsync_interval -> DOUBLE. Function: compute the average Vysnc interval of the gesture (hopefully this would be either 60 FPS for the whole gesture or 90 FPS but that isnt always the case) on the given time segment. If the trace doesnt contain the VSync TraceEvent we just fall back on assuming its 60 FPS (this is the 1.6e+7 in the COALESCE which corresponds to 16 ms or 60 FPS).

Function: compute the average Vysnc interval of the gesture (hopefully this would be either 60 FPS for the whole gesture or 90 FPS but that isnt always the case) on the given time segment. If the trace doesnt contain the VSync TraceEvent we just fall back on assuming its 60 FPS (this is the 1.6e+7 in the COALESCE which corresponds to 16 ms or 60 FPS). Returns DOUBLE: The average vsync interval on this time segment or 1.6e+7, if trace doesn't contain the VSync TraceEvent.

Argument Type Description
begin_ts TIMESTAMP Interval start time.
end_ts TIMESTAMP Interval end time.

chrome.web_content_interactions

Views/Tables

chrome_web_content_interactions. Chrome web content interactions (InteractionToFirstPaint), including associated high-level metrics and properties. Multiple events may occur for the same interaction; each row in this table represents the primary (longest) event for the interaction. Web content interactions are discrete, as opposed to sustained (e.g. scrolling); and only occur with the web content itself, as opposed to other parts of Chrome (e.g

TABLE Chrome web content interactions (InteractionToFirstPaint), including associated high-level metrics and properties.

Multiple events may occur for the same interaction; each row in this table represents the primary (longest) event for the interaction.

Web content interactions are discrete, as opposed to sustained (e.g. scrolling); and only occur with the web content itself, as opposed to other parts of Chrome (e.g. omnibox). Interaction events include taps, clicks, keyboard input (typing), and drags.

Column Type Description
id LONG Unique id for this interaction.
ts TIMESTAMP Start timestamp of the event. Because multiple events may occur for the same interaction, this is the start timestamp of the longest event.
dur DURATION Duration of the event. Because multiple events may occur for the same interaction, this is the duration of the longest event.
interaction_type STRING The interaction type.
total_duration_ms LONG The total duration of all events that occurred for the same interaction.
renderer_upid LONG The process id this event occurred on.

Package: counters

counters.intervals

Macros

counter_leading_intervals. For a given counter timeline (e.g

For a given counter timeline (e.g. a single counter track), returns intervals of time where the counter has the same value.

Intervals are computed in a "forward-looking" way. That is, if a counter changes value at some timestamp, it's assumed it just reached that value and it should continue to have that value until the next value change. The final value is assumed to hold until the very end of the trace.

For example, suppose we have the following data:

ts=0, value=10, track_id=1 ts=0, value=10, track_id=2 ts=10, value=10, track_id=1 ts=10, value=20, track_id=2 ts=20, value=30, track_id=1 [end of trace at ts = 40]

Then this macro will generate the following intervals:

ts=0, dur=20, value=10, track_id=1 ts=20, dur=10, value=30, track_id=1 ts=0, dur=10, value=10, track_id=2 ts=10, dur=30, value=20, track_id=2

Returns: TableOrSubquery, Table with the schema (id LONG, ts TIMESTAMP, dur DURATION, track_id JOINID(track.id), value DOUBLE, next_value DOUBLE, delta_value DOUBLE).

Argument Type Description
counter_table TableOrSubquery A table/view/subquery corresponding to a "counter-like" table. This table must have the columns "id" and "ts" and "track_id" and "value" corresponding to an id, timestamp, counter track_id and associated counter value.

Package: export

export.to_firefox_profile

Functions

export_to_firefox_profile -> STRING. Dumps all trace data as a Firefox profile json string See `Profile` in https://github.com/firefox-devtools/profiler/blob/main/src/types/profile.js Also https://firefox-source-docs.mozilla.org/tools/profiler/code-overview.html You would probably want to download the generated json and then open at https://https://profiler.firefox.com You can easily do this from the UI via the following SQL `SELECT CAST(export_to_firefox_profile() AS BLOB) AS profile;` The result will have a link for you to download this json as a file.

Dumps all trace data as a Firefox profile json string See Profile in https://github.com/firefox-devtools/profiler/blob/main/src/types/profile.js Also https://firefox-source-docs.mozilla.org/tools/profiler/code-overview.html

You would probably want to download the generated json and then open at https://https://profiler.firefox.com You can easily do this from the UI via the following SQL SELECT CAST(export_to_firefox_profile() AS BLOB) AS profile; The result will have a link for you to download this json as a file. Returns STRING: Json profile

Package: graphs

graphs.dominator_tree

Macros

graph_dominator_tree. Given a table containing a directed flow-graph and an entry node, computes the "dominator tree" for the graph

Given a table containing a directed flow-graph and an entry node, computes the "dominator tree" for the graph. See [1] for an explanation of what a dominator tree is.

[1] https://en.wikipedia.org/wiki/Dominator_(graph_theory)

Example usage on traces containing heap graphs:

CREATE PERFETTO VIEW dominator_compatible_heap_graph AS -- Extract the edges from the heap graph which correspond to references -- between objects. SELECT owner_id AS source_node_id, owned_id as dest_node_id FROM heap_graph_reference JOIN heap_graph_object owner on heap_graph_reference.owner_id = owner.id WHERE owned_id IS NOT NULL AND owner.reachable UNION ALL -- Since a Java heap graph is a "forest" structure, we need to add a dummy -- "root" node which connects all the roots of the forest into a single -- connected component. SELECT (SELECT max(id) + 1 FROM heap_graph_object) as source_node_id, id FROM heap_graph_object WHERE root_type IS NOT NULL; SELECT * FROM graph_dominator_tree!( dominator_compatible_heap_graph, (SELECT max(id) + 1 FROM heap_graph_object) );

Returns: TableOrSubquery, The returned table has the schema (node_id LONG, dominator_node_id LONG). |node_id| is the id of the node from the input graph and |dominator_node_id| is the id of the node in the input flow-graph which is the "dominator" of |node_id|.

Argument Type Description
graph_table TableOrSubquery A table/view/subquery corresponding to a directed flow-graph on which the dominator tree should be computed. This table must have the columns "source_node_id" and "dest_node_id" corresponding to the two nodes on either end of the edges in the graph. Note: the columns must contain uint32 similar to ids in trace processor tables (i.e. the values should be relatively dense and close to zero). The implementation makes assumptions on this for performance reasons and, if this criteria is not, can lead to enormous amounts of memory being allocated. Note: this means that the graph must be a single fully connected component with |root_node_id| (see below) being the "entry node" for this component. Specifically, all nodes must be reachable by following paths from the root node. Failing to adhere to this property will result in undefined behaviour. If working with a "forest"-like structure, a dummy node should be added which links all the roots of the forest together into a single component; an example of this can be found in the heap graph example query above.
root_node_id Expr The entry node to |graph_table| which will be the root of the dominator tree.

graphs.partition

Macros

tree_structural_partition_by_group. Partitions a tree into a forest of trees based on a given grouping key in a structure-preserving way. Specifically, for each tree in the output forest, all the nodes in that tree have the same ancestors and descendants as in the original tree *iff* that ancestor/descendent belonged to the same group. Example: Input id | parent_id | group_key ---|-----------|---------- 1 | NULL | 1 2 | 1 | 1 3 | NULL | 2 4 | NULL | 2 5 | 2 | 1 6 | NULL | 3 7 | 4 | 2 8 | 4 | 1 Or as a graph: ``` 1 (1) / 2 (1) / \ 3 (2) 4 (2) / \ 5 (1) 8 (1) / \ 6 (3) 7 (2) ``` Possible output (order of rows is implementation-defined) id | parent_id | group_key ---|-----------|------- 1 | NULL | 1 2 | 1 | 1 3 | NULL | 2 4 | NULL | 2 5 | 2 | 1 6 | NULL | 3 7 | 4 | 2 8 | 2 | 1 Or as a forest: ``` 1 (1) 3 (2) 4 (2) 6 (3) | | 2 (1) 7 (2) / \ 5 (1) 8 (1) ```

Partitions a tree into a forest of trees based on a given grouping key in a structure-preserving way.

Specifically, for each tree in the output forest, all the nodes in that tree have the same ancestors and descendants as in the original tree iff that ancestor/descendent belonged to the same group.

Example: Input

id parent_id group_key
1 NULL 1
2 1 1
3 NULL 2
4 NULL 2
5 2 1
6 NULL 3
7 4 2
8 4 1

Or as a graph:

1 (1) / 2 (1) / \ 3 (2) 4 (2) / \ 5 (1) 8 (1) / \ 6 (3) 7 (2)

Possible output (order of rows is implementation-defined)

id parent_id group_key
1 NULL 1
2 1 1
3 NULL 2
4 NULL 2
5 2 1
6 NULL 3
7 4 2
8 2 1

Or as a forest:

1 (1) 3 (2) 4 (2) 6 (3) | | 2 (1) 7 (2) / \ 5 (1) 8 (1)

Returns: TableOrSubquery, The returned table has the schema (id LONG, parent_id LONG, group_key LONG).

Argument Type Description
tree_table TableOrSubquery A table/view/subquery corresponding to a tree which should be partitioned. This table must have the columns "id", "parent_id" and "group_key". Note: the columns must contain uint32 similar to ids in trace processor tables (i.e. the values should be relatively dense and close to zero). The implementation makes assumptions on this for performance reasons and, if this criteria is not, can lead to enormous amounts of memory being allocated.

graphs.search

Macros

graph_reachable_dfs. Computes the "reachable" set of nodes in a directed graph from a given set of starting nodes by performing a depth-first search on the graph

Computes the "reachable" set of nodes in a directed graph from a given set of starting nodes by performing a depth-first search on the graph. The returned nodes are structured as a tree with parent-child relationships corresponding to the order in which nodes were encountered by the DFS.

While this macro can be used directly by end users (hence being public), it is primarily intended as a lower-level building block upon which higher level functions/macros in the standard library can be built.

Example usage on traces containing heap graphs:

-- Compute the reachable nodes from the first heap root. SELECT * FROM graph_reachable_dfs!( ( SELECT owner_id AS source_node_id, owned_id as dest_node_id FROM heap_graph_reference WHERE owned_id IS NOT NULL ), (SELECT id FROM heap_graph_object WHERE root_type IS NOT NULL) );

Returns: TableOrSubquery, The returned table has the schema (node_id LONG, parent_node_id LONG). |node_id| is the id of the node from the input graph and |parent_node_id| is the id of the node which was the first encountered predecessor in a DFS search of the graph.

Argument Type Description
graph_table TableOrSubquery A table/view/subquery corresponding to a directed graph on which the reachability search should be performed. This table must have the columns "source_node_id" and "dest_node_id" corresponding to the two nodes on either end of the edges in the graph. Note: the columns must contain uint32 similar to ids in trace processor tables (i.e. the values should be relatively dense and close to zero). The implementation makes assumptions on this for performance reasons and, if this criteria is not, can lead to enormous amounts of memory being allocated.
start_nodes TableOrSubquery A table/view/subquery corresponding to the list of start nodes for the BFS. This table must have a single column "node_id".
graph_reachable_bfs. Computes the "reachable" set of nodes in a directed graph from a given starting node by performing a breadth-first search on the graph

Computes the "reachable" set of nodes in a directed graph from a given starting node by performing a breadth-first search on the graph. The returned nodes are structured as a tree with parent-child relationships corresponding to the order in which nodes were encountered by the BFS.

While this macro can be used directly by end users (hence being public), it is primarily intended as a lower-level building block upon which higher level functions/macros in the standard library can be built.

Example usage on traces containing heap graphs:

-- Compute the reachable nodes from all heap roots. SELECT * FROM graph_reachable_bfs!( ( SELECT owner_id AS source_node_id, owned_id as dest_node_id FROM heap_graph_reference WHERE owned_id IS NOT NULL ), (SELECT id FROM heap_graph_object WHERE root_type IS NOT NULL) );

Returns: TableOrSubquery, The returned table has the schema (node_id LONG, parent_node_id LONG). |node_id| is the id of the node from the input graph and |parent_node_id| is the id of the node which was the first encountered predecessor in a BFS search of the graph.

Argument Type Description
graph_table TableOrSubquery A table/view/subquery corresponding to a directed graph on which the reachability search should be performed. This table must have the columns "source_node_id" and "dest_node_id" corresponding to the two nodes on either end of the edges in the graph. Note: the columns must contain uint32 similar to ids in trace processor tables (i.e. the values should be relatively dense and close to zero). The implementation makes assumptions on this for performance reasons and, if this criteria is not, can lead to enormous amounts of memory being allocated.
start_nodes TableOrSubquery A table/view/subquery corresponding to the list of start nodes for the BFS. This table must have a single column "node_id".
graph_next_sibling. Computes the next sibling node in a directed graph

Computes the next sibling node in a directed graph. The next node under a parent node is determined by on the |sort_key|, which should be unique for every node under a parent. The order of the next sibling is undefined if the |sort_key| is not unique.

Example usage:

-- Compute the next sibling: SELECT * FROM graph_next_sibling!( ( SELECT id AS node_id, parent_id AS node_parent_id, ts AS sort_key FROM slice ) );

Returns: TableOrSubquery, The returned table has the schema (node_id LONG, next_node_id LONG). |node_id| is the id of the node from the input graph and |next_node_id| is the id of the node which is its next sibling.

Argument Type Description
graph_table TableOrSubquery A table/view/subquery corresponding to a directed graph for which to find the next sibling. This table must have the columns "node_id", "node_parent_id" and "sort_key".
graph_reachable_weight_bounded_dfs. Computes the "reachable" set of nodes in a directed graph from a set of starting (root) nodes by performing a depth-first search from each root node on the graph. The search is bounded by the sum of edge weights on the path and the root node specifies the max weight (inclusive) allowed before stopping the search. The returned nodes are structured as a tree with parent-child relationships corresponding to the order in which nodes were encountered by the DFS

Computes the "reachable" set of nodes in a directed graph from a set of starting (root) nodes by performing a depth-first search from each root node on the graph. The search is bounded by the sum of edge weights on the path and the root node specifies the max weight (inclusive) allowed before stopping the search. The returned nodes are structured as a tree with parent-child relationships corresponding to the order in which nodes were encountered by the DFS. Each row also has the root node from which where the edge was encountered.

While this macro can be used directly by end users (hence being public), it is primarily intended as a lower-level building block upon which higher level functions/macros in the standard library can be built.

Example usage on traces with sched info:

-- Compute the reachable nodes from a sched wakeup chain INCLUDE PERFETTO MODULE sched.thread_executing_spans; SELECT * FROM graph_reachable_dfs_bounded !( ( SELECT id AS source_node_id, COALESCE(parent_id, id) AS dest_node_id, id - COALESCE(parent_id, id) AS edge_weight FROM _wakeup_chain ), ( SELECT id AS root_node_id, id - COALESCE(prev_id, id) AS root_target_weight FROM _wakeup_chain ));

Returns: TableOrSubquery, The returned table has the schema (root_node_id, node_id LONG, parent_node_id LONG). |root_node_id| is the id of the starting node under which this edge was encountered. |node_id| is the id of the node from the input graph and |parent_node_id| is the id of the node which was the first encountered predecessor in a DFS search of the graph.

Argument Type Description
graph_table TableOrSubquery A table/view/subquery corresponding to a directed graph on which the reachability search should be performed. This table must have the columns "source_node_id" and "dest_node_id" corresponding to the two nodes on either end of the edges in the graph and an "edge_weight" corresponding to the weight of the edge between the node. Note: the columns must contain uint32 similar to ids in trace processor tables (i.e. the values should be relatively dense and close to zero). The implementation makes assumptions on this for performance reasons and, if this criteria is not, can lead to enormous amounts of memory being allocated.
root_table TableOrSubquery A table/view/subquery corresponding to start nodes to |graph_table| which will be the roots of the reachability trees. This table must have the columns "root_node_id" and "root_target_weight" corresponding to the starting node id and the max weight allowed on the tree. Note: the columns must contain uint32 similar to ids in trace processor tables (i.e. the values should be relatively dense and close to zero). The implementation makes assumptions on this for performance reasons and, if this criteria is not, can lead to enormous amounts of memory being allocated.
is_target_weight_floor Expr Whether the target_weight is a floor weight or ceiling weight. If it's floor, the search stops right after we exceed the target weight, and we include the node that pushed just passed the target. If ceiling, the search stops right before the target weight and the node that would have pushed us passed the target is not included.

Package: intervals

intervals.overlap

Macros

intervals_overlap_count. Compute the distribution of the overlap of the given intervals over time. Each interval is a (ts, dur) pair and the overlap represented as a (ts, value) counter, with the value corresponding to the number of intervals that overlap the given timestamp and interval until the next timestamp.

Compute the distribution of the overlap of the given intervals over time.

Each interval is a (ts, dur) pair and the overlap represented as a (ts, value) counter, with the value corresponding to the number of intervals that overlap the given timestamp and interval until the next timestamp. Returns: TableOrSubquery, The returned table has the schema (ts TIMESTAMP, value LONG). |ts| is the timestamp when the number of open segments changed. |value| is the number of open segments.

Argument Type Description
segments TableOrSubquery Table or subquery containing interval data.
ts_column ColumnName Column containing interval starts (usually ts).
dur_column ColumnName Column containing interval durations (usually dur).
intervals_overlap_count_by_group. Compute the distribution of the overlap of the given intervals over time from slices in a same group. Each interval is a (ts, dur, group) triple and the overlap represented as a (ts, value, group) counter, with the value corresponding to the number of intervals that belong to the same group and overlap the given timestamp and interval until the next timestamp.

Compute the distribution of the overlap of the given intervals over time from slices in a same group.

Each interval is a (ts, dur, group) triple and the overlap represented as a (ts, value, group) counter, with the value corresponding to the number of intervals that belong to the same group and overlap the given timestamp and interval until the next timestamp. Returns: TableOrSubquery, The returned table has the schema (ts INT64, value UINT32, group_name) where the type of group_name is the same as that in |segments|. |ts| is the timestamp when the number of open segments changed. |value| is the number of open segments. |group_name| is the name of a group used for the overlap calculation.

Argument Type Description
segments TableOrSubquery Table or subquery containing interval data.
ts_column ColumnName Column containing interval starts (usually ts).
dur_column ColumnName Column containing interval durations (usually dur).
group_column ColumnName Column containing group name for grouping.

Package: linux

linux.block_io

Views/Tables

linux_active_block_io_operations_by_device. View tracking the number of IO operations remaining in the kernel IO queue or a block device

VIEW View tracking the number of IO operations remaining in the kernel IO queue or a block device

Column Type Description
ts LONG timestamp when block_io_start or block_io_done happened
ops_in_queue_or_device LONG the number of IO operations in the kernel queue or the device
dev LONG the device processing the IO operations

Functions

linux_device_major_id -> LONG. Extracts the major id from a device id

Returns LONG: 12 bits major id

Argument Type Description
dev LONG device id (userland dev_t value)
linux_device_minor_id -> LONG. Extracts the minor id from a device id

Returns LONG: 20 bits minor id

Argument Type Description
dev LONG device id (userland dev_t value)

linux.cpu.frequency

Views/Tables

cpu_frequency_counters. Counter information for each frequency change for each CPU

TABLE Counter information for each frequency change for each CPU. Finds each time region where a CPU frequency is constant.

Column Type Description
id LONG Counter id.
track_id JOINID(track.id) Joinable with 'counter_track.id'.
ts TIMESTAMP Starting timestamp of the counter
dur DURATION Duration in which counter is constant and frequency doesn't change.
freq LONG Frequency in kHz of the CPU that corresponds to this counter. NULL if not found or undefined.
ucpu LONG Unique CPU id.
cpu LONG CPU that corresponds to this counter.

linux.cpu.idle

Views/Tables

cpu_idle_counters. Counter information for each idle state change for each CPU

TABLE Counter information for each idle state change for each CPU. Finds each time region where a CPU idle state is constant.

Column Type Description
id LONG Counter id.
track_id JOINID(track.id) Joinable with 'counter_track.id'.
ts TIMESTAMP Starting timestamp of the counter.
dur DURATION Duration in which the counter is contant and idle state doesn't change.
idle LONG Idle state of the CPU that corresponds to this counter. An idle state of -1 is defined to be active state for the CPU, and the larger the integer, the deeper the idle state of the CPU. NULL if not found or undefined.
cpu LONG CPU that corresponds to this counter.

linux.cpu.idle_stats

Views/Tables

cpu_idle_stats. Aggregates cpu idle statistics per core.

TABLE

Column Type Description
cpu LONG CPU core number.
state LONG CPU idle state (C-states).
count LONG The count of entering idle state.
dur DURATION Total CPU core idle state duration.
avg_dur DURATION Average CPU core idle state duration.
idle_percent DOUBLE Idle state percentage of non suspend time (C-states + P-states).

linux.cpu.idle_time_in_state

Views/Tables

cpu_idle_time_in_state_counters. Counter information for sysfs cpuidle states. Tracks the percentage of time spent in each state between two timestamps, by dividing the incremental time spent in one state, by time all CPUS spent in any state.

TABLE Counter information for sysfs cpuidle states. Tracks the percentage of time spent in each state between two timestamps, by dividing the incremental time spent in one state, by time all CPUS spent in any state.

Column Type Description
ts TIMESTAMP Timestamp.
machine_id LONG The machine this residency is calculated for.
state_name STRING State name.
idle_percentage DOUBLE Percentage of time all CPUS spent in this state.
total_residency DOUBLE Incremental time spent in this state (residency), in microseconds.
time_slice LONG Time all CPUS spent in any state, in microseconds.

linux.cpu.utilization.process

Views/Tables

cpu_cycles_per_process. Aggregated CPU statistics for each process.

TABLE

Column Type Description
upid JOINID(process.id) Unique process id
millicycles LONG Sum of CPU millicycles
megacycles LONG Sum of CPU megacycles
runtime LONG Total runtime duration
min_freq LONG Minimum CPU frequency in kHz
max_freq LONG Maximum CPU frequency in kHz
avg_freq LONG Average CPU frequency in kHz

Table Functions

cpu_process_utilization_per_period. Returns a table of process utilization per given period. Utilization is calculated as sum of average utilization of each CPU in each period, which is defined as a multiply of |interval|

Returns a table of process utilization per given period. Utilization is calculated as sum of average utilization of each CPU in each period, which is defined as a multiply of |interval|. For this reason first and last period might have lower then real utilization.

Argument Type Description
interval LONG Length of the period on which utilization should be averaged.
upid JOINID(process.id) Upid of the process.
Column Type Description
ts TIMESTAMP Timestamp of start of a second.
utilization DOUBLE Sum of average utilization over period. Note: as the data is normalized, the values will be in the [0, 1] range.
unnormalized_utilization DOUBLE Sum of average utilization over all CPUs over period. Note: as the data is unnormalized, the values will be in the [0, cpu_count] range.
cpu_process_utilization_per_second. Returns a table of process utilization per second. Utilization is calculated as sum of average utilization of each CPU in each period, which is defined as a multiply of |interval|

Returns a table of process utilization per second. Utilization is calculated as sum of average utilization of each CPU in each period, which is defined as a multiply of |interval|. For this reason first and last period might have lower then real utilization.

Argument Type Description
upid JOINID(process.id) Upid of the process.
Column Type Description
ts TIMESTAMP Timestamp of start of a second.
utilization DOUBLE Sum of average utilization over period. Note: as the data is normalized, the values will be in the [0, 1] range.
unnormalized_utilization DOUBLE Sum of average utilization over all CPUs over period. Note: as the data is unnormalized, the values will be in the [0, cpu_count] range.
cpu_cycles_per_process_in_interval. Aggregated CPU statistics for each process in a provided interval.
Argument Type Description
ts TIMESTAMP Start of the interval.
dur LONG Duration of the interval.
Column Type Description
upid JOINID(process.id) Unique process id.
millicycles LONG Sum of CPU millicycles
megacycles LONG Sum of CPU megacycles
runtime LONG Total runtime duration
min_freq LONG Minimum CPU frequency in kHz
max_freq LONG Maximum CPU frequency in kHz
avg_freq LONG Average CPU frequency in kHz

linux.cpu.utilization.slice

Views/Tables

cpu_cycles_per_thread_slice. CPU cycles per each slice.

TABLE

Column Type Description
id JOINID(slice.id) Id of a slice.
name STRING Name of the slice.
utid JOINID(thread.id) Id of the thread the slice is running on.
thread_name STRING Name of the thread.
upid JOINID(process.id) Id of the process the slice is running on.
process_name STRING Name of the process.
millicycles LONG Sum of CPU millicycles. Null if frequency couldn't be fetched for any period during the runtime of the slice.
megacycles LONG Sum of CPU megacycles. Null if frequency couldn't be fetched for any period during the runtime of the slice.

Table Functions

cpu_cycles_per_thread_slice_in_interval. CPU cycles per each slice in interval.
Argument Type Description
ts TIMESTAMP Start of the interval.
dur DURATION Duration of the interval.
Column Type Description
id JOINID(slice.id) Thread slice.
name STRING Name of the slice.
utid JOINID(thread.id) Thread the slice is running on.
thread_name STRING Name of the thread.
upid JOINID(process.id) Process the slice is running on.
process_name STRING Name of the process.
millicycles LONG Sum of CPU millicycles. Null if frequency couldn't be fetched for any period during the runtime of the slice.
megacycles LONG Sum of CPU megacycles. Null if frequency couldn't be fetched for any period during the runtime of the slice.

linux.cpu.utilization.system

Views/Tables

cpu_utilization_per_second. Table with system utilization per second. Utilization is calculated by sum of average utilization of each CPU every second

TABLE Table with system utilization per second. Utilization is calculated by sum of average utilization of each CPU every second. For this reason first and last second might have lower then real utilization.

Column Type Description
ts TIMESTAMP Timestamp of start of a second.
utilization DOUBLE Sum of average utilization over period. Note: as the data is normalized, the values will be in the [0, 1] range.
unnormalized_utilization DOUBLE Sum of average utilization over all CPUs over period. Note: as the data is unnormalized, the values will be in the [0, cpu_count] range.
cpu_cycles. Aggregated CPU statistics for whole trace

TABLE Aggregated CPU statistics for whole trace. Results in only one row.

Column Type Description
millicycles LONG Sum of CPU millicycles.
megacycles LONG Sum of CPU megacycles.
runtime LONG Total runtime of all threads running on all CPUs.
min_freq LONG Minimum CPU frequency in kHz.
max_freq LONG Maximum CPU frequency in kHz.
avg_freq LONG Average CPU frequency in kHz.
cpu_cycles_per_cpu. Aggregated CPU statistics for each CPU.

TABLE

Column Type Description
ucpu LONG Unique CPU id. Joinable with cpu.id.
cpu LONG The number of the CPU. Might not be the same as ucpu in multi machine cases.
millicycles LONG Sum of CPU millicycles.
megacycles LONG Sum of CPU megacycles.
runtime LONG Total runtime of all threads running on CPU.
min_freq LONG Minimum CPU frequency in kHz.
max_freq LONG Maximum CPU frequency in kHz.
avg_freq LONG Average CPU frequency in kHz.

Table Functions

cpu_utilization_per_period. Returns a table of system utilization per given period. Utilization is calculated as sum of average utilization of each CPU in each period, which is defined as a multiply of |interval|

Returns a table of system utilization per given period. Utilization is calculated as sum of average utilization of each CPU in each period, which is defined as a multiply of |interval|. For this reason first and last period might have lower then real utilization.

Argument Type Description
interval LONG Length of the period on which utilization should be averaged.
Column Type Description
ts TIMESTAMP Timestamp of start of a second.
utilization DOUBLE Sum of average utilization over period. Note: as the data is normalized, the values will be in the [0, 1] range.
unnormalized_utilization DOUBLE Sum of average utilization over all CPUs over period. Note: as the data is unnormalized, the values will be in the [0, cpu_count] range.
cpu_cycles_in_interval. Aggregated CPU statistics in a provided interval

Aggregated CPU statistics in a provided interval. Results in one row.

Argument Type Description
ts TIMESTAMP Start of the interval.
dur LONG Duration of the interval.
Column Type Description
millicycles LONG Sum of CPU millicycles.
megacycles LONG Sum of CPU megacycles.
runtime LONG Total runtime of all threads running on all CPUs.
min_freq LONG Minimum CPU frequency in kHz.
max_freq LONG Maximum CPU frequency in kHz.
avg_freq LONG Average CPU frequency in kHz.
cpu_cycles_per_cpu_in_interval. Aggregated CPU statistics for each CPU in a provided interval.
Argument Type Description
ts TIMESTAMP Start of the interval.
dur LONG Duration of the interval.
Column Type Description
ucpu LONG Unique CPU id. Joinable with cpu.id.
cpu LONG CPU number.
millicycles LONG Sum of CPU millicycles.
megacycles LONG Sum of CPU megacycles.
runtime LONG Total runtime of all threads running on CPU.
min_freq LONG Minimum CPU frequency in kHz.
max_freq LONG Maximum CPU frequency in kHz.
avg_freq LONG Average CPU frequency in kHz.

linux.cpu.utilization.thread

Views/Tables

cpu_cycles_per_thread. Aggregated CPU statistics for each thread.

TABLE

Column Type Description
utid JOINID(thread.id) Thread
millicycles LONG Sum of CPU millicycles
megacycles LONG Sum of CPU megacycles
runtime LONG Total runtime duration
min_freq LONG Minimum CPU frequency in kHz
max_freq LONG Maximum CPU frequency in kHz
avg_freq LONG Average CPU frequency in kHz

Table Functions

cpu_thread_utilization_per_period. Returns a table of thread utilization per given period. Utilization is calculated as sum of average utilization of each CPU in each period, which is defined as a multiply of |interval|

Returns a table of thread utilization per given period. Utilization is calculated as sum of average utilization of each CPU in each period, which is defined as a multiply of |interval|. For this reason first and last period might have lower then real utilization.

Argument Type Description
interval LONG Length of the period on which utilization should be averaged.
utid JOINID(thread.id) Utid of the thread.
Column Type Description
ts TIMESTAMP Timestamp of start of a second.
utilization DOUBLE Sum of average utilization over period. Note: as the data is normalized, the values will be in the [0, 1] range.
unnormalized_utilization DOUBLE Sum of average utilization over all CPUs over period. Note: as the data is unnormalized, the values will be in the [0, cpu_count] range.
cpu_thread_utilization_per_second. Returns a table of thread utilization per second. Utilization is calculated as sum of average utilization of each CPU in each period, which is defined as a multiply of |interval|

Returns a table of thread utilization per second. Utilization is calculated as sum of average utilization of each CPU in each period, which is defined as a multiply of |interval|. For this reason first and last period might have lower then real utilization.

Argument Type Description
utid JOINID(thread.id) Utid of the thread.
Column Type Description
ts TIMESTAMP Timestamp of start of a second.
utilization DOUBLE Sum of average utilization over period. Note: as the data is normalized, the values will be in the [0, 1] range.
unnormalized_utilization DOUBLE Sum of average utilization over all CPUs over period. Note: as the data is unnormalized, the values will be in the [0, cpu_count] range.
cpu_cycles_per_thread_in_interval. Aggregated CPU statistics for each thread in a provided interval.
Argument Type Description
ts TIMESTAMP Start of the interval.
dur LONG Duration of the interval.
Column Type Description
utid JOINID(thread.id) Thread with CPU cycles and frequency statistics.
millicycles LONG Sum of CPU millicycles
megacycles LONG Sum of CPU megacycles
runtime LONG Total runtime duration
min_freq LONG Minimum CPU frequency in kHz
max_freq LONG Maximum CPU frequency in kHz
avg_freq LONG Average CPU frequency in kHz

linux.devfreq

Views/Tables

linux_devfreq_dsu_counter. ARM DSU device frequency counters

TABLE ARM DSU device frequency counters. This table will only be populated on traces collected with "devfreq/devfreq_frequency" ftrace event enabled, and from ARM devices with the DSU (DynamIQ Shared Unit) hardware.

Column Type Description
id LONG Unique identifier for this counter.
ts TIMESTAMP Starting timestamp of the counter.
dur DURATION Duration in which counter is constant and frequency doesn't chamge.
dsu_freq LONG Frequency in kHz of the device that corresponds to the counter.

linux.memory.high_watermark

Views/Tables

memory_rss_high_watermark_per_process. For each process fetches the memory high watermark until or during timestamp.

VIEW For each process fetches the memory high watermark until or during timestamp.

Column Type Description
ts TIMESTAMP Timestamp
dur DURATION Duration
upid JOINID(process.id) Upid of the process
pid LONG Pid of the process
process_name STRING Name of the process
rss_high_watermark LONG Maximum rss value until now

linux.memory.process

Views/Tables

memory_rss_and_swap_per_process. Memory metrics timeline for each process.

VIEW

Column Type Description
ts TIMESTAMP Timestamp
dur DURATION Duration
upid JOINID(process.id) Upid of the process
pid LONG Pid of the process
process_name STRING Name of the process
anon_rss LONG Anon RSS counter value
file_rss LONG File RSS counter value
shmem_rss LONG Shared memory RSS counter value
rss LONG Total RSS value. Sum of anon_rss, file_rss and shmem_rss. Returns value even if one of the values is NULL.
swap LONG Swap counter value
anon_rss_and_swap LONG Sum or anon_rss and swap. Returns value even if one of the values is NULL.
rss_and_swap LONG Sum or rss and swap. Returns value even if one of the values is NULL.

linux.perf.samples

Views/Tables

linux_perf_samples_summary_tree. Table summarising the callstacks captured during all perf samples in the trace. Specifically, this table returns a tree containing all the callstacks seen during the trace with `self_count` equal to the number of samples with that frame as the leaf and `cumulative_count` equal to the number of samples with the frame anywhere in the tree.

TABLE Table summarising the callstacks captured during all perf samples in the trace.

Specifically, this table returns a tree containing all the callstacks seen during the trace with self_count equal to the number of samples with that frame as the leaf and cumulative_count equal to the number of samples with the frame anywhere in the tree.

Column Type Description
id LONG The id of the callstack. A callstack in this context is a unique set of frames up to the root.
parent_id LONG The id of the parent callstack for this callstack.
name STRING The function name of the frame for this callstack.
mapping_name STRING The name of the mapping containing the frame. This can be a native binary, library, JAR or APK.
source_file STRING The name of the file containing the function.
line_number LONG The line number in the file the function is located at.
self_count LONG The number of samples with this function as the leaf frame.
cumulative_count LONG The number of samples with this function appearing anywhere on the callstack.

linux.perf.spe

Views/Tables

linux_perf_spe_record. Contains ARM Statistical Profiling Extension records

VIEW

Column Type Description
ts TIMESTAMP Timestap when the operation was sampled
utid JOINID(thread.id) Thread the operation executed in
exception_level STRING Exception level the instruction was executed in
instruction_frame_id LONG Instruction virtual address
operation STRING Type of operation sampled
data_virtual_address LONG The virtual address accessed by the operation (0 if no memory access was performed)
data_physical_address LONG The physical address accessed by the operation (0 if no memory access was performed)
total_latency LONG Cycle count from the operation being dispatched for issue to the operation being complete.
issue_latency LONG Cycle count from the operation being dispatched for issue to the operation being issued for execution.
translation_latency LONG Cycle count from a virtual address being passed to the MMU for translation to the result of the translation being available.
data_source STRING Where the data returned for a load operation was sourced
exception_gen BOOL Operation generated an exception
retired BOOL Operation architecturally retired
l1d_access BOOL Operation caused a level 1 data cache access
l1d_refill BOOL Operation caused a level 1 data cache refill
tlb_access BOOL Operation caused a TLB access
tlb_refill BOOL Operation caused a TLB refill involving at least one translation table walk
not_taken BOOL Conditional instruction failed its condition code check
mispred BOOL Whether a branch caused a correction to the predicted program flow
llc_access BOOL Operation caused a last level data or unified cache access
llc_refill BOOL Whether the operation could not be completed by the last level data cache (or any above)
remote_access BOOL Operation caused an access to another socket in a multi-socket system
alignment BOOL Operation that incurred additional latency due to the alignment of the address and the size of the data being accessed
tme_transaction BOOL Whether the operation executed in transactional state
sve_partial_pred BOOL SVE or SME operation with at least one false element in the governing predicate(s)
sve_empty_pred BOOL SVE or SME operation with no true element in the governing predicate(s)
l2d_access BOOL Whether a load operation caused a cache access to at least the level 2 data or unified cache
l2d_hit BOOL Whether a load operation accessed and missed the level 2 data or unified cache. Not set for accesses that are satisfied from refilling data of a previous miss
cache_data_modified BOOL Whether a load operation accessed modified data in a cache
recenty_fetched BOOL Wheter a load operation hit a recently fetched line in a cache
data_snooped BOOL Whether a load operation snooped data from a cache outside the cache hierarchy of this core

linux.threads

Views/Tables

linux_kernel_threads. All kernel threads of the trace

TABLE All kernel threads of the trace. As kernel threads are processes, provides also process data.

Column Type Description
upid JOINID(process.id) Upid of kernel thread. Alias of |process.upid|.
utid JOINID(thread.id) Utid of kernel thread. Alias of |thread.utid|.
pid LONG Pid of kernel thread. Alias of |process.pid|.
tid LONG Tid of kernel thread. Alias of |process.pid|.
process_name STRING Name of kernel process. Alias of |process.name|.
thread_name STRING Name of kernel thread. Alias of |thread.name|.
machine_id LONG Machine id of kernel thread. If NULL then it's a single machine trace. Alias of |process.machine_id|.

Package: pixel

pixel.camera

Views/Tables

pixel_camera_frames. Break down camera Camera graph execution slices per node, port group, and frame. This table extracts key identifiers from Camera graph execution slice names and provides timing information for each processing stage.

TABLE Break down camera Camera graph execution slices per node, port group, and frame. This table extracts key identifiers from Camera graph execution slice names and provides timing information for each processing stage.

Column Type Description
id ID(slice.id) Unique identifier for this slice.
ts TIMESTAMP Start timestamp of the slice.
dur DURATION Duration of the slice execution.
track_id JOINID(track.id) Track ID for this slice.
utid JOINID(thread.id) Thread ID (utid) executing this slice.
thread_name STRING Name of the thread executing this slice.
node STRING Name of the processing node in the Camera graph.
port_group STRING Port group name for the node.
frame_number LONG Frame number being processed.
cam_id LONG Camera ID associated with this slice.

Package: pkvm

pkvm.hypervisor

Views/Tables

pkvm_hypervisor_events. Events when CPU entered hypervisor.

VIEW

Column Type Description
slice_id JOINID(slice.id) Id of the corresponding slice in slices table.
cpu LONG CPU that entered hypervisor.
ts TIMESTAMP Timestamp when CPU entered hypervisor.
dur DURATION How much time CPU spent in hypervisor.
reason STRING Reason for entering hypervisor (e.g. host_hcall, host_mem_abort), or NULL if unknown.

Package: sched

sched.latency

Views/Tables

sched_latency_for_running_interval. Scheduling latency of running thread states. For each time the thread was running, returns the duration of the runnable state directly before.

TABLE Scheduling latency of running thread states. For each time the thread was running, returns the duration of the runnable state directly before.

Column Type Description
thread_state_id JOINID(thread_state.id) Running state of the thread.
sched_id JOINID(sched.id) Id of a corresponding slice in a sched table.
utid JOINID(thread.id) Thread with running state.
runnable_latency_id JOINID(thread_state.id) Runnable state before thread is "running". Duration of this thread state is latency_dur. One of thread_state.id.
latency_dur LONG Scheduling latency of thread state. Duration of thread state with runnable_latency_id.

sched.runnable

Views/Tables

sched_previous_runnable_on_thread. Previous runnable slice on the same thread. For each "Running" thread state finds: - previous "Runnable" (or runnable preempted) state. - previous uninterrupted "Runnable" state with a valid waker thread.

TABLE Previous runnable slice on the same thread. For each "Running" thread state finds:

  • previous "Runnable" (or runnable preempted) state.
  • previous uninterrupted "Runnable" state with a valid waker thread.
Column Type Description
id JOINID(thread_state.id) Running thread state
prev_runnable_id JOINID(thread_state.id) Previous runnable thread state.
prev_wakeup_runnable_id JOINID(thread_state.id) Previous runnable thread state with valid waker thread.

sched.states

Functions

sched_state_to_human_readable_string -> STRING. Translates a single-letter scheduling state to a human-readable string.

Returns STRING: Humanly readable string representing the scheduling state of the kernel thread. The individual characters in the string mean the following: R (runnable), S (awaiting a wakeup), D (in an uninterruptible sleep), T (suspended), t (being traced), X (exiting), P (parked), W (waking), I (idle), N (not contributing to the load average), K (wakeable on fatal signals) and Z (zombie, awaiting cleanup).

Argument Type Description
short_name STRING An individual character string representing the scheduling state of the kernel thread at the end of the slice.
sched_state_io_to_human_readable_string -> STRING. Translates a single-letter scheduling state and IO wait information to a human-readable string.

Translates a single-letter scheduling state and IO wait information to a human-readable string. Returns STRING: A human readable string with information about the scheduling state and IO wait.

Argument Type Description
sched_state STRING An individual character string representing the scheduling state of the kernel thread at the end of the slice.
io_wait BOOL A (posssibly NULL) boolean indicating, if the device was in uninterruptible sleep, if it was an IO sleep.

sched.thread_level_parallelism

Views/Tables

sched_runnable_thread_count. The count of runnable threads over time.

TABLE

Column Type Description
ts TIMESTAMP Timestamp when the runnable thread count changed to the current value.
runnable_thread_count LONG Number of runnable threads, covering the range from this timestamp to the next row's timestamp.
sched_uninterruptible_sleep_thread_count. The count of threads in uninterruptible sleep over time.

TABLE

Column Type Description
ts TIMESTAMP Timestamp when the thread count changed to the current value.
uninterruptible_sleep_thread_count LONG Number of threads in uninterrutible sleep, covering the range from this timestamp to the next row's timestamp.
sched_active_cpu_count. The count of active CPUs over time.

TABLE

Column Type Description
ts TIMESTAMP Timestamp when the number of active CPU changed.
active_cpu_count LONG Number of active CPUs, covering the range from this timestamp to the next row's timestamp.

sched.time_in_state

Views/Tables

sched_time_in_state_for_thread. The time a thread spent in each scheduling state during it's lifetime.

TABLE

Column Type Description
utid JOINID(thread.id) Utid of the thread.
total_runtime LONG Total runtime of thread.
state STRING One of the scheduling states of kernel thread.
time_in_state LONG Total time spent in the scheduling state.
percentage_in_state LONG Percentage of time thread spent in scheduling state in [0-100] range.
sched_percentage_of_time_in_state. Summary of time spent by thread in each scheduling state, in percentage ([0, 100] ranges)

TABLE Summary of time spent by thread in each scheduling state, in percentage ([0, 100] ranges). Sum of all states might be smaller than 100, as those values are rounded down.

Column Type Description
utid JOINID(thread.id) Utid of the thread.
running LONG Percentage of time thread spent in running ('Running') state in [0, 100] range.
runnable LONG Percentage of time thread spent in runnable ('R') state in [0, 100] range.
runnable_preempted LONG Percentage of time thread spent in preempted runnable ('R+') state in [0, 100] range.
sleeping LONG Percentage of time thread spent in sleeping ('S') state in [0, 100] range.
uninterruptible_sleep LONG Percentage of time thread spent in uninterruptible sleep ('D') state in [0, 100] range.
other LONG Percentage of time thread spent in other ('T', 't', 'X', 'Z', 'x', 'I', 'K', 'W', 'P', 'N') states in [0, 100] range.

Table Functions

sched_time_in_state_for_thread_in_interval. Time the thread spent each state in a given interval. This function is only designed to run over a small number of intervals (10-100 at most)

Time the thread spent each state in a given interval.

This function is only designed to run over a small number of intervals (10-100 at most). It will be very slow for large sets of intervals.

Specifically for any non-trivial subset of thread slices, prefer using thread_slice_time_in_state in the slices.time_in_state module for this purpose instead.

Argument Type Description
ts TIMESTAMP The start of the interval.
dur DURATION The duration of the interval.
utid JOINID(thread.id) The utid of the thread.
Column Type Description
state STRING The scheduling state (from the thread_state table). Use the sched_state_to_human_readable_string function in the sched package to get full name.
io_wait BOOL A (posssibly NULL) boolean indicating, if the device was in uninterruptible sleep, if it was an IO sleep.
blocked_function LONG If the state is uninterruptible sleep, io_wait indicates if it was an IO sleep. Will be null if state is not uninterruptible sleep or if we cannot tell if it was an IO sleep or not. Only available on Android when sched/sched_blocked_reason ftrace tracepoint is enabled.
dur DURATION The duration of time the threads slice spent for each (state, io_wait, blocked_function) tuple.
sched_time_in_state_and_cpu_for_thread_in_interval. Time the thread spent each state and cpu in a given interval.
Argument Type Description
ts TIMESTAMP The start of the interval.
dur DURATION The duration of the interval.
utid JOINID(thread.id) The utid of the thread.
Column Type Description
state STRING Thread state (from the thread_state table). Use sched_state_to_human_readable_string function to get full name.
io_wait BOOL A (posssibly NULL) boolean indicating, if the device was in uninterruptible sleep, if it was an IO sleep.
cpu LONG Id of the CPU.
blocked_function LONG Some states can specify the blocked function. Usually NULL.
dur DURATION Total time spent with this state, cpu and blocked function.
sched_time_in_state_for_cpu_in_interval. Time spent by CPU in each scheduling state in a provided interval.
Argument Type Description
cpu LONG CPU id.
ts TIMESTAMP Interval start.
dur LONG Interval duration.
Column Type Description
end_state STRING End state. From sched.end_state.
dur LONG Duration in state.

Package: slices

slices.cpu_time

Views/Tables

thread_slice_cpu_time. Time each thread slice spent running on CPU. Requires scheduling data to be available in the trace.

TABLE Time each thread slice spent running on CPU. Requires scheduling data to be available in the trace.

Column Type Description
id JOINID(slice.id) Slice.
name STRING Name of the slice.
utid JOINID(thread.id) Id of the thread the slice is running on.
thread_name STRING Name of the thread.
upid JOINID(process.id) Id of the process the slice is running on.
process_name STRING Name of the process.
cpu_time LONG Duration of the time the slice was running.
thread_slice_cpu_cycles. CPU cycles per each slice.

VIEW

Column Type Description
id JOINID(slice.id) Id of a slice.
name STRING Name of the slice.
utid JOINID(thread.id) Id of the thread the slice is running on.
thread_name STRING Name of the thread.
upid JOINID(process.id) Id of the process the slice is running on.
process_name STRING Name of the process.
millicycles LONG Sum of CPU millicycles. Null if frequency couldn't be fetched for any period during the runtime of the slice.
megacycles LONG Sum of CPU megacycles. Null if frequency couldn't be fetched for any period during the runtime of the slice.

slices.time_in_state

Views/Tables

thread_slice_time_in_state. For each thread slice, returns the sum of the time it spent in various scheduling states. Requires scheduling data to be available in the trace.

TABLE For each thread slice, returns the sum of the time it spent in various scheduling states.

Requires scheduling data to be available in the trace.

Column Type Description
id JOINID(slice.id) Thread slice.
name STRING Name of the slice.
utid JOINID(thread.id) Thread the slice is running on.
thread_name STRING Name of the thread.
upid JOINID(process.id) Id of the process the slice is running on.
process_name STRING Name of the process.
state STRING The scheduling state (from the thread_state table). Use the sched_state_to_human_readable_string function in the sched package to get full name.
io_wait BOOL If the state is uninterruptible sleep, io_wait indicates if it was an IO sleep. Will be null if state is not uninterruptible sleep or if we cannot tell if it was an IO sleep or not. Only available on Android when sched/sched_blocked_reason ftrace tracepoint is enabled.
blocked_function LONG If in uninterruptible sleep (D), the kernel function on which was blocked. Only available on userdebug Android builds when sched/sched_blocked_reason ftrace tracepoint is enabled.
dur DURATION The duration of time the threads slice spent for each (state, io_wait, blocked_function) tuple.

slices.with_context

Views/Tables

thread_slice. All thread slices with data about thread, thread track and process. Where possible, use available view functions which filter this view.

VIEW All thread slices with data about thread, thread track and process. Where possible, use available view functions which filter this view.

Column Type Description
id ID(slice.id) Slice
ts TIMESTAMP Alias for slice.ts.
dur DURATION Alias for slice.dur.
category STRING Alias for slice.category.
name STRING Alias for slice.name.
track_id JOINID(track.id) Alias for slice.track_id.
track_name STRING Alias for thread_track.name.
thread_name STRING Alias for thread.name.
utid JOINID(thread.id) Alias for thread.utid.
tid LONG Alias for thread.tid.
is_main_thread BOOL Alias for thread.is_main_thread.
process_name STRING Alias for process.name.
upid JOINID(process.id) Alias for process.upid.
pid LONG Alias for process.pid.
depth LONG Alias for slice.depth.
parent_id JOINID(slice.id) Alias for slice.parent_id.
arg_set_id ARGSETID Alias for slice.arg_set_id.
thread_ts TIMESTAMP Alias for slice.thread_ts.
thread_dur LONG Alias for slice.thread_dur.
process_slice. All process slices with data about process track and process. Where possible, use available view functions which filter this view.

VIEW All process slices with data about process track and process. Where possible, use available view functions which filter this view.

Column Type Description
id ID(slice.id) Slice
ts TIMESTAMP Alias for slice.ts.
dur DURATION Alias for slice.dur.
category STRING Alias for slice.category.
name STRING Alias for slice.name.
track_id JOINID(track.id) Alias for slice.track_id.
track_name STRING Alias for process_track.name.
process_name STRING Alias for process.name.
upid JOINID(process.id) Alias for process.upid.
pid LONG Alias for process.pid.
depth LONG Alias for slice.depth.
parent_id JOINID(slice.id) Alias for slice.parent_id.
arg_set_id ARGSETID Alias for slice.arg_set_id.
thread_ts TIMESTAMP Alias for slice.thread_ts.
thread_dur LONG Alias for slice.thread_dur.

Package: stacks

stacks.cpu_profiling

Views/Tables

cpu_profiling_samples. Table containing all the timestamped samples of CPU profiling which occurred during the trace. Currently, this table is backed by the following data sources: * Linux perf * macOS instruments * Chrome CPU profiling * Legacy V8 CPU profiling * Profiling data in Gecko traces

TABLE Table containing all the timestamped samples of CPU profiling which occurred during the trace.

Currently, this table is backed by the following data sources:

  • Linux perf
  • macOS instruments
  • Chrome CPU profiling
  • Legacy V8 CPU profiling
  • Profiling data in Gecko traces
Column Type Description
id LONG The id of the sample.
ts TIMESTAMP The timestamp of the sample.
utid JOINID(thread.id) The utid of the thread of the sample, if available.
tid LONG The tid of the sample, if available.
thread_name STRING The thread name of thread of the sample, if available.
ucpu LONG The ucpu of the sample, if available.
cpu LONG The cpu of the sample, if available.
callsite_id LONG The callsite id of the sample.
cpu_profiling_summary_tree. Table summarising the callstacks captured during any CPU profiling which occurred during the trace. Specifically, this table returns a tree containing all the callstacks seen during the trace with `self_count` equal to the number of samples with that frame as the leaf and `cumulative_count` equal to the number of samples with the frame anywhere in the tree. The data sources supported are the same as the `cpu_profiling_samples` table.

TABLE Table summarising the callstacks captured during any CPU profiling which occurred during the trace.

Specifically, this table returns a tree containing all the callstacks seen during the trace with self_count equal to the number of samples with that frame as the leaf and cumulative_count equal to the number of samples with the frame anywhere in the tree.

The data sources supported are the same as the cpu_profiling_samples table.

Column Type Description
id LONG The id of the callstack; by callstack we mean a unique set of frames up to the root frame.
parent_id LONG The id of the parent callstack for this callstack. NULL if this is root.
name STRING The function name of the frame for this callstack.
mapping_name STRING The name of the mapping containing the frame. This can be a native binary, library, JAR or APK.
source_file STRING The name of the file containing the function.
line_number LONG The line number in the file the function is located at.
self_count LONG The number of samples with this function as the leaf frame.
cumulative_count LONG The number of samples with this function appearing anywhere on the callstack.

Package: time

time.conversion

Functions

time_from_ns -> TIMESTAMP. Returns the provided nanosecond duration, which is the default representation of time durations in trace processor

Returns the provided nanosecond duration, which is the default representation of time durations in trace processor. Provided for consistency with other functions. Returns TIMESTAMP: Time duration in nanoseconds.

Argument Type Description
nanos LONG Time duration in nanoseconds.
time_from_us -> LONG. Converts a duration in microseconds to nanoseconds, which is the default representation of time durations in trace processor.

Converts a duration in microseconds to nanoseconds, which is the default representation of time durations in trace processor. Returns LONG: Time duration in nanoseconds.

Argument Type Description
micros LONG Time duration in microseconds.
time_from_ms -> TIMESTAMP. Converts a duration in millseconds to nanoseconds, which is the default representation of time durations in trace processor.

Converts a duration in millseconds to nanoseconds, which is the default representation of time durations in trace processor. Returns TIMESTAMP: Time duration in nanoseconds.

Argument Type Description
millis LONG Time duration in milliseconds.
time_from_s -> TIMESTAMP. Converts a duration in seconds to nanoseconds, which is the default representation of time durations in trace processor.

Converts a duration in seconds to nanoseconds, which is the default representation of time durations in trace processor. Returns TIMESTAMP: Time duration in nanoseconds.

Argument Type Description
seconds LONG Time duration in seconds.
time_from_min -> TIMESTAMP. Converts a duration in minutes to nanoseconds, which is the default representation of time durations in trace processor.

Converts a duration in minutes to nanoseconds, which is the default representation of time durations in trace processor. Returns TIMESTAMP: Time duration in nanoseconds.

Argument Type Description
minutes LONG Time duration in minutes.
time_from_hours -> TIMESTAMP. Converts a duration in hours to nanoseconds, which is the default representation of time durations in trace processor.

Converts a duration in hours to nanoseconds, which is the default representation of time durations in trace processor. Returns TIMESTAMP: Time duration in nanoseconds.

Argument Type Description
hours LONG Time duration in hours.
time_from_days -> LONG. Converts a duration in days to nanoseconds, which is the default representation of time durations in trace processor.

Converts a duration in days to nanoseconds, which is the default representation of time durations in trace processor. Returns LONG: Time duration in nanoseconds.

Argument Type Description
days LONG Time duration in days.
time_to_ns -> LONG. Returns the provided nanosecond duration, which is the default representation of time durations in trace processor

Returns the provided nanosecond duration, which is the default representation of time durations in trace processor. Provided for consistency with other functions. Returns LONG: Time duration in nanoseconds.

Argument Type Description
nanos TIMESTAMP Time duration in nanoseconds.
time_to_us -> LONG. Converts a duration in nanoseconds to microseconds

Converts a duration in nanoseconds to microseconds. Nanoseconds is the default representation of time durations in trace processor. Returns LONG: Time duration in microseconds.

Argument Type Description
nanos TIMESTAMP Time duration in nanoseconds.
time_to_ms -> LONG. Converts a duration in nanoseconds to millseconds

Converts a duration in nanoseconds to millseconds. Nanoseconds is the default representation of time durations in trace processor. Returns LONG: Time duration in milliseconds.

Argument Type Description
nanos TIMESTAMP Time duration in nanoseconds.
time_to_s -> LONG. Converts a duration in nanoseconds to seconds

Converts a duration in nanoseconds to seconds. Nanoseconds is the default representation of time durations in trace processor. Returns LONG: Time duration in seconds.

Argument Type Description
nanos TIMESTAMP Time duration in nanoseconds.
time_to_min -> LONG. Converts a duration in nanoseconds to minutes

Converts a duration in nanoseconds to minutes. Nanoseconds is the default representation of time durations in trace processor. Returns LONG: Time duration in minutes.

Argument Type Description
nanos TIMESTAMP Time duration in nanoseconds.
time_to_hours -> LONG. Converts a duration in nanoseconds to hours

Converts a duration in nanoseconds to hours. Nanoseconds is the default representation of time durations in trace processor. Returns LONG: Time duration in hours.

Argument Type Description
nanos TIMESTAMP Time duration in nanoseconds.
time_to_days -> LONG. Converts a duration in nanoseconds to days

Converts a duration in nanoseconds to days. Nanoseconds is the default representation of time durations in trace processor. Returns LONG: Time duration in days.

Argument Type Description
nanos TIMESTAMP Time duration in nanoseconds.

Package: v8

v8.jit

Views/Tables

v8_isolate. A V8 Isolate instance

VIEW A V8 Isolate instance. A V8 Isolate represents an isolated instance of the V8 engine.

Column Type Description
v8_isolate_id LONG Unique V8 isolate id.
upid JOINID(process.id) Process the isolate was created in.
internal_isolate_id LONG Internal id used by the v8 engine. Unique in a process.
embedded_blob_code_start_address LONG Absolute start address of the embedded code blob.
embedded_blob_code_size LONG Size in bytes of the embedded code blob.
code_range_base_address LONG Base address of the code range if the isolate defines one.
code_range_size LONG Size of a code range if the isolate defines one.
shared_code_range LONG Whether the code range for this Isolate is shared with others in the same process. There is at max one such shared code range per process.
embedded_blob_code_copy_start_address LONG Used when short builtin calls are enabled, where embedded builtins are copied into the CodeRange so calls can be nearer.
v8_js_script. Represents a script that was compiled to generate code

VIEW Represents a script that was compiled to generate code. Some V8 code is generated out of scripts and will reference a V8Script other types of code will not (e.g. builtins).

Column Type Description
v8_js_script_id LONG Unique V8 JS script id.
v8_isolate_id LONG V8 isolate this script belongs to (joinable with v8_isolate.v8_isolate_id).
internal_script_id LONG Script id used by the V8 engine.
script_type STRING Script type.
name STRING Script name.
source STRING Actual contents of the script.
v8_wasm_script. Represents one WASM script.

VIEW

Column Type Description
v8_wasm_script_id LONG Unique V8 WASM script id.
v8_isolate_id LONG V8 Isolate this script belongs to (joinable with v8_isolate.v8_isolate_id).
internal_script_id LONG Script id used by the V8 engine.
url STRING URL of the source.
source STRING Actual contents of the script.
v8_js_function. Represents a v8 Javascript function.

VIEW

Column Type Description
v8_js_function_id LONG Unique V8 JS function id.
name STRING Function name.
v8_js_script_id LONG Script where the function is defined (joinable with v8_js_script.v8_js_script_id).
is_toplevel BOOL Whether this function represents the top level script.
kind STRING Function kind (e.g. regular function or constructor).
line LONG Line in script where function is defined. Starts at 1.
col LONG Column in script where function is defined. Starts at 1.

Package: wattson

wattson.system_state

Views/Tables

wattson_system_states. The final system state for the CPU subsystem, which has all the information needed by Wattson to estimate energy for the CPU subsystem.

TABLE The final system state for the CPU subsystem, which has all the information needed by Wattson to estimate energy for the CPU subsystem.

Column Type Description
ts TIMESTAMP Starting timestamp of the current counter where system state is constant.
dur DURATION Duration of the current counter where system state is constant.
l3_hit_count LONG Number of L3 hits the current system state.
l3_miss_count LONG Number of L3 misses in the current system state.
freq_0 LONG Frequency of CPU0.
idle_0 LONG Idle state of CPU0.
freq_1 LONG Frequency of CPU1.
idle_1 LONG Idle state of CPU1.
freq_2 LONG Frequency of CPU2.
idle_2 LONG Idle state of CPU2.
freq_3 LONG Frequency of CPU3.
idle_3 LONG Idle state of CPU3.
freq_4 LONG Frequency of CPU4.
idle_4 LONG Idle state of CPU4.
freq_5 LONG Frequency of CPU5.
idle_5 LONG Idle state of CPU5.
freq_6 LONG Frequency of CPU6.
idle_6 LONG Idle state of CPU6.
freq_7 LONG Frequency of CPU7.
idle_7 LONG Idle state of CPU7.
suspended BOOL Flag indicating if current system state is suspended.