PerfettoSQL Prelude

Tables diagram

Events tables

graph TD subgraph Events SliceTable["slice"] RawTable["track"] FtraceEventTable["ftrace_event"] SchedSliceTable["sched"] SpuriousSchedWakeupTable["spurious_sched_wakeup"] ThreadStateTable["thread_state"] end SliceTable["slice"] -. parent_id .-> SliceTable["slice"] SliceTable["slice"] -. arg_set_id .-> ArgTable["args"] RawTable["track"] -. utid .-> ThreadTable["thread"] RawTable["track"] -. arg_set_id .-> ArgTable["args"] RawTable["track"] -. ucpu .-> CpuTable["cpu"] FtraceEventTable["ftrace_event"] --> RawTable["track"] SchedSliceTable["sched"] -. ucpu .-> CpuTable["cpu"] ThreadStateTable["thread_state"] -. waker_id .-> ThreadStateTable["thread_state"] ThreadStateTable["thread_state"] -. ucpu .-> CpuTable["cpu"] click SliceTable "#slice" click SliceTable "#slice" click ArgTable "#args" click RawTable "#track" click ThreadTable "#thread" click ArgTable "#args" click CpuTable "#cpu" click FtraceEventTable "#ftrace_event" click SchedSliceTable "#sched" click CpuTable "#cpu" click SpuriousSchedWakeupTable "#spurious_sched_wakeup" click ThreadStateTable "#thread_state" click ThreadStateTable "#thread_state" click CpuTable "#cpu"

Android tables

graph TD subgraph Android AndroidDumpstateTable["android_dumpstate"] AndroidGameInterventionListTable["android_game_intervention_list"] end click AndroidDumpstateTable "#android_dumpstate" click AndroidGameInterventionListTable "#android_game_intervention_list"

ART Heap Graphs tables

graph TD subgraph ART Heap Graphs HeapGraphClassTable["heap_graph_class"] HeapGraphObjectTable["heap_graph_object"] HeapGraphReferenceTable["heap_graph_reference"] end HeapGraphClassTable["heap_graph_class"] -. superclass_id .-> HeapGraphClassTable["heap_graph_class"] HeapGraphObjectTable["heap_graph_object"] -. type_id .-> HeapGraphClassTable["heap_graph_class"] HeapGraphReferenceTable["heap_graph_reference"] -. owner_id .-> HeapGraphObjectTable["heap_graph_object"] HeapGraphReferenceTable["heap_graph_reference"] -. owned_id .-> HeapGraphObjectTable["heap_graph_object"] click HeapGraphClassTable "#heap_graph_class" click HeapGraphClassTable "#heap_graph_class" click HeapGraphObjectTable "#heap_graph_object" click HeapGraphClassTable "#heap_graph_class" click HeapGraphReferenceTable "#heap_graph_reference" click HeapGraphObjectTable "#heap_graph_object" click HeapGraphObjectTable "#heap_graph_object"

Callstack profilers tables

graph TD subgraph Callstack profilers StackProfileMappingTable["stack_profile_mapping"] StackProfileFrameTable["stack_profile_frame"] StackProfileCallsiteTable["stack_profile_callsite"] CpuProfileStackSampleTable["cpu_profile_stack_sample"] InstrumentsSampleTable["instruments_sample"] HeapProfileAllocationTable["heap_profile_allocation"] PerfSessionTable["perf_session"] PerfSampleTable["perf_sample"] ProfilerSmapsTable["profiler_smaps"] SymbolTable["stack_profile_symbol"] end StackProfileFrameTable["stack_profile_frame"] -. mapping .-> StackProfileMappingTable["stack_profile_mapping"] StackProfileCallsiteTable["stack_profile_callsite"] -. parent_id .-> StackProfileCallsiteTable["stack_profile_callsite"] StackProfileCallsiteTable["stack_profile_callsite"] -. frame_id .-> StackProfileFrameTable["stack_profile_frame"] CpuProfileStackSampleTable["cpu_profile_stack_sample"] -. callsite_id .-> StackProfileCallsiteTable["stack_profile_callsite"] InstrumentsSampleTable["instruments_sample"] -. callsite_id .-> StackProfileCallsiteTable["stack_profile_callsite"] HeapProfileAllocationTable["heap_profile_allocation"] -. callsite_id .-> StackProfileCallsiteTable["stack_profile_callsite"] PerfSampleTable["perf_sample"] -. callsite_id .-> StackProfileCallsiteTable["stack_profile_callsite"] PerfSampleTable["perf_sample"] -. perf_session_id .-> PerfSessionTable["perf_session"] click StackProfileMappingTable "#stack_profile_mapping" click StackProfileFrameTable "#stack_profile_frame" click StackProfileMappingTable "#stack_profile_mapping" click StackProfileCallsiteTable "#stack_profile_callsite" click StackProfileCallsiteTable "#stack_profile_callsite" click StackProfileFrameTable "#stack_profile_frame" click CpuProfileStackSampleTable "#cpu_profile_stack_sample" click StackProfileCallsiteTable "#stack_profile_callsite" click InstrumentsSampleTable "#instruments_sample" click StackProfileCallsiteTable "#stack_profile_callsite" click HeapProfileAllocationTable "#heap_profile_allocation" click StackProfileCallsiteTable "#stack_profile_callsite" click PerfSessionTable "#perf_session" click PerfSampleTable "#perf_sample" click StackProfileCallsiteTable "#stack_profile_callsite" click PerfSessionTable "#perf_session" click ProfilerSmapsTable "#profiler_smaps" click SymbolTable "#stack_profile_symbol"

Memory Snapshots tables

