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;

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

Summary

Views/tables

Name Import Description
thread_slice common.slices All thread slices with data about thread, thread track and process
process_slice common.slices All process slices with data about process track and process
android_anrs android.anrs List of all ANRs that occurred in the trace (one row per ANR)
android_battery_charge android.battery Battery charge at timestamp
android_battery_stats_state android.battery_stats View of human readable battery stats counter-based states
android_battery_stats_event_slices android.battery_stats View of slices derived from battery_stats events
android_binder_metrics_by_process android.binder Count Binder transactions per process
android_sync_binder_metrics_by_txn android.binder Breakdown synchronous binder transactions per txn
android_sync_binder_thread_state_by_txn android.binder Aggregated thread_states on the client and server side per binder txn This builds on the data from
android_sync_binder_blocked_functions_by_txn android.binder Aggregated blocked_functions on the client and server side per binder txn This builds on the data from
android_async_binder_metrics_by_txn android.binder Breakdown asynchronous binder transactions per txn
android_binder_txns android.binder Breakdown asynchronous binder transactions per txn
android_io_f2fs_counter_stats android.io Aggregates f2fs IO and latency stats by counter name
android_io_f2fs_write_stats android.io Aggregates f2fs_write stats by inode and thread
android_io_f2fs_aggregate_write_stats android.io Aggregates f2fs write stats
android_monitor_contention android.monitor_contention Contains parsed monitor contention slices
android_monitor_contention_chain android.monitor_contention Contains parsed monitor contention slices with the parent-child relationships
android_monitor_contention_chain_thread_state android.monitor_contention Note that we only span join the duration where the lock was actually held and contended
android_monitor_contention_chain_thread_state_by_txn android.monitor_contention Aggregated thread_states on the 'blocking thread', the thread holding the lock
android_monitor_contention_chain_blocked_functions_by_txn android.monitor_contention Aggregated blocked_functions on the 'blocking thread', the thread holding the lock
android_network_packets android.network_packets Android network packet events (from android
android_process_metadata android.process_metadata Data about packages running on the process
android_startups android.startup.startups All activity startups in the trace by startup id
android_startup_processes android.startup.startups Maps a startup to the set of processes that handled the activity start
android_startup_threads android.startup.startups Maps a startup to the set of threads on processes that handled the activity start
android_thread_slices_for_all_startups android.startup.startups All the slices for all startups in trace
android_statsd_atoms android.statsd Statsd atoms
chrome_scrolls chrome.chrome_scrolls Defines slices for all of the individual scrolls in a trace based on the LatencyInfo-based scroll definition
chrome_scrolling_intervals chrome.chrome_scrolls Defines slices for all of scrolls intervals in a trace based on the scroll definition in chrome_scrolls
chrome_cpu_power_slice chrome.cpu_powerups The CPU power transitions in the trace
chrome_cpu_power_first_sched_slice_after_powerup chrome.cpu_powerups The Linux scheduler slices that executed immediately after a CPU power up
chrome_cpu_power_post_powerup_slice chrome.cpu_powerups A table holding the slices that executed within the scheduler slice that ran on a CPU immediately after power-up
chrome_cpu_power_first_toplevel_slice_after_powerup chrome.cpu_powerups The first top-level slice that ran after a CPU power-up
chrome_histograms chrome.histograms A helper view on top of the histogram events emitted by Chrome
chrome_janky_event_latencies_v3 chrome.scroll_jank.scroll_jank_intervals Selects EventLatency slices that correspond with janks in a scroll
chrome_janky_frame_presentation_intervals chrome.scroll_jank.scroll_jank_intervals Frame presentation interval is the delta between when the frame was supposed to be presented and when it was actually presented
chrome_scroll_stats chrome.scroll_jank.scroll_jank_intervals Scroll jank frame presentation stats for individual scrolls
chrome_scroll_jank_intervals_v3 chrome.scroll_jank.scroll_jank_intervals Defines slices for all of janky scrolling intervals in a trace
chrome_gesture_scroll_updates chrome.scroll_jank.scroll_jank_v3 Grabs all gesture updates with respective scroll ids and start/end timestamps, regardless of being coalesced
chrome_presented_gesture_scrolls chrome.scroll_jank.scroll_jank_v3 Scroll updates, corresponding to all input events that were converted to a presented scroll update
chrome_scroll_updates_with_deltas chrome.scroll_jank.scroll_jank_v3 Associate every trace_id with it's perceived delta_y on the screen after prediction
chrome_gesture_scroll_event_latencies chrome.scroll_jank.scroll_jank_v3 Extract event latency timestamps, to later use it for joining with gesture scroll updates, as event latencies don't have trace ids associated with it
chrome_full_frame_view chrome.scroll_jank.scroll_jank_v3 Join presented gesture scrolls with their respective event latencies based on
chrome_full_frame_delta_view chrome.scroll_jank.scroll_jank_v3 Join deltas with EventLatency data
chrome_merged_frame_view chrome.scroll_jank.scroll_jank_v3 Group all gestures presented at the same timestamp together in a single row
chrome_frame_info_with_delay chrome.scroll_jank.scroll_jank_v3 View contains all chrome presented frames during gesture updates while calculating delay since last presented which usually should equal to
chrome_vsyncs chrome.scroll_jank.scroll_jank_v3 Calculate
chrome_janky_frames_no_cause chrome.scroll_jank.scroll_jank_v3 Filter the frame view only to frames that had missed vsyncs
chrome_janky_frames_no_subcause chrome.scroll_jank.scroll_jank_v3 Janky frame information including the jank cause
chrome_janky_frames chrome.scroll_jank.scroll_jank_v3 Finds all causes of jank for all janky frames, and a cause of sub jank if the cause of jank was GPU related
chrome_unique_frame_presentation_ts chrome.scroll_jank.scroll_jank_v3 Counting all unique frame presentation timestamps
chrome_janky_frames_percentage chrome.scroll_jank.scroll_jank_v3 Dividing missed frames over total frames to get janky frame percentage
chrome_frames_per_scroll chrome.scroll_jank.scroll_jank_v3 Number of frames and janky frames per scroll
chrome_causes_per_scroll chrome.scroll_jank.scroll_jank_v3 Scroll jank causes per scroll
chrome_speedometer_measure chrome.speedometer Augmented slices for Speedometer measurements
chrome_speedometer_iteration chrome.speedometer Slice that covers one Speedometer iteration
chrome_java_views chrome.tasks A list of slices corresponding to operations on interesting (non-generic) Chrome Java views
chrome_scheduler_tasks chrome.tasks A list of tasks executed by Chrome scheduler
chrome_tasks chrome.tasks A list of "Chrome tasks": top-level execution units (e
chrome_vsync_intervals 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)
pkvm_hypervisor_events pkvm.hypervisor Events when CPU entered hypervisor

Functions

Name Import Return type Description
formatted_arg common.args STRING Returns the formatted value of a given argument
earliest_timestamp_for_counter_track common.counters LONG Timestamp of first counter value in a counter
guess_cpu_size common.cpus STRING Guess size of CPU
extract_int_metadata common.metadata LONG Extracts an int value with the given name from the metadata table
has_parent_slice_with_name common.slices BOOL Checks if slice has an ancestor with provided name
slice_count common.slices INT Count slices with specified name
slice_name_from_id common.slices STRING Given a slice id, returns the name of the slice
is_spans_overlapping common.timestamps BOOL Checks whether two spans are overlapping
spans_overlapping_dur common.timestamps INT Return the overlapping duration between two spans
ns common.timestamps INT Converts a duration in seconds to nanoseconds, which is the default representation of time durations in trace processor
us common.timestamps INT Converts a duration in microseconds to nanoseconds, which is the default representation of time durations in trace processor
ms common.timestamps INT Converts a duration in millseconds to nanoseconds, which is the default representation of time durations in trace processor
seconds common.timestamps INT Converts a duration in seconds to nanoseconds, which is the default representation of time durations in trace processor
minutes common.timestamps INT Converts a duration in minutes to nanoseconds, which is the default representation of time durations in trace processor
hours common.timestamps INT Converts a duration in hours to nanoseconds, which is the default representation of time durations in trace processor
days common.timestamps INT Converts a duration in days to nanoseconds, which is the default representation of time durations in trace processor
android_battery_stats_counter_to_string android.battery_stats STRING Converts a battery_stats counter value to human readable string
android_extract_android_monitor_contention_blocking_thread android.monitor_contention STRING Extracts the blocking thread from a slice name
android_extract_android_monitor_contention_blocking_tid android.monitor_contention INT Extracts the blocking thread tid from a slice name
android_extract_android_monitor_contention_blocking_method android.monitor_contention STRING Extracts the blocking method from a slice name
android_extract_android_monitor_contention_short_blocking_method android.monitor_contention STRING Extracts a shortened form of the blocking method name from a slice name
android_extract_android_monitor_contention_blocked_method android.monitor_contention STRING Extracts the monitor contention blocked method from a slice name
android_extract_android_monitor_contention_short_blocked_method android.monitor_contention STRING Extracts a shortened form of the monitor contention blocked method name from a slice name
android_extract_android_monitor_contention_waiter_count android.monitor_contention INT Extracts the number of waiters on the monitor from a slice name
android_extract_android_monitor_contention_blocking_src android.monitor_contention STRING Extracts the monitor contention blocking source location from a slice name
android_extract_android_monitor_contention_blocked_src android.monitor_contention STRING Extracts the monitor contention blocked source location from a slice name
android_standardize_slice_name android.slices STRING Some slice names have params in them
android_sum_dur_for_startup_and_slice android.startup.startups INT Returns duration of startup for slice name
android_sum_dur_on_main_thread_for_startup_and_slice android.startup.startups INT Returns duration of startup for slice name on main thread

Table Functions

Name Import Description
counter_percentiles_for_time_range common.percentiles All percentiles (range 1-100) for counter track ID in a given time range
counter_percentiles_for_track common.percentiles All percentiles (range 1-100) for counter track ID
android_binder_outgoing_graph android.binder Returns a DAG of all outgoing binder txns from a process
android_binder_incoming_graph android.binder Returns a DAG of all incoming binder txns from a process
android_binder_graph android.binder Returns a graph of all binder txns in a trace
android_monitor_contention_graph android.monitor_contention Returns a DAG of all Java lock contentions in a process

Module: common

common.args

Functions

formatted_arg Returns the formatted value of a given argument. Similar to EXTRACT_ARG, but instead of returning the raw value, it returns the value formatted according to the 'value_type' column (e.g. for booleans, EXTRACT_ARG will return 0 or 1, while FORMATTED_ARG will return 'true' or 'false').

Returns: STRING, Formatted value of the argument.

Argument Type Description
arg_set_id INT Id of the arg set.
key STRING Key of the argument.

common.counters

Functions

earliest_timestamp_for_counter_track Timestamp of first counter value in a counter.

Returns: LONG, Timestamp of first counter value. Null if doesn't exist.

Argument Type Description
counter_track_id INT Id of a counter track with a counter.

common.cpus

Functions

guess_cpu_size Guess size of CPU. On some multicore devices the cores are heterogeneous and divided into two or more 'sizes'. In a typical case a device might have 8 cores of which 4 are 'little' (low power & low performance) and 4 are 'big' (high power & high performance). This functions attempts to map a given CPU index onto the relevant descriptor. For homogeneous systems this returns NULL.

Returns: STRING, A descriptive size ('little', 'mid', 'big', etc) or NULL if we have insufficient information.

Argument Type Description
cpu_index INT Index of the CPU whose size we will guess.

common.metadata

Functions

extract_int_metadata Extracts an int value with the given name from the metadata table.

Returns: LONG, int_value for the given name. NULL if there's no such entry.

Argument Type Description
name STRING The name of the metadata entry.

common.percentiles

Table Functions

counter_percentiles_for_time_range All percentiles (range 1-100) for counter track ID in a given time range. Percentiles are calculated by: 1. Dividing the sum of duration in time range for each value in the counter by duration of the counter in range. This gives us percentile_for)value (DOUBLE). 2. Fetching each percentile by taking floor of each percentile_for_value, grouping by resulting percentile and MIN from value for each grouping. As we are rounding down, taking MIN assures most reliable data. 3. Filling the possible gaps in percentiles by getting the minimal value from higher percentiles for each gap.

