# Long / field trace: runs until stopped, keeps the most recent data in a
# ring buffer, and periodically flushes to the output file so the trace
# survives longer than RAM allows.
buffers {
size_kb: 65536
fill_policy: RING_BUFFER
}
# No duration_ms: stop manually (Ctrl-C on record_android_trace), or add one.
# Move data to the output file periodically instead of only at the end.
write_into_file: true
file_write_period_ms: 2500
# Commit app shared-memory buffers periodically so events stay ordered.
flush_period_ms: 30000
# Stop when the output file reaches this size (bytes).
max_file_size_bytes: 1000000000
data_sources {
config {
name: "linux.ftrace"
ftrace_config {
ftrace_events: "sched/sched_switch"
ftrace_events: "sched/sched_wakeup"
ftrace_events: "power/cpu_frequency"
ftrace_events: "power/cpu_idle"
}
}
}
data_sources {
config {
name: "linux.process_stats"
process_stats_config {
scan_all_processes_on_start: true
}
}
}
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2026-10-07 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2026-10-07 UTC."],[],[]]