graph TD subgraph Memory Snapshots MemorySnapshotTable["memory_snapshot"] ProcessMemorySnapshotTable["process_memory_snapshot"] MemorySnapshotNodeTable["memory_snapshot_node"] MemorySnapshotEdgeTable["memory_snapshot_edge"] end ProcessMemorySnapshotTable["process_memory_snapshot"] -. snapshot_id .-> MemorySnapshotTable["memory_snapshot"] MemorySnapshotNodeTable["memory_snapshot_node"] -. process_snapshot_id .-> ProcessMemorySnapshotTable["process_memory_snapshot"] MemorySnapshotNodeTable["memory_snapshot_node"] -. parent_node_id .-> MemorySnapshotNodeTable["memory_snapshot_node"] MemorySnapshotEdgeTable["memory_snapshot_edge"] -. source_node_id .-> MemorySnapshotNodeTable["memory_snapshot_node"] MemorySnapshotEdgeTable["memory_snapshot_edge"] -. target_node_id .-> MemorySnapshotNodeTable["memory_snapshot_node"] click MemorySnapshotTable "#memory_snapshot" click ProcessMemorySnapshotTable "#process_memory_snapshot" click MemorySnapshotTable "#memory_snapshot" click MemorySnapshotNodeTable "#memory_snapshot_node" click ProcessMemorySnapshotTable "#process_memory_snapshot" click MemorySnapshotNodeTable "#memory_snapshot_node" click MemorySnapshotEdgeTable "#memory_snapshot_edge" click MemorySnapshotNodeTable "#memory_snapshot_node" click MemorySnapshotNodeTable "#memory_snapshot_node"

Metadata tables

graph TD subgraph Metadata MachineTable["machine"] ProcessTable["process"] ThreadTable["thread"] FiledescriptorTable["filedescriptor"] MetadataTable["metadata"] end ProcessTable["process"] -. parent_upid .-> ProcessTable["process"] ProcessTable["process"] -. uid .-> PackageListTable["package_list"] ProcessTable["process"] -. arg_set_id .-> ArgTable["args"] ProcessTable["process"] -. machine_id .-> MachineTable["machine"] ThreadTable["thread"] -. upid .-> ProcessTable["process"] ThreadTable["thread"] -. machine_id .-> MachineTable["machine"] click MachineTable "#machine" click ProcessTable "#process" click ProcessTable "#process" click PackageListTable "#package_list" click ArgTable "#args" click MachineTable "#machine" click ThreadTable "#thread" click ProcessTable "#process" click MachineTable "#machine" click FiledescriptorTable "#filedescriptor" click MetadataTable "#metadata"

Slice tables

graph TD subgraph Slice ActualFrameTimelineSliceTable["actual_frame_timeline_slice"] AndroidNetworkPacketsTable["android_network_packets"] ExpectedFrameTimelineSliceTable["expected_frame_timeline_slice"] GpuSliceTable["gpu_slice"] GraphicsFrameSliceTable["frame_slice"] end ActualFrameTimelineSliceTable["actual_frame_timeline_slice"] --> SliceTable["slice"] AndroidNetworkPacketsTable["android_network_packets"] --> SliceTable["slice"] ExpectedFrameTimelineSliceTable["expected_frame_timeline_slice"] --> SliceTable["slice"] GpuSliceTable["gpu_slice"] --> SliceTable["slice"] GraphicsFrameSliceTable["frame_slice"] --> SliceTable["slice"] click ActualFrameTimelineSliceTable "#actual_frame_timeline_slice" click AndroidNetworkPacketsTable "#android_network_packets" click ExpectedFrameTimelineSliceTable "#expected_frame_timeline_slice" click GpuSliceTable "#gpu_slice" click GraphicsFrameSliceTable "#frame_slice"

Winscope tables

graph TD subgraph Winscope ProtoLogTable["protolog"] SurfaceFlingerLayersSnapshotTable["surfaceflinger_layers_snapshot"] SurfaceFlingerLayerTable["surfaceflinger_layer"] SurfaceFlingerTransactionsTable["surfaceflinger_transactions"] WindowManagerShellTransitionsTable["window_manager_shell_transitions"] WindowManagerShellTransitionHandlersTable["window_manager_shell_transition_handlers"] WindowManagerTable["windowmanager"] end SurfaceFlingerLayerTable["surfaceflinger_layer"] -. snapshot_id .-> SurfaceFlingerLayersSnapshotTable["surfaceflinger_layers_snapshot"] click ProtoLogTable "#protolog" click SurfaceFlingerLayersSnapshotTable "#surfaceflinger_layers_snapshot" click SurfaceFlingerLayerTable "#surfaceflinger_layer" click SurfaceFlingerLayersSnapshotTable "#surfaceflinger_layers_snapshot" click SurfaceFlingerTransactionsTable "#surfaceflinger_transactions" click WindowManagerShellTransitionsTable "#window_manager_shell_transitions" click WindowManagerShellTransitionHandlersTable "#window_manager_shell_transition_handlers" click WindowManagerTable "#windowmanager"

Misc tables

graph TD subgraph Misc FlowTable["flow"] ArgTable["args"] ClockSnapshotTable["clock_snapshot"] CpuTable["cpu"] CpuFreqTable["cpu_freq"] TraceFileTable["trace_file"] GpuCounterGroupTable["gpu_counter_group"] PackageListTable["package_list"] VulkanMemoryAllocationsTable["vulkan_memory_allocations"] end FlowTable["flow"] -. slice_out .-> SliceTable["slice"] FlowTable["flow"] -. slice_in .-> SliceTable["slice"] ClockSnapshotTable["clock_snapshot"] -. machine_id .-> MachineTable["machine"] CpuTable["cpu"] -. machine_id .-> MachineTable["machine"] CpuFreqTable["cpu_freq"] -. ucpu .-> CpuTable["cpu"] TraceFileTable["trace_file"] -. parent_id .-> TraceFileTable["trace_file"] click FlowTable "#flow" click SliceTable "#slice" click SliceTable "#slice" click ArgTable "#args" click ClockSnapshotTable "#clock_snapshot" click MachineTable "#machine" click CpuTable "#cpu" click MachineTable "#machine" click CpuFreqTable "#cpu_freq" click CpuTable "#cpu" click TraceFileTable "#trace_file" click TraceFileTable "#trace_file" click GpuCounterGroupTable "#gpu_counter_group" click PackageListTable "#package_list" click VulkanMemoryAllocationsTable "#vulkan_memory_allocations"