Argument Type Description
counter_track_id INT Id of the counter track.
start_ts LONG Timestamp of start of time range.
end_ts LONG Timestamp of end of time range.
Column Description
percentile All of the numbers from 1 to 100.
value Value for the percentile.

counter_percentiles_for_track All percentiles (range 1-100) for counter track ID.

Argument Type Description
counter_track_id INT Id of the counter track.
Column Description
percentile All of the numbers from 1 to 100.
value Value for the percentile.

common.slices

Views/Tables

thread_slice, VIEW

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

Column Description
id Alias for slice.id.
type Alias for slice.type.
ts Alias for slice.ts.
dur Alias for slice.dur.
category Alias for slice.category.
name Alias for slice.name.
track_id Alias for slice.track_id.
track_name Alias for thread_track.name.
thread_name Alias for thread.name.
utid Alias for thread.utid.
tid Alias for thread.tid
process_name Alias for process.name.
upid Alias for process.upid.
pid Alias for process.pid.
depth Alias for slice.depth.
parent_id Alias for slice.parent_id.
arg_set_id Alias for slice.arg_set_id.
thread_ts Alias for slice.thread_ts.
thread_dur Alias for slice.thread_dur.

process_slice, VIEW

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

Column Description
id Alias for slice.id.
type Alias for slice.type.
ts Alias for slice.ts.
dur Alias for slice.dur.
category Alias for slice.category.
name Alias for slice.name.
track_id Alias for slice.track_id.
track_name Alias for process_track.name.
process_name Alias for process.name.
upid Alias for process.upid.
pid Alias for process.pid.
depth Alias for slice.depth.
parent_id Alias for slice.parent_id.
arg_set_id Alias for slice.arg_set_id.
thread_ts Alias for slice.thread_ts.
thread_dur Alias for slice.thread_dur.

