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 15buffers: { 16 size_kb: 204800 17 fill_policy: RING_BUFFER 18} 19buffers: { 20 size_kb: 204800 21 fill_policy: RING_BUFFER 22} 23data_sources: { 24 config { 25 name: "linux.process_stats" 26 target_buffer: 1 27 process_stats_config { 28 scan_all_processes_on_start: true 29 } 30 } 31} 32data_sources { 33 config { 34 name: "linux.system_info" 35 target_buffer: 1 36 } 37} 38data_sources: { 39 config { 40 name: "android.surfaceflinger.frametimeline" 41 } 42} 43data_sources { 44 config { 45 name: "track_event" 46 track_event_config { 47 disabled_categories:"*" 48 enabled_categories: "servicemanager" 49 } 50 } 51} 52data_sources: { 53 config { 54 name: "linux.sys_stats" 55 target_buffer: 1 56 sys_stats_config { 57 meminfo_period_ms: 1000 58 meminfo_counters: MEMINFO_ACTIVE_ANON 59 meminfo_counters: MEMINFO_ACTIVE_FILE 60 meminfo_counters: MEMINFO_INACTIVE_ANON 61 meminfo_counters: MEMINFO_INACTIVE_FILE 62 meminfo_counters: MEMINFO_KERNEL_STACK 63 meminfo_counters: MEMINFO_MLOCKED 64 meminfo_counters: MEMINFO_SHMEM 65 meminfo_counters: MEMINFO_SLAB 66 meminfo_counters: MEMINFO_SLAB_UNRECLAIMABLE 67 meminfo_counters: MEMINFO_VMALLOC_USED 68 meminfo_counters: MEMINFO_MEM_FREE 69 meminfo_counters: MEMINFO_SWAP_FREE 70 } 71 } 72} 73data_sources: { 74 config { 75 name: "linux.ftrace" 76 ftrace_config { 77 ftrace_events: "sched/sched_switch" 78 ftrace_events: "power/suspend_resume" 79 ftrace_events: "sched/sched_wakeup_new" 80 ftrace_events: "sched/sched_waking" 81 ftrace_events: "power/cpu_frequency" 82 ftrace_events: "power/cpu_idle" 83 ftrace_events: "mm_event/mm_event_record" 84 ftrace_events: "kmem/rss_stat" 85 ftrace_events: "ion/ion_stat" 86 ftrace_events: "dmabuf_heap/dma_heap_stat" 87 ftrace_events: "kmem/ion_heap_grow" 88 ftrace_events: "kmem/ion_heap_shrink" 89 ftrace_events: "sched/sched_migrate_task" 90 ftrace_events: "sched/sched_process_exit" 91 ftrace_events: "sched/sched_process_free" 92 ftrace_events: "task/task_newtask" 93 ftrace_events: "task/task_rename" 94 ftrace_events: "lowmemorykiller/lowmemory_kill" 95 ftrace_events: "oom/oom_score_adj_update" 96 ftrace_events: "sched/sched_blocked_reason" 97 ftrace_events: "workqueue/*" 98 ftrace_events: "f2fs/f2fs_iostat" 99 ftrace_events: "f2fs/f2fs_write_end" 100 ftrace_events: "vmscan/*" 101 ftrace_events: "ftrace/print" 102 ftrace_events: "power/wakeup_source_activate" 103 ftrace_events: "power/wakeup_source_deactivate" 104 atrace_categories: "aidl" 105 atrace_categories: "am" 106 atrace_categories: "dalvik" 107 atrace_categories: "binder_driver" 108 atrace_categories: "bionic" 109 atrace_categories: "camera" 110 atrace_categories: "gfx" 111 atrace_categories: "hal" 112 atrace_categories: "input" 113 atrace_categories: "network" 114 atrace_categories: "pm" 115 atrace_categories: "power" 116 atrace_categories: "res" 117 atrace_categories: "sm" 118 atrace_categories: "ss" 119 atrace_categories: "video" 120 atrace_categories: "view" 121 atrace_categories: "wm" 122 atrace_apps: "lmkd" 123 atrace_apps: "*" 124 buffer_size_kb: 16384 125 drain_period_ms: 250 126 throttle_rss_stat: true 127 symbolize_ksyms: true 128 ksyms_mem_policy: KSYMS_RETAIN 129 disable_generic_events: true 130 compact_sched { enabled: true } 131 preserve_ftrace_buffer: true 132 } 133 } 134} 135# 4m trace, but can be stopped prematurely via `adb shell pkill perfetto`. 136write_into_file: true 137duration_ms: 241000 138file_write_period_ms: 5000 139max_file_size_bytes: 1000000000 140flush_period_ms: 30000 141incremental_state_config { 142 clear_period_ms: 5000 143} 144