Events

slice

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

Column Type Description
id SliceTable::Id Unique identifier for this slice.
ts int64_t The timestamp at the start of the slice (in nanoseconds).
dur int64_t The duration of the slice (in nanoseconds).
track_id TrackTable::Id The id of the track this slice is located on
Joinable with __intrinsic_track.id
category string
optional
The "category" of the slice. If this slice originated with track_event, this column contains the category emitted
Otherwise, it is likely to be null (with limited exceptions).
name string
optional
The name of the slice. The name describes what was happening during the slice.
depth uint32_t The depth of the slice in the current stack of slices.
stack_id int64_t 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 int64_t The stack_id for the parent of this slice. Rarely useful.
parent_id SliceTable::Id
optional
The id of the parent (i.e. immediate ancestor) slice for this slice
Joinable with slice.id
arg_set_id uint32_t The id of the argument set associated with this slice
Joinable with args.arg_set_id
thread_ts int64_t
optional
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 int64_t
optional
' The thread time used by this slice. This column will only be populated if thread timestamp collection is enabled with track_event.
thread_instruction_count int64_t
optional
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 int64_t
optional
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

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

If you are looking for ftrace_events: please use the ftrace_event table.

Column Type Description
id RawTable::Id Unique identifier for this track.
ts int64_t The timestamp of this event.
name string The name of the event. For ftrace events, this will be the ftrace event name.
utid ThreadTable::Id The thread this event was emitted on
Joinable with thread.id
arg_set_id uint32_t The set of key/value pairs associated with this event
Joinable with args.arg_set_id
common_flags uint32_t Ftrace event flags for this event. Currently only emitted for sched_waking events.
ucpu CpuTable::Id The unique CPU indentifier
Joinable with cpu.id

ftrace_event

Extends track

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

Column Type Description
Columns inherited from track
id RawTable::Id Unique identifier for this track.
ts int64_t The timestamp of this event.
name string The name of the event. For ftrace events, this will be the ftrace event name.
utid ThreadTable::Id The thread this event was emitted on
Joinable with thread.id
arg_set_id uint32_t The set of key/value pairs associated with this event
Joinable with args.arg_set_id
common_flags uint32_t Ftrace event flags for this event. Currently only emitted for sched_waking events.
ucpu CpuTable::Id The unique CPU indentifier
Joinable with cpu.id

sched

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

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

Column Type Description
id SchedSliceTable::Id Unique identifier for this sched.
ts int64_t The timestamp at the start of the slice (in nanoseconds).
dur int64_t The duration of the slice (in nanoseconds).
utid uint32_t The thread's unique id in the trace.
end_state string A string representing the scheduling state of the kernel thread at the end of the slice. The individual characters in the string mean the following: R (runnable), S (awaiting a wakeup), D (in an uninterruptible sleep), T (suspended), t (being traced), X (exiting), P (parked), W (waking), I (idle), N (not contributing to the load average), K (wakeable on fatal signals) and Z (zombie, awaiting cleanup).
priority int32_t The kernel priority that the thread ran at.
ucpu CpuTable::Id The unique CPU identifier that the slice executed on
Joinable with cpu.id

spurious_sched_wakeup

This table contains the scheduling wakeups that occurred while a thread was not blocked, i.e. running or runnable. Such wakeups are not tracked in the |thread_state_table|.

Column Type Description
id SpuriousSchedWakeupTable::Id Unique identifier for this spurious_sched_wakeup.
ts int64_t The timestamp at the start of the slice (in nanoseconds).
thread_state_id int64_t The id of the row in the thread_state table that this row is associated with.
irq_context uint32_t
optional
Whether the wakeup was from interrupt context or process context.
utid uint32_t The thread's unique id in the trace..
waker_utid uint32_t The unique thread id of the thread which caused a wakeup of this thread.

thread_state

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

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

Column Type Description
id ThreadStateTable::Id Unique identifier for this thread_state.
ts int64_t The timestamp at the start of the slice (in nanoseconds).
dur int64_t The duration of the slice (in nanoseconds).
utid uint32_t The thread's unique id in the trace.
state string The scheduling state of the thread. Can be "Running" or any of the states described in |sched_slice.end_state|.
io_wait uint32_t
optional
Indicates whether this thread was blocked on IO.
blocked_function string
optional
The function in the kernel this thread was blocked on.
waker_utid uint32_t
optional
The unique thread id of the thread which caused a wakeup of this thread.
waker_id ThreadStateTable::Id
optional
The unique thread state id which caused a wakeup of this thread
Joinable with thread_state.id
irq_context uint32_t
optional
Whether the wakeup was from interrupt context or process context.
ucpu CpuTable::Id
optional
The unique CPU identifier that the thread executed on
Joinable with cpu.id

Android

android_dumpstate

Dumpsys entries from Android dumpstate.

Column Type Description
id AndroidDumpstateTable::Id Unique identifier for this android_dumpstate.
section string
optional
name of the dumpstate section.
service string
optional
name of the dumpsys service. Only present when dumpstate=="dumpsys", NULL otherwise.
line string line-by-line contents of the section/service, one row per line.