Functions

has_parent_slice_with_name Checks if slice has an ancestor with provided name.

Returns: BOOL, Whether parent_name is a name of an ancestor slice.

Argument Type Description
id INT Id of the slice to check parents of.
parent_name STRING Name of potential ancestor slice.

slice_count Count slices with specified name.

Returns: INT, Number of slices with the name.

Argument Type Description
slice_glob STRING Name of the slices to counted.

slice_name_from_id Given a slice id, returns the name of the slice.

Returns: STRING, the name of slice with the given id.

Argument Type Description
id LONG the slice id which we need the name for.

common.timestamps

Functions

is_spans_overlapping Checks whether two spans are overlapping.

Returns: BOOL, Whether two spans are overlapping.

Argument Type Description
ts1 LONG Start of first span.
ts_end1 LONG End of first span.
ts2 LONG Start of second span.
ts_end2 LONG End of second span.

spans_overlapping_dur Return the overlapping duration between two spans. If either duration is less than 0 or there's no intersection, 0 is returned

Returns: INT, Overlapping duration

Argument Type Description
ts1 LONG Timestamp of first slice start.
dur1 LONG Duration of first slice.
ts2 LONG Timestamp of second slice start.
dur2 LONG Duration of second slice.

ns Converts a duration in seconds to nanoseconds, which is the default representation of time durations in trace processor. Provided for consisensy with other functions.

Returns: INT, Time duration in nanoseconds.

Argument Type Description
nanos INT Time duration in seconds.

us Converts a duration in microseconds to nanoseconds, which is the default representation of time durations in trace processor.

Returns: INT, Time duration in nanoseconds.

Argument Type Description
micros INT Time duration in microseconds.

ms Converts a duration in millseconds to nanoseconds, which is the default representation of time durations in trace processor.

Returns: INT, Time duration in nanoseconds.

Argument Type Description
millis INT Time duration in milliseconds.

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

Returns: INT, Time duration in nanoseconds.

Argument Type Description
seconds INT Time duration in seconds.

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

Returns: INT, Time duration in nanoseconds.

Argument Type Description
minutes INT Time duration in minutes.

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

Returns: INT, Time duration in nanoseconds.

Argument Type Description
hours INT Time duration in hours.

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

Returns: INT, Time duration in nanoseconds.

Argument Type Description
days INT Time duration in days.

Module: android

android.anrs

Views/Tables

android_anrs, VIEW

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

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

android.battery

Views/Tables

android_battery_charge, VIEW

Battery charge at timestamp.

Column Description
ts Timestamp.
current_avg_ua Current average micro ampers.
capacity_percent Current capacity percentage.
charge_uah Current charge in micro ampers.
current_ua Current micro ampers.

android.battery_stats

Views/Tables

android_battery_stats_state, 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 Description
ts Timestamp in nanoseconds.
dur The duration the state was active.
track_name The name of the counter track.
value The counter value as a number.
value_name The counter value as a human-readable string.

android_battery_stats_event_slices, 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 Description
track_name The battery stats track name.
ts Timestamp in nanoseconds.
dur The duration of the event.
str_value The string part of the event identifier.
int_value The integer part of the event identifier.

Functions

android_battery_stats_counter_to_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 FLOAT The counter value.

android.binder

Views/Tables

android_binder_metrics_by_process, VIEW

Count Binder transactions per process.

Column Description
process_name Name of the process that started the binder transaction.
pid PID of the process that started the binder transaction.
slice_name Name of the slice with binder transaction.
event_count Number of binder transactions in process in slice.

