1# Example config for a long trace periodically flushed into the 2# target file. See docs/long-traces.md for more. 3 4# Enable periodic flushing of the trace buffer into the output file. 5write_into_file: true 6 7# Max duration: 30 mins. 8duration_ms: 1800000 9 10# Writes the userspace buffer into the file every 2.5 seconds. 11file_write_period_ms: 2500 12 13# Commits the trace from the shared memory buffer to the central buffer 14# periodically. Otherwise, the --full-sort option will be required for 15# trace_processor_shell and traceconv when importing the trace. 16flush_period_ms: 20000 17 18# The trace buffers needs to be big enough to hold |file_write_period_ms| of 19# trace data. The trace buffer sizing depends on the number of trace categories 20# enabled and the device activity. A good rule of thumb is ~10-20 MB per second, 21# so if |file_write_period_ms| ~ 3s -> 30 MB. 22buffers { 23 size_kb: 32768 24 fill_policy: RING_BUFFER 25} 26 27# Enable various data sources as usual. 28data_sources { 29 config { 30 name: "linux.ftrace" 31 target_buffer: 0 32 ftrace_config { 33 # These parameters affect only the kernel trace buffer size and how 34 # frequently it gets moved into the userspace buffer defined above. 35 buffer_size_kb: 16384 36 drain_period_ms: 250 37 ftrace_events: "cpu_frequency" 38 ftrace_events: "cpu_idle" 39 ftrace_events: "sched_process_exec" 40 ftrace_events: "sched_process_exit" 41 ftrace_events: "sched_process_fork" 42 ftrace_events: "sched_process_free" 43 ftrace_events: "sched_process_hang" 44 ftrace_events: "sched_process_wait" 45 ftrace_events: "sched_switch" 46 ftrace_events: "sched_wakeup_new" 47 ftrace_events: "sched_wakeup" 48 ftrace_events: "sched_waking" 49 ftrace_events: "task_newtask" 50 ftrace_events: "task_rename" 51 ftrace_events: "tracing_mark_write" 52 } 53 } 54} 55 56data_sources { 57 config { 58 name: "linux.process_stats" 59 target_buffer: 0 60 } 61} 62