android_game_intervention_list

A table presenting all game modes and interventions of games installed on the system. This is generated by the game_mode_intervention data-source.

Column Type Description
id AndroidGameInterventionListTable::Id Unique identifier for this android_game_intervention_list.
package_name string name of the pakcage, e.g. com.google.android.gm.
uid int64_t UID processes of this package runs as.
current_mode int32_t current game mode the game is running at.
standard_mode_supported int32_t bool whether standard mode is supported.
standard_mode_downscale double
optional
resolution downscaling factor of standard mode.
standard_mode_use_angle int32_t
optional
bool whether ANGLE is used in standard mode.
standard_mode_fps double
optional
frame rate that the game is throttled at in standard mode.
perf_mode_supported int32_t bool whether performance mode is supported.
perf_mode_downscale double
optional
resolution downscaling factor of performance mode.
perf_mode_use_angle int32_t
optional
bool whether ANGLE is used in performance mode.
perf_mode_fps double
optional
frame rate that the game is throttled at in performance mode.
battery_mode_supported int32_t bool whether battery mode is supported.
battery_mode_downscale double
optional
resolution downscaling factor of battery mode.
battery_mode_use_angle int32_t
optional
bool whether ANGLE is used in battery mode.
battery_mode_fps double
optional
frame rate that the game is throttled at in battery mode.

ART Heap Graphs

heap_graph_class

Column Type Description
id HeapGraphClassTable::Id Unique identifier for this heap_graph_class.
name string (potentially obfuscated) name of the class.
deobfuscated_name string
optional
if class name was obfuscated and deobfuscation map for it provided, the deobfuscated name.
location string
optional
the APK / Dex / JAR file the class is contained in.
superclass_id HeapGraphClassTable::Id
optional
Joinable with heap_graph_class.id
classloader_id uint32_t
optional
kind string

heap_graph_object

The objects on the Dalvik heap.

All rows with the same (upid, graph_sample_ts) are one dump.

Column Type Description
id HeapGraphObjectTable::Id Unique identifier for this heap_graph_object.
upid uint32_t Unique PID of the target.
graph_sample_ts int64_t timestamp this dump was taken at.
self_size int64_t size this object uses on the Java Heap.
native_size int64_t approximate amount of native memory used by this object, as reported by libcore.util.NativeAllocationRegistry.size.
reference_set_id uint32_t
optional
join key with heap_graph_reference containing all objects referred in this object's fields.
reachable int32_t bool whether this object is reachable from a GC root. If false, this object is uncollected garbage.
type_id HeapGraphClassTable::Id class this object is an instance of
Joinable with heap_graph_class.id
root_type string
optional
if not NULL, this object is a GC root.

heap_graph_reference

Many-to-many mapping between heap_graph_object.

This associates the object with given reference_set_id with the objects that are referred to by its fields.

Column Type Description
id HeapGraphReferenceTable::Id Unique identifier for this heap_graph_reference.
reference_set_id uint32_t Join key to heap_graph_object.
owner_id HeapGraphObjectTable::Id Id of object that has this reference_set_id
Joinable with heap_graph_object.id
owned_id HeapGraphObjectTable::Id
optional
Id of object that is referred to
Joinable with heap_graph_object.id
field_name string The field that refers to the object. E.g. Foo.name.
field_type_name string The static type of the field. E.g. java.lang.String.
deobfuscated_field_name string
optional
The deobfuscated name, if field_name was obfuscated and a deobfuscation mapping was provided for it.

Callstack profilers

stack_profile_mapping

A mapping (binary / library) in a process. This is generated by the stack profilers: heapprofd and traced_perf.

Column Type Description
id StackProfileMappingTable::Id Unique identifier for this stack_profile_mapping.
build_id string Hex-encoded Build ID of the binary / library.
exact_offset int64_t
start_offset int64_t
start int64_t Start of the mapping in the process' address space.
end int64_t End of the mapping in the process' address space.
load_bias int64_t
name string Filename of the binary / library.

stack_profile_frame

A frame on the callstack. This is a location in a program. This is generated by the stack profilers: heapprofd and traced_perf.

Column Type Description
id StackProfileFrameTable::Id Unique identifier for this stack_profile_frame.
name string Name of the function this location is in.
mapping StackProfileMappingTable::Id The mapping (library / binary) this location is in
Joinable with stack_profile_mapping.id
rel_pc int64_t The program counter relative to the start of the mapping.
symbol_set_id uint32_t
optional
If the profile was offline symbolized, the offline symbol information of this frame.
deobfuscated_name string
optional
Deobfuscated name of the function this location is in.

stack_profile_callsite

A callsite. This is a list of frames that were on the stack. This is generated by the stack profilers: heapprofd and traced_perf.

Column Type Description
id StackProfileCallsiteTable::Id Unique identifier for this stack_profile_callsite.
depth uint32_t Distance from the bottom-most frame of the callstack.
parent_id StackProfileCallsiteTable::Id
optional
Parent frame on the callstack. NULL for the bottom-most
Joinable with stack_profile_callsite.id
frame_id StackProfileFrameTable::Id Frame at this position in the callstack
Joinable with stack_profile_frame.id

cpu_profile_stack_sample

Table containing stack samples from CPU profiling.

Column Type Description
id CpuProfileStackSampleTable::Id Unique identifier for this cpu_profile_stack_sample.
ts int64_t timestamp of the sample.
callsite_id StackProfileCallsiteTable::Id unwound callstack
Joinable with stack_profile_callsite.id
utid uint32_t thread that was active when the sample was taken.
process_priority int32_t

instruments_sample

Samples from MacOS Instruments.