android_sync_binder_metrics_by_txn, VIEW

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

Column Description
aidl_name name of the binder interface if existing.
binder_txn_id slice id of the binder txn.
client_process name of the client process.
client_thread name of the client thread.
client_upid Upid of the client process.
client_utid Utid of the client thread.
client_tid Tid of the client thread.
client_ts timestamp of the client txn.
client_dur dur of the client txn.
client_oom_score oom score of the client process at the start of the txn.
is_main_thread Whether the txn was initiated from the main thread of the client process.
binder_reply_id slice id of the binder reply.
server_process name of the server process.
server_thread name of the server thread.
server_upid Upid of the server process.
server_utid Utid of the server thread.
server_tid Tid of the server thread.
server_ts timestamp of the server txn.
server_dur dur of the server txn.
server_oom_score oom score of the server process at the start of the reply.

android_sync_binder_thread_state_by_txn, VIEW

Aggregated thread_states on the client and server side per binder txn This builds on the data from |android_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 Description
binder_txn_id slice id of the binder txn
binder_reply_id slice id of the binder reply
thread_state_type whether thread state is on the txn or reply side
thread_state a thread_state that occurred in the txn
thread_state_dur aggregated dur of the
thread_state_count aggregated count of the

android_sync_binder_blocked_functions_by_txn, VIEW

Aggregated blocked_functions on the client and server side per binder txn This builds on the data from |android_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 Description
binder_txn_id slice id of the binder txn
binder_reply_id slice id of the binder reply
thread_state_type whether thread state is on the txn or reply side
blocked_function blocked kernel function in a thread state
blocked_function_dur aggregated dur of the
blocked_function_count aggregated count of the

android_async_binder_metrics_by_txn, VIEW

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

Column Description
aidl_name name of the binder interface if existing.
binder_txn_id slice id of the binder txn.
client_process name of the client process.
client_thread name of the client thread.
client_upid Upid of the client process.
client_utid Utid of the client thread.
client_tid Tid of the client thread.
client_ts timestamp of the client txn.
client_dur dur of the client txn.
client_oom_score oom score of the client process at the start of the txn.
is_main_thread Whether the txn was initiated from the main thread of the client process.
binder_reply_id slice id of the binder reply.
server_process name of the server process.
server_thread name of the server thread.
server_upid Upid of the server process.
server_utid Utid of the server thread.
server_tid Tid of the server thread.
server_ts timestamp of the server txn.
server_dur dur of the server txn.
server_oom_score oom score of the server process at the start of the reply.

android_binder_txns, VIEW

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

Column Description
aidl_name name of the binder interface if existing.
binder_txn_id slice id of the binder txn.
client_process name of the client process.
client_thread name of the client thread.
client_upid Upid of the client process.
client_utid Utid of the client thread.
client_tid Tid of the client thread.
client_ts timestamp of the client txn.
client_dur dur of the client txn.
client_oom_score oom score of the client process at the start of the txn.
is_main_thread Whether the txn was initiated from the main thread of the client process.
binder_reply_id slice id of the binder reply.
server_process name of the server process.
server_thread name of the server thread.
server_upid Upid of the server process.
server_utid Utid of the server thread.
server_tid Tid of the server thread.
server_ts timestamp of the server txn.
server_dur dur of the server txn.
server_oom_score oom score of the server process at the start of the reply.
is_sync whether the txn is synchronous or async (oneway).

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.

Argument Type Description
upid STRING Upid of process to generate an outgoing graph for.
Column 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.

Argument Type Description
upid STRING Upid of process to generate an outgoing graph for.
Column Description
pprof BYTES Pprof of outgoing 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.

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

android.io

Views/Tables

android_io_f2fs_counter_stats, VIEW

Aggregates f2fs IO and latency stats by counter name.

Column Description
counter_name Counter name on which all the other values are aggregated on.
counter_sum Sum of all counter values for the counter name.
counter_max Max of all counter values for the counter name.
counter_min Min of all counter values for the counter name.
counter_dur Duration between the first and last counter value for the counter name.
counter_count Count of all the counter values for the counter name.
counter_avg Avergate of all the counter values for the counter name.

android_io_f2fs_write_stats, VIEW

Aggregates f2fs_write stats by inode and thread.

Column Description
utid Utid of the thread.
tid Tid of the thread.
thread_name Name of the thread.
upid Upid of the process.
pid Pid of the process.
process_name Name of the thread.
ino Inode number of the file being written.
dev Device node number of the file being written.
bytes Total number of bytes written on this file by the
write_count Total count of write requests for this file.

android_io_f2fs_aggregate_write_stats, VIEW

Aggregates f2fs write stats. Counts distinct datapoints, total write operations, and bytes written

Column Description
total_write_count Total number of writes in the trace.
distinct_processes Number of distinct processes.
total_bytes_written Total number of bytes written.
distinct_device_count Count of distinct devices written to.
distict_inode_count Count of distinct inodes written to.
distinct_thread_count Count of distinct threads writing.

android.monitor_contention

Views/Tables

android_monitor_contention, TABLE

Contains parsed monitor contention slices.

Column Description
blocking_method Name of the method holding the lock.
blocked_methhod Name of the method trying to acquire the lock.
short_blocking_method Blocking_method without arguments and return types.
short_blocked_method Blocked_method without arguments and return types.
blocking_src File location of blocking_method in form filename:linenumber.
blocked_src File location of blocked_method in form filename:linenumber.
waiter_count Zero indexed number of threads trying to acquire the lock.
blocking_utid Utid of thread holding the lock.
blocking_thread_name Thread name of thread holding the lock.
upid Upid of process experiencing lock contention.
process_name Process name of process experiencing lock contention.
id Slice id of lock contention.
ts Timestamp of lock contention start.
dur Duration of lock contention.
track_id Thread track id of blocked thread.
is_blocked_main_thread Whether the blocked thread is the main thread.
is_blocking_main_thread Whether the blocking thread is the main thread.
binder_reply_id Slice id of binder reply slice if lock contention was part of a binder txn.
binder_reply_ts Timestamp of binder reply slice if lock contention was part of a binder txn.
binder_reply_tid Tid of binder reply slice if lock contention was part of a binder txn.

