xref: /aosp_15_r20/prebuilts/tools/linux-x86_64/perfetto/configs/trace_config_boot_time.textproto (revision 6774467a9462441f7cd7fbc651979727f762377a)
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: "linux.ftrace"
46        ftrace_config {
47            ftrace_events: "sched/sched_switch"
48            ftrace_events: "power/suspend_resume"
49            ftrace_events: "sched/sched_wakeup"
50            ftrace_events: "sched/sched_wakeup_new"
51            ftrace_events: "sched/sched_waking"
52            ftrace_events: "power/cpu_frequency"
53            ftrace_events: "power/cpu_idle"
54            ftrace_events: "mm_event/mm_event_record"
55            ftrace_events: "kmem/rss_stat"
56            ftrace_events: "ion/ion_stat"
57            ftrace_events: "dmabuf_heap/dma_heap_stat"
58            ftrace_events: "kmem/ion_heap_grow"
59            ftrace_events: "kmem/ion_heap_shrink"
60            ftrace_events: "sched/sched_migrate_task"
61            ftrace_events: "sched/sched_process_exit"
62            ftrace_events: "sched/sched_process_free"
63            ftrace_events: "task/task_newtask"
64            ftrace_events: "task/task_rename"
65            ftrace_events: "lowmemorykiller/lowmemory_kill"
66            ftrace_events: "oom/oom_score_adj_update"
67            ftrace_events: "sched/sched_blocked_reason"
68            ftrace_events: "workqueue/*"
69            ftrace_events: "f2fs/f2fs_iostat"
70            ftrace_events: "f2fs/f2fs_write_end"
71	    ftrace_events: "vmscan/*"
72            ftrace_events: "ftrace/print"
73	    ftrace_events: "power/wakeup_source_activate"
74            ftrace_events: "power/wakeup_source_deactivate"
75            atrace_categories: "aidl"
76            atrace_categories: "am"
77            atrace_categories: "dalvik"
78            atrace_categories: "binder_driver"
79            atrace_categories: "bionic"
80            atrace_categories: "camera"
81            atrace_categories: "gfx"
82            atrace_categories: "hal"
83            atrace_categories: "input"
84	    atrace_categories: "network"
85            atrace_categories: "pm"
86            atrace_categories: "power"
87            atrace_categories: "res"
88            atrace_categories: "sm"
89            atrace_categories: "ss"
90            atrace_categories: "video"
91            atrace_categories: "view"
92            atrace_categories: "wm"
93            atrace_apps: "lmkd"
94            atrace_apps: "*"
95            buffer_size_kb: 16384
96            drain_period_ms: 250
97            throttle_rss_stat: true
98            symbolize_ksyms: true
99            ksyms_mem_policy: KSYMS_RETAIN
100            disable_generic_events: true
101            compact_sched { enabled: true }
102            preserve_ftrace_buffer: true
103        }
104    }
105}
106# 40s trace, but can be stopped prematurely via `adb shell pkill perfetto`.
107file_write_period_ms: 5000
108max_file_size_bytes: 1000000000
109flush_period_ms: 30000
110incremental_state_config {
111    clear_period_ms: 5000
112}
113
114trigger_config {
115  trigger_mode: STOP_TRACING
116  triggers {
117    name: "boottrace_boot_completed"
118    stop_delay_ms: 15000
119  }
120  trigger_timeout_ms: 100000
121}
122