Column Type Description
id InstrumentsSampleTable::Id Unique identifier for this instruments_sample.
ts int64_t Timestamp of the sample.
utid uint32_t Sampled thread.
cpu uint32_t
optional
Core the sampled thread was running on.
callsite_id StackProfileCallsiteTable::Id
optional
If set, unwound callstack of the sampled thread
Joinable with stack_profile_callsite.id

heap_profile_allocation

Allocations that happened at a callsite.

NOTE: this table is not sorted by timestamp intentionanlly - see b/193757386 for details.

This is generated by heapprofd.

Column Type Description
id HeapProfileAllocationTable::Id Unique identifier for this heap_profile_allocation.
ts int64_t The timestamp the allocations happened at. heapprofd batches allocations and frees, and all data from a dump will have the same timestamp.
upid uint32_t The unique PID of the allocating process.
heap_name string
callsite_id StackProfileCallsiteTable::Id The callsite the allocation happened at
Joinable with stack_profile_callsite.id
count int64_t If positive: number of allocations that happened at this callsite. if negative: number of allocations that happened at this callsite that were freed.
size int64_t If positive: size of allocations that happened at this callsite. if negative: size of allocations that happened at this callsite that were freed.

perf_session

Perf sessions.

Column Type Description
id PerfSessionTable::Id Unique identifier for this perf_session.
cmdline string
optional
Command line used to collect the data.

perf_sample

Samples from the traced_perf profiler.

Column Type Description
id PerfSampleTable::Id Unique identifier for this perf_sample.
ts int64_t Timestamp of the sample.
utid uint32_t Sampled thread.
cpu uint32_t
optional
Core the sampled thread was running on.
cpu_mode string Execution state (userspace/kernelspace) of the sampled thread.
callsite_id StackProfileCallsiteTable::Id
optional
If set, unwound callstack of the sampled thread
Joinable with stack_profile_callsite.id
unwind_error string
optional
If set, indicates that the unwinding for this sample encountered an error. Such samples still reference the best-effort result via the callsite_id, with a synthetic error frame at the point where unwinding stopped.
perf_session_id PerfSessionTable::Id Distinguishes samples from different profiling streams (i.e. multiple data sources)
Joinable with perf_session.id

profiler_smaps

The profiler smaps contains the memory stats for virtual memory ranges captured by the heap profiler.

Column Type Description
id ProfilerSmapsTable::Id Unique identifier for this profiler_smaps.
upid uint32_t The unique PID of the process.
ts int64_t Timestamp of the snapshot. Multiple rows will have the same timestamp.
path string The mmaped file, as per /proc/pid/smaps.
size_kb int64_t Total size of the mapping.
private_dirty_kb int64_t KB of this mapping that are private dirty RSS.
swap_kb int64_t KB of this mapping that are in swap.
file_name string
start_address int64_t
module_timestamp int64_t
module_debugid string
module_debug_path string
protection_flags int64_t
private_clean_resident_kb int64_t
shared_dirty_resident_kb int64_t
shared_clean_resident_kb int64_t
locked_kb int64_t
proportional_resident_kb int64_t

stack_profile_symbol

Symbolization data for a frame. Rows with the same symbol_set_id describe one callframe, with the most-inlined symbol having id == symbol_set_id.

For instance, if the function foo has an inlined call to the function bar, which has an inlined call to baz, the stack_profile_symbol table would look like this.

|id|symbol_set_id|name |source_file|line_number| |--|-------------|-------------|-----------|-----------| |1 | 1 |baz |foo.cc | 36 | |2 | 1 |bar |foo.cc | 30 | |3 | 1 |foo |foo.cc | 60 |
Column Type Description
id SymbolTable::Id Unique identifier for this stack_profile_symbol.
symbol_set_id uint32_t
name string name of the function.
source_file string
optional
name of the source file containing the function.
line_number uint32_t
optional
line number of the frame in the source file. This is the exact line for the corresponding program counter, not the beginning of the function.

Memory Snapshots

memory_snapshot

Column Type Description
id MemorySnapshotTable::Id Unique identifier for this memory_snapshot.
timestamp int64_t
track_id TrackTable::Id Joinable with __intrinsic_track.id
detail_level string

process_memory_snapshot

Column Type Description
id ProcessMemorySnapshotTable::Id Unique identifier for this process_memory_snapshot.
snapshot_id MemorySnapshotTable::Id Joinable with memory_snapshot.id
upid uint32_t

memory_snapshot_node

Column Type Description
id MemorySnapshotNodeTable::Id Unique identifier for this memory_snapshot_node.
process_snapshot_id ProcessMemorySnapshotTable::Id Joinable with process_memory_snapshot.id
parent_node_id MemorySnapshotNodeTable::Id
optional
Joinable with memory_snapshot_node.id
path string
size int64_t
effective_size int64_t
arg_set_id uint32_t
optional

memory_snapshot_edge

Column Type Description
id MemorySnapshotEdgeTable::Id Unique identifier for this memory_snapshot_edge.
source_node_id MemorySnapshotNodeTable::Id Joinable with memory_snapshot_node.id
target_node_id MemorySnapshotNodeTable::Id Joinable with memory_snapshot_node.id
importance uint32_t

Metadata

machine

Contains raw machine_id of trace packets emitted from remote machines.

Column Type Description
id MachineTable::Id Unique identifier for this machine.
raw_id uint32_t Raw machine identifier in the trace packet, non-zero for remote machines.

process

Contains information of processes seen during the trace