android_monitor_contention_chain, TABLE

Contains parsed monitor contention slices with the parent-child relationships.

Column Description
parent_id Id of monitor contention slice blocking this contention.
blocking_method Name of the method holding the lock.
blocked_methhod Name of the method trying to acquire the lock.
short_blocking_method Blocking_method without arguments and return types.
short_blocked_method Blocked_method without arguments and return types.
blocking_src File location of blocking_method in form filename:linenumber.
blocked_src File location of blocked_method in form filename:linenumber.
waiter_count Zero indexed number of threads trying to acquire the lock.
blocking_utid Utid of thread holding the lock.
blocking_thread_name Thread name of thread holding the lock.
upid Upid of process experiencing lock contention.
process_name Process name of process experiencing lock contention.
id Slice id of lock contention.
ts Timestamp of lock contention start.
dur Duration of lock contention.
track_id Thread track id of blocked thread.
is_blocked_main_thread Whether the blocked thread is the main thread.
is_blocking_main_thread Whether the blocking thread is the main thread.
binder_reply_id Slice id of binder reply slice if lock contention was part of a binder txn.
binder_reply_ts Timestamp of binder reply slice if lock contention was part of a binder txn.
binder_reply_tid Tid of binder reply slice if lock contention was part of a binder txn.
child_id Id of monitor contention slice blocked by this contention.

android_monitor_contention_chain_thread_state, TABLE

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 Description
parent_id Id of slice blocking the blocking_thread.
blocking_method Name of the method holding the lock.
blocked_methhod Name of the method trying to acquire the lock.
short_blocking_method Blocking_method without arguments and return types.
short_blocked_method Blocked_method without arguments and return types.
blocking_src File location of blocking_method in form filename:linenumber.
blocked_src File location of blocked_method in form filename:linenumber.
waiter_count Zero indexed number of threads trying to acquire the lock.
blocking_utid Utid of the blocking
blocking_thread_name Thread name of thread holding the lock.
upid Upid of process experiencing lock contention.
process_name Process name of process experiencing lock contention.
id Slice id of lock contention.
ts Timestamp of the blocking
dur Duration of lock contention.
track_id Thread track id of blocked thread.
is_blocked_main_thread Whether the blocked thread is the main thread.
is_blocking_main_thread Whether the blocking thread is the main thread.
binder_reply_id Slice id of binder reply slice if lock contention was part of a binder txn.
binder_reply_ts Timestamp of binder reply slice if lock contention was part of a binder txn.
binder_reply_tid Tid of binder reply slice if lock contention was part of a binder txn.
state Thread state of the blocking thread.
blocked_function Blocked kernel function of the blocking thread.

android_monitor_contention_chain_thread_state_by_txn, 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 Description
id Slice id of the monitor contention.
thread_state A
thread_state_dur Total time the blocking thread spent in the
thread_state_count Count of all times the blocking thread entered

android_monitor_contention_chain_blocked_functions_by_txn, 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 Description
id Slice id of the monitor contention.
blocked_function Blocked kernel function in a thread state in the blocking thread during the contention.
blocked_function_dur Total time the blocking thread spent in the
blocked_function_count Count of all times the blocking thread executed the

Functions

android_extract_android_monitor_contention_blocking_thread 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 Extracts the blocking thread tid from a slice name

Returns: INT, Blocking thread tid

Argument Type Description
slice_name STRING Name of slice

android_extract_android_monitor_contention_blocking_method 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 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 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 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 Extracts the number of waiters on the monitor from a slice name

Returns: INT, Count of waiters on the lock

Argument Type Description
slice_name STRING Name of slice

android_extract_android_monitor_contention_blocking_src 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 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 <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 INT Upid of process to generate a lock graph for.
Column Description
pprof BYTES Pprof of lock graph.

android.network_packets

Views/Tables

android_network_packets, VIEW

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

Column Description
ts Timestamp in nanoseconds.
dur Duration (non-zero only in aggregate events)
track_name The track name (interface and direction)
package_name Traffic package source (or uid=$X if not found)
iface Traffic interface name (linux interface name)
direction Traffic direction ('Transmitted' or 'Received')
packet_count Number of packets in this event
packet_length Number of bytes in this event (wire size)
packet_transport Transport used for traffic in this event
packet_tcp_flags TCP flags used by tcp frames in this event
socket_tag The Android traffic tag of the network socket
socket_uid The Linux user id of the network socket
local_port The local port number (for udp or tcp only)
remote_port The remote port number (for udp or tcp only)

android.process_metadata

Views/Tables

android_process_metadata, TABLE

Data about packages running on the process.

Column Description
upid Process upid.
process_name Process name.
package_name Name of the packages running in this process.
version_code Package version code.
debuggable Whether package is debuggable.

android.slices

Functions

android_standardize_slice_name 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 Raw name of the slice

android.startup.startups

Views/Tables

android_startups, TABLE

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

Column Description
id Startup id.
ts Timestamp of startup start.
ts_end Timestamp of startup end.
dur Startup duration.
package Package name.
startup_type Startup type.

android_startup_processes, 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 Description
startup_id Startup id.
upid Upid of process on which activity started.
startup_type Type of the startup.

android_startup_threads, VIEW

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

Column Description
startup_id Startup id.
ts Timestamp of start.
dur Duration of startup.
upid Upid of process involved in startup.
utid Utid of the thread.
thread_name Name of the thread.
is_main_thread Thread is a main thread.

android_thread_slices_for_all_startups, 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 Description
startup_ts Timestamp of startup.
startup_ts_end Timestamp of startup end.
startup_id Startup id.
utid UTID of thread with slice.
thread_name Name of thread.
is_main_thread Whether it is main thread.
arg_set_id Arg set id.
slice_id Slice id.
slice_name Name of slice.
slice_ts Timestamp of slice start.
slice_dur Slice duration.

