1# Copyright (C) 2023 The Android Open Source Project 2# 3# Licensed under the Apache License, Version 2.0 (the "License"); 4# you may not use this file except in compliance with the License. 5# You may obtain a copy of the License at 6# 7# http://www.apache.org/licenses/LICENSE-2.0 8# 9# Unless required by applicable law or agreed to in writing, software 10# distributed under the License is distributed on an "AS IS" BASIS, 11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12# See the License for the specific language governing permissions and 13# limitations under the License. 14 15# proto-message: TraceConfig 16 17# Enable periodic flushing of the trace buffer into the output file. 18write_into_file: true 19 20# Writes the userspace buffer into the file every 1s. 21file_write_period_ms: 2500 22 23# See b/126487238 - we need to guarantee ordering of events. 24flush_period_ms: 30000 25 26# The trace buffers needs to be big enough to hold |file_write_period_ms| of 27# trace data. The trace buffer sizing depends on the number of trace categories 28# enabled and the device activity. 29 30# RSS events 31buffers: { 32 size_kb: 63488 33 fill_policy: RING_BUFFER 34} 35 36data_sources { 37 config { 38 name: "linux.process_stats" 39 target_buffer: 0 40 # polled per-process memory counters and process/thread names. 41 # If you don't want the polled counters, remove the "process_stats_config" 42 # section, but keep the data source itself as it still provides on-demand 43 # thread/process naming for ftrace data below. 44 process_stats_config { 45 scan_all_processes_on_start: true 46 } 47 } 48} 49 50data_sources: { 51 config { 52 name: "linux.ftrace" 53 ftrace_config { 54 ftrace_events: "ftrace/print" 55 ftrace_events: "task/task_newtask" 56 ftrace_events: "task/task_rename" 57 atrace_categories: "ss" 58 atrace_categories: "wm" 59 atrace_categories: "am" 60 atrace_categories: "aidl" 61 atrace_categories: "input" 62 atrace_categories: "binder_driver" 63 atrace_categories: "sched_process_exit" 64 atrace_apps: "android.tools" 65 } 66 } 67} 68 69data_sources: { 70 config { 71 name: "android.surfaceflinger.layers" 72 surfaceflinger_layers_config: { 73 mode: MODE_ACTIVE 74 trace_flags: TRACE_FLAG_INPUT 75 trace_flags: TRACE_FLAG_BUFFERS 76 } 77 } 78} 79 80data_sources: { 81 config { 82 name: "android.surfaceflinger.transactions" 83 surfaceflinger_transactions_config: { 84 mode: MODE_ACTIVE 85 } 86 } 87} 88 89data_sources: { 90 config { 91 name: "com.android.wm.shell.transition" 92 } 93} 94 95data_sources: { 96 config { 97 name: "android.input.inputevent" 98 android_input_event_config { 99 mode: TRACE_MODE_TRACE_ALL 100 } 101 } 102} 103