1# Copyright (C) 2024 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: 100 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 } 60 } 61} 62 63data_sources: { 64 config { 65 name: "android.surfaceflinger.layers" 66 surfaceflinger_layers_config: { 67 mode: MODE_ACTIVE 68 trace_flags: TRACE_FLAG_INPUT 69 trace_flags: TRACE_FLAG_BUFFERS 70 trace_flags: TRACE_FLAG_VIRTUAL_DISPLAYS 71 } 72 } 73} 74 75data_sources: { 76 config { 77 name: "android.surfaceflinger.transactions" 78 surfaceflinger_transactions_config: { 79 mode: MODE_ACTIVE 80 } 81 } 82} 83 84data_sources: { 85 config { 86 name: "com.android.wm.shell.transition" 87 } 88} 89 90data_sources: { 91 config { 92 name: "android.input.inputevent" 93 android_input_event_config { 94 mode: TRACE_MODE_TRACE_ALL 95 } 96 } 97} 98 99data_sources { 100 config { 101 name: "android.protolog" 102 protolog_config { 103 group_overrides { 104 group_name: "WM_ERROR" 105 log_from: PROTOLOG_LEVEL_VERBOSE 106 } 107 group_overrides { 108 group_name: "WM_DEBUG_ANIM" 109 log_from: PROTOLOG_LEVEL_INFO 110 } 111 default_log_from_level: PROTOLOG_LEVEL_DEBUG 112 } 113 } 114} 115