Functions

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

Returns: INT, 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 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: INT, Sum of duration.

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

android.statsd

Views/Tables

android_statsd_atoms, VIEW

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

Column Description
id Unique identifier for this slice.
type The name of the "most-specific" child table containing this row.
ts The timestamp at the start of the slice (in nanoseconds).
dur The duration of the slice (in nanoseconds).
arg_set_id The id of the argument set associated with this slice.
thread_instruction_count 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 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 The id of the track this slice is located on.
category 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 The name of the slice. The name describes what was happening during the slice.
depth The depth of the slice in the current stack of slices.
stack_id 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 The stack_id for the parent of this slice. Rarely useful.
parent_id The id of the parent (i.e. immediate ancestor) slice for this slice.
thread_ts 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 The thread time used by this slice. This column will only be populated if thread timestamp collection is enabled with track_event.

Module: chrome

chrome.chrome_scrolls

Views/Tables

chrome_scrolls, TABLE

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

Column Description
id The unique identifier of the scroll.
ts The start timestamp of the scroll.
dur The duration of the scroll.
gesture_scroll_begin_ts The earliest timestamp of the InputLatency::GestureScrollBegin for the corresponding scroll id.
gesture_scroll_end_ts The earliest timestamp of the InputLatency::GestureScrollEnd for the corresponding scroll id. 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.

chrome_scrolling_intervals, VIEW

Defines slices for all of scrolls intervals in a trace based on the scroll definition in chrome_scrolls. Note that scrolls may overlap (particularly in cases of jank/broken traces, etc); so scrolling intervals are not exactly the same as individual scrolls.

Column Description
id The unique identifier of the scroll interval. This may span multiple scrolls if they overlap.
ts The start timestamp of the scroll interval.
dur The duration of the scroll interval.

chrome.cpu_powerups

Views/Tables

chrome_cpu_power_slice, VIEW

The CPU power transitions in the trace.

Column Description
ts The timestamp at the start of the slice.
dur The duration of the slice.
cpu The CPU on which the transition occurred
power_state The power state that the CPU was in at time 'ts' for duration 'dur'.
previous_power_state The power state that the CPU was previously in.
powerup_id A unique ID for the CPU power-up. 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.

chrome_cpu_power_first_sched_slice_after_powerup, TABLE

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

Column Description
ts The timestamp at the start of the slice.
dur The duration of the slice.
cpu The cpu on which the slice executed.
sched_id Id for the sched_slice table.
utid Unique id for the thread that ran within the slice.
previous_power_state The CPU's power state before this slice.

chrome_cpu_power_post_powerup_slice, TABLE

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

Column Description
ts Timestamp of the resulting slice
dur Duration of the slice.
cpu The CPU the sched slice ran on.
utid Unique thread id for the slice.
sched_id 'id' field from the sched_slice table.
type From the sched_slice table, always 'sched_slice'.
end_state The ending state for the sched_slice
priority The kernel thread priority
slice_id Id of the top-level slice for this (sched) slice.

chrome_cpu_power_first_toplevel_slice_after_powerup, VIEW

The first top-level slice that ran after a CPU power-up.

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

chrome.histograms

Views/Tables

chrome_histograms, VIEW

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

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

chrome.scroll_jank.scroll_jank_intervals

Views/Tables

chrome_janky_event_latencies_v3, TABLE

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

Column Description
id INT The slice id.
ts INT The start timestamp of the slice.
dur INT The duration of the slice.
track_id INT 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 INT How many vsyncs this frame missed its deadline by.
frame_jank_ts INT The start timestamp where frame frame presentation was delayed.
frame_jank_dur INT The duration in ms of the delay in frame presentation.

chrome_janky_frame_presentation_intervals, VIEW

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

Column Description
id INT Unique id.
ts INT The start timestamp of the slice.
dur INT The duration of the slice.
delayed_frame_count INT 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 STRING The id of the associated event latency in the slice table.

chrome_scroll_stats, VIEW

Scroll jank frame presentation stats for individual scrolls.

Column Description
scroll_id INT Id of the individual scroll.
missed_vsyncs INT The number of missed vsyncs in the scroll.
frame_count INT The number of frames in the scroll.
presented_frame_count INT The number presented frames in the scroll.
janky_frame_count INT The number of janky frames in the scroll.
janky_frame_percent FLOAT The % of frames that janked in the scroll.

chrome_scroll_jank_intervals_v3, TABLE

Defines slices for all of janky scrolling intervals in a trace.

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

chrome.scroll_jank.scroll_jank_v3

Views/Tables

chrome_gesture_scroll_updates, TABLE

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

Column Description
ts The start timestamp of the scroll.
dur The duration of the scroll.
id Slice id for the scroll.
scroll_update_id The id of the scroll update event.
scroll_id The id of the scroll.
is_coalesced Whether this input event was coalesced.

chrome_presented_gesture_scrolls, TABLE

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

Column Description
id Minimum slice id for input presented in this frame, the non coalesced input.
ts The start timestamp for producing the frame.
dur The duration between producing and presenting the frame.
last_coalesced_input_ts The timestamp of the last input that arrived and got coalesced into the frame.
scroll_update_id The id of the scroll update event, a unique identifier to the gesture.
scroll_id The id of the ongoing scroll.

chrome_scroll_updates_with_deltas, TABLE

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

Column Description
scroll_update_id The id of the scroll update event.
delta_y The perceived delta_y on the screen post prediction.

chrome_gesture_scroll_event_latencies, TABLE

Extract event latency timestamps, to later use it for joining with gesture scroll updates, as event latencies don't have trace ids associated with it.

