SQL standard library

To import any function, view_function, view or table simply run SELECT IMPORT({import key}); in your SQL query.

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_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_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_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_statsd_atoms android.statsd Statsd atoms
chrome_janky_event_latencies_v2 chrome.chrome_scroll_janks Selects EventLatency slices that correspond with janks in a scroll
chrome_scroll_jank_intervals_v2 chrome.chrome_scroll_janks Defines slices for all of janky scrolling intervals in a trace
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_speedometer_measure chrome.speedometer Augmented slices for Speedometer measurements
chrome_speedometer_iteration chrome.speedometer Slice that covers one Speedometer iteration
pkvm_hypervisor_events pkvm.hypervisor Events when CPU entered hypervisor

Functions

Name Import Return type Description
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
COUNTER_TRACK_PERCENTILE_FOR_TIME common.percentiles DOUBLE Value for specific percentile (range 1-100) for counter track ID in time range
COUNTER_TRACK_PERCENTILE common.percentiles DOUBLE Value for specific percentile (range 1-100) for counter track ID
HAS_PARENT_SLICE_WITH_NAME common.slices BOOL Checks if slice has an ancestor with provided name
HAS_DESCENDANT_SLICE_WITH_NAME common.slices BOOL Checks if slice has a descendant with provided name
SLICE_COUNT common.slices INT Count slices with specified name
DESCENDANT_SLICE_END common.slices INT Finds the end timestamp for a given slice's descendant with a given name
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
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
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

View 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_SLICES_FOR_STARTUP_AND_SLICE_NAME android.startup.startups Given a startup id and GLOB for a slice name, returns matching slices with data
ANDROID_BINDER_TRANSACTION_SLICES_FOR_STARTUP android.startup.startups Returns binder transaction slices for a given startup id with duration over threshold

Module: common

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

Functions

COUNTER_TRACK_PERCENTILE_FOR_TIME Value for specific percentile (range 1-100) for counter track ID in time range.

Returns: DOUBLE, Value for the percentile.

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

COUNTER_TRACK_PERCENTILE Value for specific percentile (range 1-100) for counter track ID.

Returns: DOUBLE, Value for the percentile.

Argument Type Description
counter_track_id INT Id of the counter track.
percentile INT Any of the numbers from 1 to 100.

View 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.

HAS_DESCENDANT_SLICE_WITH_NAME Checks if slice has a descendant with provided name.

Returns: BOOL, Whether descendant_name is a name of an descendant slice.

Argument Type Description
id INT Id of the slice to check descendants of.
descendant_name STRING Name of potential descendant 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.

DESCENDANT_SLICE_END Finds the end timestamp for a given slice's descendant with a given name. If there are multiple descendants with a given name, the function will return the first one, so it's most useful when working with a timeline broken down into phases, where each subphase can happen only once.

Returns: INT, end timestamp of the child or NULL if it doesn't exist.

Argument Type Description
parent_id INT Id of the parent slice.
child_name STRING name of the child with the desired end TS.

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.

Module: android

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.

View 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 INT Startup id.
slice_name STRING Glob of the slice.
Column Description
slice_name Name of the slice.
slice_ts Timestamp of start of the slice.
slice_dur Duration of the slice.
thread_name Name of the thread with the slice.
arg_set_id 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 INT Startup id.
threshold DOUBLE Only return slices with duration over threshold.
Column Description
id Slice id.
slice_dur Slice duration.
thread_name Name of the thread with slice.
process Name of the process with slice.
arg_set_id Arg set id.
is_main_thread Whether is main thread.

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 name of the client upid
client_utid name of the client utid
client_ts timestamp of the client txn
client_dur dur of the client 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 name of the server upid
server_utid name of the server utid
server_ts timestamp of the server txn
server_dur dur of the server txn

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.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 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 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_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

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.statsd

Views/Tables

android_statsd_atoms, VIEW

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

Column Description
id ,
type ,
ts ,
dur ,
arg_set_id ,
thread_instruction_count ,
thread_instruction_delta ,
track_id ,
category ,
name ,
depth ,
stack_id ,
parent_stack_id ,
parent_id ,
thread_ts ,
thread_dur ,

Module: chrome

chrome.chrome_scroll_janks

Views/Tables

chrome_janky_event_latencies_v2, TABLE

Selects EventLatency slices that correspond with janks in a scroll. This is based on the V2 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.

chrome_scroll_jank_intervals_v2, 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.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. 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.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).

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.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.

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.