Column Type Description
upid ProcessTable::Id Unique process id. This is != the OS pid. This is a monotonic number associated to each process. The OS process id (pid) cannot be used as primary key because tids and pids are recycled by most kernels.
pid uint32_t The OS id for this process. Note: this is not unique over the lifetime of the trace so cannot be used as a primary key. Use |upid| instead.
name string
optional
The name of the process. Can be populated from many sources (e.g. ftrace, /proc scraping, track event etc).
start_ts int64_t
optional
The start timestamp of this process (if known). Is null in most cases unless a process creation event is enabled (e.g. task_newtask ftrace event on Linux/Android).
end_ts int64_t
optional
The end timestamp of this process (if known). Is null in most cases unless a process destruction event is enabled (e.g. sched_process_free ftrace event on Linux/Android).
parent_upid ProcessTable::Id
optional
The upid of the process which caused this process to be spawned
Joinable with process.upid
uid uint32_t
optional
The Unix user id of the process
Joinable with package_list.uid
android_appid uint32_t
optional
Android appid of this process.
cmdline string
optional
/proc/cmdline for this process.
arg_set_id uint32_t Extra args for this process
Joinable with args.arg_set_id
machine_id MachineTable::Id
optional
Machine identifier, non-null for processes on a remote machine
Joinable with machine.id

thread

Contains information of threads seen during the trace

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

filedescriptor

Contains information of filedescriptors collected during the trace

Column Type Description
id FiledescriptorTable::Id Unique identifier for this filedescriptor.
ufd int64_t Unique fd. This is != the OS fd
This is a monotonic number associated to each filedescriptor. The OS assigned fd cannot be used as primary key because fds are recycled by most kernels.
fd int64_t The OS id for this process. Note: this is not unique over the lifetime of the trace so cannot be used as a primary key. Use |ufd| instead.
ts int64_t
optional
The timestamp for when the fd was collected.
upid uint32_t
optional
The upid of the process which opened the filedescriptor.
path string
optional
The path to the file or device backing the fd In case this was a socket the path will be the port number.

metadata

Column Type Description
id MetadataTable::Id Unique identifier for this metadata.
name string
key_type string
int_value int64_t
optional
str_value string
optional

Slice

actual_frame_timeline_slice

Extends slice

This table contains information on the actual timeline and additional analysis related to the performance of either a display frame or a surface frame.

Column Type Description
display_frame_token int64_t Display frame token (vsync id).
surface_frame_token int64_t Surface frame token (vsync id), null if this is a display frame.
upid uint32_t Unique process id of the app that generates the surface frame.
layer_name string Layer name if this is a surface frame.
present_type string Frame's present type (eg. on time / early / late).
on_time_finish int32_t Whether the frame finishes on time.
gpu_composition int32_t Whether the frame used gpu composition.
jank_type string Specify the jank types for this frame if there's jank, or none if no jank occurred.
jank_severity_type string Severity of the jank: none if no jank.
prediction_type string Frame's prediction type (eg. valid / expired).
jank_tag string Jank tag based on jank type, used for slice visualization.
Columns inherited from slice
id SliceTable::Id Unique identifier for this slice.
ts int64_t The timestamp at the start of the slice (in nanoseconds).
dur int64_t The duration of the slice (in nanoseconds).
track_id TrackTable::Id The id of the track this slice is located on
Joinable with __intrinsic_track.id
category string
optional
The "category" of the slice. If this slice originated with track_event, this column contains the category emitted
Otherwise, it is likely to be null (with limited exceptions).
name string
optional
The name of the slice. The name describes what was happening during the slice.
depth uint32_t The depth of the slice in the current stack of slices.
stack_id int64_t 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 int64_t The stack_id for the parent of this slice. Rarely useful.
parent_id SliceTable::Id
optional
The id of the parent (i.e. immediate ancestor) slice for this slice
Joinable with slice.id
arg_set_id uint32_t The id of the argument set associated with this slice
Joinable with args.arg_set_id
thread_ts int64_t
optional
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 int64_t
optional
' The thread time used by this slice. This column will only be populated if thread timestamp collection is enabled with track_event.
thread_instruction_count int64_t
optional
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 int64_t
optional
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.

android_network_packets

Extends slice

This table contains details on Android Network activity.

Column Type Description
iface string The name of the network interface used
direction string The direction of traffic (Received or Transmitted)
packet_transport string The transport protocol of packets in this event
packet_length int64_t The length (in bytes) of packets in this event
packet_count int64_t The number of packets contained in this event
socket_tag uint32_t The Android network tag of the socket
socket_tag_str string The socket tag formatted as a hex string
socket_uid uint32_t The Linux user id of the socket
local_port uint32_t
optional
The local udp/tcp port
remote_port uint32_t
optional
The remote udp/tcp port
packet_icmp_type uint32_t
optional
The 1-byte ICMP type identifier
packet_icmp_code uint32_t
optional
The 1-byte ICMP code identifier
packet_tcp_flags uint32_t
optional
The TCP flags as an integer bitmask (FIN=0x1, SYN=0x2, etc)
packet_tcp_flags_str string
optional
The TCP flags formatted as a string bitmask (e.g. "f...a..." for FIN & ACK)
Columns inherited from slice
id SliceTable::Id Unique identifier for this slice.
ts int64_t The timestamp at the start of the slice (in nanoseconds).
dur int64_t The duration of the slice (in nanoseconds).
track_id TrackTable::Id The id of the track this slice is located on
Joinable with __intrinsic_track.id
category string
optional
The "category" of the slice. If this slice originated with track_event, this column contains the category emitted
Otherwise, it is likely to be null (with limited exceptions).
name string
optional
The name of the slice. The name describes what was happening during the slice.
depth uint32_t The depth of the slice in the current stack of slices.
stack_id int64_t 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 int64_t The stack_id for the parent of this slice. Rarely useful.
parent_id SliceTable::Id
optional
The id of the parent (i.e. immediate ancestor) slice for this slice
Joinable with slice.id
arg_set_id uint32_t The id of the argument set associated with this slice
Joinable with args.arg_set_id
thread_ts int64_t
optional
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 int64_t
optional
' The thread time used by this slice. This column will only be populated if thread timestamp collection is enabled with track_event.
thread_instruction_count int64_t
optional
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 int64_t
optional
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.