Column Description
ts Start timestamp for the EventLatency.
event_latency_id Slice id of the EventLatency.
dur Duration of the EventLatency.
input_latency_end_ts End timestamp for input aka the timestamp of the LatchToSwapEnd substage.
presentation_timestamp Frame presentation timestamp aka the timestamp of the SwapEndToPresentationCompositorFrame substage.
event_type EventLatency event type.

chrome_full_frame_view, TABLE

Join presented gesture scrolls with their respective event latencies based on |LatchToSwapEnd| timestamp, as it's the end timestamp for both the gesture scroll update slice and the LatchToSwapEnd slice.

Column Description
id ID of the frame.
ts Start timestamp of the frame.
last_coalesced_input_ts The timestamp of the last coalesced input.
scroll_id ID of the associated scroll.
scroll_update_id ID of the associated scroll update.
event_latency_id ID of the associated EventLatency.
dur Duration of the associated EventLatency.
presentation_timestamp Frame presentation timestamp.

chrome_full_frame_delta_view, TABLE

Join deltas with EventLatency data.

Column Description
id ID of the frame.
ts Start timestamp of the frame.
scroll_id ID of the associated scroll.
scroll_update_id ID of the associated scroll update.
last_coalesced_input_ts The timestamp of the last coalesced input.
delta_y The perceived delta_y on the screen post -- prediction.
event_latency_id ID of the associated EventLatency.
dur Duration of the associated EventLatency.
presentation_timestamp Frame presentation timestamp.

chrome_merged_frame_view, VIEW

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

Column Description
id ID of the frame.
max_start_ts The timestamp of the last coalesced input.
min_start_ts The earliest frame start timestamp.
scroll_id ID of the associated scroll.
scroll_update_id ID of the associated scroll update.
encapsulated_scroll_ids All scroll updates associated with the frame presentation timestamp.
total_delta Sum of all perceived delta_y values at the frame presentation timestamp.
segregated_delta_y Lists all of the perceived delta_y values at the frame presentation timestamp.
event_latency_id ID of the associated EventLatency.
dur Maximum duration of the associated EventLatency.
presentation_timestamp Frame presentation timestamp.

chrome_frame_info_with_delay, VIEW

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 Description
id gesture scroll slice id.
min_start_ts OS timestamp of the first touch move arrival within a frame.
max_start_ts OS timestamp of the last touch move arrival within a frame.
scroll_id The scroll which the touch belongs to.
encapsulated_scroll_ids Trace ids of all frames presented in at this vsync.
total_delta Summation of all delta_y of all gesture scrolls in this frame.
segregated_delta_y All delta y of all gesture scrolls comma separated, summing those gives
event_latency_id Event latency id of the presented frame.
dur Duration of the EventLatency.
presentation_timestamp Timestamp at which the frame was shown on the screen.
delay_since_last_frame Time elapsed since the previous frame was presented, usually equals
delay_since_last_input Difference in OS timestamps of inputs in the current and the previous frame.
prev_event_latency_id The event latency id that will be used as a reference to determine the jank cause.

chrome_vsyncs, VIEW

Calculate |VSYNC_INTERVAL| as the lowest delay between frames larger than zero. TODO(b/286222128): Emit this data from Chrome instead of calculating it.

Column Description
vsync_interval The lowest delay between frames larger than zero.

chrome_janky_frames_no_cause, VIEW

Filter the frame view only to frames that had missed vsyncs.

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

chrome_janky_frames_no_subcause, VIEW

Janky frame information including the jank cause.

Column Description
delay_since_last_frame Time elapsed since the previous frame was presented, will be more than
event_latency_id Event latency id of the presented frame.
vsync_interval Vsync interval at the time of recording the trace.
hardware_class Device brand and model.
scroll_id The scroll corresponding to this frame.
prev_event_latency_id The event latency id that will be used as a reference to determine the jank cause.
cause_id Id of the slice corresponding to the offending stage.

chrome_janky_frames, VIEW

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

Column Description
cause_of_jank The reason the Vsync was missed.
sub_cause_of_jank Further breakdown if the root cause was GPU related.
delay_since_last_frame Time elapsed since the previous frame was presented, will be more than
event_latency_id Event latency id of the presented frame.
vsync_interval Vsync interval at the time of recording the trace.
hardware_class Device brand and model.
scroll_id The scroll corresponding to this frame.

chrome_unique_frame_presentation_ts, VIEW

Counting all unique frame presentation timestamps.

Column Description
presentation_timestamp The unique frame presentation timestamp.

chrome_janky_frames_percentage, VIEW

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 Description
delayed_frame_percentage The percent of missed frames relative to total frames - aka the percent of janky frames.

chrome_frames_per_scroll, VIEW

Number of frames and janky frames per scroll.

Column Description
scroll_id The ID of the scroll.
num_frames The number of frames in the scroll.
num_janky_frames The number of delayed/janky frames.
scroll_jank_percentage The percentage of janky frames relative to total frames.

chrome_causes_per_scroll, VIEW

Scroll jank causes per scroll.

Column Description
scroll_id The ID of the scroll.
max_delay_since_last_frame The maximum time a frame was delayed after the presentation of the previous frame.
vsync_interval The expected vsync interval.
scroll_jank_causes 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.speedometer

Views/Tables

chrome_speedometer_measure, VIEW

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 Description
iteration Speedometer iteration the mark belongs to.
suite_name Suite name
test_name Test name
measure_type Type of the measure (sync or async)
ts Start timestamp of the measure
dur Duration of the measure

chrome_speedometer_iteration, VIEW

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 Description
iteration Speedometer iteration.
ts Start timestamp of the iteration
dur Duration of the iteration
total Total duration of the measures in this iteration
mean Average suite duration for this iteration.
geomean Geometric mean of the suite durations for this iteration.
score Speedometer score for this iteration (The total score for a run in the average of all iteration scores).

chrome.tasks

Views/Tables

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.

Column Description
filtered_name 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. TODO(altimin): Add "columns_from slice" annotation. TODO(altimin): convert this to EXTEND_TABLE when it becomes available.

