blob: db2322c253364f37f0118e5baa3dc083681846b0 [file] [log] [blame]
# This is inspired from the internal config: go/perfetto-aot-merged-config, docs/long-traces.md
# Enable periodic flushing of the trace buffer into the output file.
write_into_file: true
# Max duration: 30 mins.
duration_ms: 1800000
# Writes the userspace buffer into the file every 2 seconds.
# The data rate of a typical trace is ~1-4 MB/s. So a 8MB in-memory buffer can hold for up
# write periods of ~2 seconds before starting to lose data.
# See https://perfetto.dev/docs/concepts/config#long-traces.
file_write_period_ms: 2000
# We need to guarantee that events stay within some defined sorting window (for the importer).
flush_period_ms: 20000
# Stops the tracing session after 300,000,000 bytes have been written.
max_file_size_bytes: 300000000
# Buffer 0: for process stats, system stats.
buffers {
size_kb: 7168
fill_policy: RING_BUFFER
}
# Buffer 1: for ftrace.
buffers {
size_kb: 7168
fill_policy: RING_BUFFER
}
# Buffer 2: for chromium trace and metadata.
buffers {
size_kb: 14336
fill_policy: RING_BUFFER
}
# Scheduling details.
data_sources: {
config {
name: "linux.process_stats"
target_buffer: 0
process_stats_config {
scan_all_processes_on_start: true
proc_stats_poll_ms: 1000
}
}
}
# Coarse CPU usage counter, kernel meminfo and virtual memory stats.
data_sources: {
config {
name: "linux.sys_stats"
target_buffer: 0
sys_stats_config {
meminfo_period_ms: 1000
vmstat_period_ms: 1000
stat_period_ms: 1000
stat_counters: STAT_CPU_TIMES
stat_counters: STAT_FORK_COUNT
}
}
}
# Ftrace.
data_sources: {
config {
name: "linux.ftrace"
target_buffer: 1
ftrace_config {
# Enables symbol name resolution against /proc/kallsyms.
symbolize_ksyms: true
# Scheduling information & process tracking. Useful for:
# - what is happening on each CPU at each moment
# - why a thread was descheduled
# - parent/child relationships between processes and threads.
ftrace_events: "power/suspend_resume"
ftrace_events: "sched/sched_blocked_reason"
ftrace_events: "sched/sched_process_free"
ftrace_events: "sched/sched_switch"
ftrace_events: "task/task_newtask"
ftrace_events: "task/task_rename"
# User process page faults.
ftrace_events: "exceptions/page_fault_user"
# Wakeup info. Allows you to compute how long a task was
# blocked due to CPU contention.
ftrace_events: "sched/sched_waking"
ftrace_events: "sched/sched_wakeup_new"
# Cpu events.
ftrace_events: "power/cpu_frequency"
ftrace_events: "power/cpu_idle"
compact_sched {
# When enabled, specific high-volume events are encoded in a denser format than normal.
enabled: true
}
}
}
}
# Chrome trace events.
data_sources: {
config {
name: "org.chromium.trace_event"
target_buffer: 0
chrome_config {
# Categories: toplevel, cc, gpu, viz, ui, views, benchmark, input, memory-infra.
trace_config: "{\"record_mode\":\"record-until-full\",\"included_categories\":[\"toplevel\",\"cc\",\"gpu\",\"viz\",\"ui\",\"views\",\"benchmark\",\"input\",\"memory-infra\"],\"memory_dump_config\":{}}"
# When enabled, the data source should only fill in fields in the output that are not potentially privacy sensitive.
privacy_filtering_enabled: false
# Don't convert the trace data to the legacy JSON format.
convert_to_legacy_json: false
# Priority of the tracing session client.
client_priority: UNKNOWN
}
}
}
# Chrome trace metadata.
data_sources: {
config {
name: "org.chromium.trace_metadata"
target_buffer: 0
chrome_config {
# Categories: toplevel, cc, gpu, viz, ui, views, benchmark, input, memory-infra.
trace_config: "{\"record_mode\":\"record-until-full\",\"included_categories\":[\"toplevel\",\"cc\",\"gpu\",\"viz\",\"ui\",\"views\",\"benchmark\",\"input\",\"memory-infra\"],\"memory_dump_config\":{}}"
# When enabled, the data source should only fill in fields in the output that are not potentially privacy sensitive.
privacy_filtering_enabled: false
# Don't convert the trace data to the legacy JSON format.
convert_to_legacy_json: false
# Priority of the tracing session client.
client_priority: UNKNOWN
}
}
}