expected_frame_timeline_slice

Extends slice

This table contains information on the expected timeline of either a display frame or a surface frame.

Column Type Description
display_frame_token int64_t Display frame token (vsync id).
surface_frame_token int64_t Surface frame token (vsync id), null if this is a display frame.
upid uint32_t Unique process id of the app that generates the surface frame.
layer_name string Layer name if this is a surface frame.
Columns inherited from slice
id SliceTable::Id Unique identifier for this slice.
ts int64_t The timestamp at the start of the slice (in nanoseconds).
dur int64_t The duration of the slice (in nanoseconds).
track_id TrackTable::Id The id of the track this slice is located on
Joinable with __intrinsic_track.id
category string
optional
The "category" of the slice. If this slice originated with track_event, this column contains the category emitted
Otherwise, it is likely to be null (with limited exceptions).
name string
optional
The name of the slice. The name describes what was happening during the slice.
depth uint32_t The depth of the slice in the current stack of slices.
stack_id int64_t 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 int64_t The stack_id for the parent of this slice. Rarely useful.
parent_id SliceTable::Id
optional
The id of the parent (i.e. immediate ancestor) slice for this slice
Joinable with slice.id
arg_set_id uint32_t The id of the argument set associated with this slice
Joinable with args.arg_set_id
thread_ts int64_t
optional
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 int64_t
optional
' The thread time used by this slice. This column will only be populated if thread timestamp collection is enabled with track_event.
thread_instruction_count int64_t
optional
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 int64_t
optional
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.

gpu_slice

Extends slice

Column Type Description
context_id int64_t
optional
render_target int64_t
optional
render_target_name string
render_pass int64_t
optional
render_pass_name string
command_buffer int64_t
optional
command_buffer_name string
frame_id uint32_t
optional
submission_id uint32_t
optional
hw_queue_id int64_t
optional
upid uint32_t
optional
Unique process id of the app that generates this gpu render stage event.
render_subpasses string
Columns inherited from slice
id SliceTable::Id Unique identifier for this slice.
ts int64_t The timestamp at the start of the slice (in nanoseconds).
dur int64_t The duration of the slice (in nanoseconds).
track_id TrackTable::Id The id of the track this slice is located on
Joinable with __intrinsic_track.id
category string
optional
The "category" of the slice. If this slice originated with track_event, this column contains the category emitted
Otherwise, it is likely to be null (with limited exceptions).
name string
optional
The name of the slice. The name describes what was happening during the slice.
depth uint32_t The depth of the slice in the current stack of slices.
stack_id int64_t 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 int64_t The stack_id for the parent of this slice. Rarely useful.
parent_id SliceTable::Id
optional
The id of the parent (i.e. immediate ancestor) slice for this slice
Joinable with slice.id
arg_set_id uint32_t The id of the argument set associated with this slice
Joinable with args.arg_set_id
thread_ts int64_t
optional
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 int64_t
optional
' The thread time used by this slice. This column will only be populated if thread timestamp collection is enabled with track_event.
thread_instruction_count int64_t
optional
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 int64_t
optional
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.

frame_slice

Extends slice

Column Type Description
frame_number uint32_t
layer_name string
queue_to_acquire_time int64_t
acquire_to_latch_time int64_t
latch_to_present_time int64_t
Columns inherited from slice
id SliceTable::Id Unique identifier for this slice.
ts int64_t The timestamp at the start of the slice (in nanoseconds).
dur int64_t The duration of the slice (in nanoseconds).
track_id TrackTable::Id The id of the track this slice is located on
Joinable with __intrinsic_track.id
category string
optional
The "category" of the slice. If this slice originated with track_event, this column contains the category emitted
Otherwise, it is likely to be null (with limited exceptions).
name string
optional
The name of the slice. The name describes what was happening during the slice.
depth uint32_t The depth of the slice in the current stack of slices.
stack_id int64_t 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 int64_t The stack_id for the parent of this slice. Rarely useful.
parent_id SliceTable::Id
optional
The id of the parent (i.e. immediate ancestor) slice for this slice
Joinable with slice.id
arg_set_id uint32_t The id of the argument set associated with this slice
Joinable with args.arg_set_id
thread_ts int64_t
optional
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 int64_t
optional
' The thread time used by this slice. This column will only be populated if thread timestamp collection is enabled with track_event.
thread_instruction_count int64_t
optional
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 int64_t
optional
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.

Winscope

protolog

Protolog

Column Type Description
id ProtoLogTable::Id Unique identifier for this protolog.
ts int64_t The timestamp the log message was sent
level string The log level of the protolog message
tag string The log tag of the protolog message
message string The protolog message
stacktrace string Stacktrace captured at the message's logpoint
location string The location of the logpoint (only for processed messages)

surfaceflinger_layers_snapshot

SurfaceFlinger layers snapshot

Column Type Description
id SurfaceFlingerLayersSnapshotTable::Id Unique identifier for this surfaceflinger_layers_snapshot.
ts int64_t Timestamp of the snapshot
arg_set_id uint32_t Extra args parsed from the proto message
base64_proto string Raw proto message encoded in base64
base64_proto_id uint32_t
optional
String id for raw proto message

surfaceflinger_layer

SurfaceFlinger layer

Column Type Description
id SurfaceFlingerLayerTable::Id Unique identifier for this surfaceflinger_layer.
snapshot_id SurfaceFlingerLayersSnapshotTable::Id The snapshot that generated this layer Joinable with surfaceflinger_layers_snapshot.id
arg_set_id uint32_t Extra args parsed from the proto message
base64_proto string Raw proto message encoded in base64
base64_proto_id uint32_t
optional
String id for raw proto message