chrome_scheduler_tasks, VIEW

A list of tasks executed by Chrome scheduler.

Column Description
id Slice id.
name Name of the task.
ts Timestamp.
dur Duration.
utid Utid of the thread this task run on.
thread_name Name of the thread this task run on.
upid Upid of the process of this task.
process_name Name of the process of this task.
track_id Same as slice.track_id.
depth Same as slice.depth.
parent_id Same as slice.parent_id.
arg_set_id Same as slice.arg_set_id.
thread_ts Same as slice.thread_ts.
thread_dur Same as slice.thread_dur.
posted_from Source location where the PostTask was called.

chrome_tasks, 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 Description
id INT 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 INT Utid.
process_name STRING Process name.
upid INT Upid.
full_name STRING Legacy alias for
ts INT Alias of
dur INT Alias of
track_id INT Alias of
category STRING Alias of
arg_set_id INT Alias of
thread_ts INT Alias of
thread_dur INT Alias of

chrome.vsync_intervals

Views/Tables

chrome_vsync_intervals, 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 Description

Module: experimental

experimental.android_broadcast

Views/Tables

experimental_android_broadcasts_minsdk_u, VIEW

Provides a list of broadcast names and processes they were sent to by the system_server process on U+ devices.

Column Description
type The name of the broadcast type which was sent.
process_name The process name the broadcast was sent to.
queue_name The name of the broacast queue the broadcast was dispatched from.

experimental.flat_slices

Views/Tables

experimental_slice_flattened, TABLE

The concept of a "flat slice" is to take the data in the slice table and remove all notion of nesting; we do this by projecting every slice in a stack to their ancestor slice, i.e at any point in time, taking the most specific active slice (i.e. the slice at the bottom of the stack) and representing that as the only slice that was running during that period. This concept becomes very useful when you try and linearise a trace and compare it with other traces spanning the same user action; "self time" (i.e. time spent in a slice but not any children) is easily computed and span joins with thread state become possible without limiting to only depth zero slices. Note that, no slices will be generated for intervals without without any slices. As an example, consider the following slice stack: A-------------B. ----C----D----. The flattened slice will be: A----C----D----B.

Column Description
slice_id Id of most active slice.
ts Timestamp when slice.id became the most active slice.
dur Duration of slice.id as the most active slice until the next active slice.
depth Depth of slice.id in the original stack.
name Name of slice.id.
root_name Name of the top most slice of the stack.
root_id Id of of the top most slice of the stack.
track_id Alias for slice.track_id.
utid Alias for thread.utid.
tid Alias for thread.tid
thread_name Alias for thread.name.
upid Alias for process.upid.
pid Alias for process.pid.
process_name Alias for process.name.

experimental.proto_path

Functions

experimental_proto_path_to_stack Creates a Stack following the parent relations in EXPERIMENTAL_PROTO_PATH table starting at the given path_id.

Returns: BYTES, Stack

Argument Type Description
path_id LONG Id of the path in EXPERIMENTAL_PROTO_PATH that will be the leaf in the returned stack

experimental.slices

Views/Tables

experimental_slice_with_thread_and_process_info, VIEW

All slices with related process and thread info if available. Unlike thread_slice and process_slice, this view contains all slices, with thread- and process-related columns set to NULL if the slice is not associated with a thread or a process.

Column Description
id Alias for slice.id.
type Alias for slice.type.
ts Alias for slice.ts.
dur Alias for slice.dur.
category Alias for slice.category.
name Alias for slice.name.
track_id Alias for slice.track_id.
track_name Alias for track.name.
thread_name Alias for thread.name.
utid Alias for thread.utid.
tid Alias for thread.tid
process_name Alias for process.name.
upid Alias for process.upid.
pid Alias for process.pid.
depth Alias for slice.depth.
parent_id Alias for slice.parent_id.
arg_set_id Alias for slice.arg_set_id.
thread_ts Alias for slice.thread_ts.
thread_dur Alias for slice.thread_dur.

experimental.thread_executing_span

Views/Tables

experimental_thread_executing_span_graph, TABLE

thread_executing_span graph of all wakeups across all processes.

Column Description
parent_id Id of thread_executing_span that directly woke
id Id of the first (runnable) thread state in thread_executing_span.
ts Timestamp of first thread_state in thread_executing_span.
dur Duration of thread_executing_span.
tid Tid of thread with thread_state.
pid Pid of process with thread_state.
utid Utid of thread with thread_state.
upid Upid of process with thread_state.
thread_name Name of thread with thread_state.
process_name Name of process with thread_state.
waker_tid Tid of thread that woke the first thread_state in thread_executing_span.
waker_pid Pid of process that woke the first thread_state in thread_executing_span.
waker_utid Utid of thread that woke the first thread_state in thread_executing_span.
waker_upid Upid of process that woke the first thread_state in thread_executing_span.
waker_thread_name Name of thread that woke the first thread_state in thread_executing_span.
waker_process_name Name of process that woke the first thread_state in thread_executing_span.
blocked_dur Duration of blocking thread state before waking up.
blocked_state Thread state ('D' or 'S') of blocked thread_state before waking up.
blocked_function Kernel blocking function of thread state before waking up.

Functions

experimental_thread_executing_span_id_from_thread_state_id Gets the thread_executing_span id a thread_state belongs to. Returns NULL if thread state is sleeping and not blocked on an interrupt.

Returns: INT, thread_executing_span id

Argument Type Description
thread_state_id INT Id of the thread_state to get the thread_executing_span id for

experimental_thread_executing_span_following_thread_state_id Gets the next thread_executing_span id after a sleeping state. Returns NULL if there is no thread_executing_span after the |thread_state_id|.

Returns: INT, thread_executing_span id

Argument Type Description
thread_state_id INT Id of the thread_state to get the next thread_executing_span id for

Module: pkvm

pkvm.hypervisor

Views/Tables

pkvm_hypervisor_events, VIEW

Events when CPU entered hypervisor.

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