surfaceflinger_transactions

SurfaceFlinger transactions. Each row contains a set of transactions that SurfaceFlinger committed together.

Column Type Description
id SurfaceFlingerTransactionsTable::Id Unique identifier for this surfaceflinger_transactions.
ts int64_t Timestamp of the transactions commit
arg_set_id uint32_t Extra args parsed from the proto message
base64_proto string Raw proto message encoded in base64
base64_proto_id uint32_t
optional
String id for raw proto message

window_manager_shell_transitions

Window Manager Shell Transitions

Column Type Description
id WindowManagerShellTransitionsTable::Id Unique identifier for this window_manager_shell_transitions.
ts int64_t The timestamp the transition started playing
transition_id int64_t The id of the transition
arg_set_id uint32_t Extra args parsed from the proto message
base64_proto string Raw proto message encoded in base64
base64_proto_id uint32_t
optional
String id for raw proto message

window_manager_shell_transition_handlers

Window Manager Shell Transition Handlers

Column Type Description
id WindowManagerShellTransitionHandlersTable::Id Unique identifier for this window_manager_shell_transition_handlers.
handler_id int64_t The id of the handler
handler_name string The name of the handler
base64_proto string Raw proto message encoded in base64
base64_proto_id uint32_t
optional
String id for raw proto message

windowmanager

WindowManager

Column Type Description
id WindowManagerTable::Id Unique identifier for this windowmanager.
ts int64_t The timestamp the state snapshot was captured
arg_set_id uint32_t Extra args parsed from the proto message
base64_proto string Raw proto message encoded in base64
base64_proto_id uint32_t
optional
String id for raw proto message

Misc

flow

Column Type Description
id FlowTable::Id Unique identifier for this flow.
slice_out SliceTable::Id Id of the slice that this flow flows out of
Joinable with slice.id
slice_in SliceTable::Id If of the slice that this flow flows into
Joinable with slice.id
trace_id int64_t
optional
Ids (raw values passed from the trace) of flows originating, passing through, or ending at this event. They are global within a trace. NULL if flow was "implicitly created", e.g came from Trace Processor inferring a link between binder transaction slices.
arg_set_id uint32_t

args

Column Type Description
id ArgTable::Id Unique identifier for this args.
arg_set_id uint32_t
flat_key string
key string
int_value int64_t
optional
string_value string
optional
real_value double
optional
value_type string

clock_snapshot

Contains all the mapping between clock snapshots and trace time.

NOTE: this table is not sorted by timestamp; this is why we omit the sorted flag on the ts column.

Column Type Description
id ClockSnapshotTable::Id Unique identifier for this clock_snapshot.
ts int64_t timestamp of the snapshot in trace time.
clock_id int64_t id of the clock (corresponds to the id in the trace).
clock_name string
optional
the name of the clock for builtin clocks or null otherwise.
clock_value int64_t timestamp of the snapshot in clock time.
snapshot_id uint32_t the index of this snapshot (only useful for debugging)
machine_id MachineTable::Id
optional
Machine identifier, non-null for clock snapshots on a remote machine
Joinable with machine.id

cpu

Contains information of processes seen during the trace

Column Type Description
id CpuTable::Id Unique identifier for this cpu.
cpu uint32_t
optional
the index (0-based) of the CPU core on the device
cluster_id uint32_t the cluster id is shared by CPUs in the same cluster
processor string a string describing this core
machine_id MachineTable::Id
optional
Machine identifier, non-null for CPUs on a remote machine
Joinable with machine.id
capacity uint32_t
optional
Capacity of a CPU of a device, a metric which indicates the relative performance of a CPU on a device For details see: https://www.kernel.org/doc/Documentation/devicetree/bindings/arm/cpu-capacity.txt
arg_set_id uint32_t
optional
Extra args associated with the CPU

cpu_freq

Column Type Description
id CpuFreqTable::Id Unique identifier for this cpu_freq.
ucpu CpuTable::Id Joinable with cpu.id
freq uint32_t

trace_file

Metadata related to the trace file parsed. Note the order in which the files appear in this table corresponds to the order in which they are read and sent to the tokenization stage.

Column Type Description
id TraceFileTable::Id Unique identifier for this trace_file.
parent_id TraceFileTable::Id
optional
Parent file. E.g. files contained in a zip file will point to the zip file
Joinable with trace_file.id
name string
optional
File name, if known, NULL otherwise
size int64_t Size in bytes
trace_type string Trace type
processing_order int64_t
optional
In which order where the files were processed.

gpu_counter_group

Column Type Description
id GpuCounterGroupTable::Id Unique identifier for this gpu_counter_group.
group_id int32_t
track_id TrackTable::Id Joinable with __intrinsic_track.id

package_list

Metadata about packages installed on the system. This is generated by the packages_list data-source.

Column Type Description
id PackageListTable::Id Unique identifier for this package_list.
package_name string name of the package, e.g. com.google.android.gm.
uid int64_t UID processes of this package run as.
debuggable int32_t bool whether this app is debuggable.
profileable_from_shell int32_t bool whether this app is profileable.
version_code int64_t versionCode from the APK.

vulkan_memory_allocations

Column Type Description
id VulkanMemoryAllocationsTable::Id Unique identifier for this vulkan_memory_allocations.
arg_set_id uint32_t
optional
source string
operation string
timestamp int64_t
upid uint32_t
optional
device int64_t
optional
device_memory int64_t
optional
memory_type uint32_t
optional
heap uint32_t
optional
function_name string
optional
object_handle int64_t
optional
memory_address int64_t
optional
memory_size int64_t
optional
scope string