blob: 551c3cd6f6bb0625c881c33a818e01244dcb1ca3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
|
# Copyright (C) 2019 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# proto-message: TraceConfig
# Enable periodic flushing of the trace buffer into the output file.
write_into_file: true
# Writes the userspace buffer into the file every 1s.
file_write_period_ms: 1000
# See b/126487238 - we need to guarantee ordering of events.
flush_period_ms: 10000
# The trace buffers needs to be big enough to hold |file_write_period_ms| of
# trace data. The trace buffer sizing depends on the number of trace categories
# enabled and the device activity.
# RSS events
buffers {
size_kb: 32768
fill_policy: RING_BUFFER
}
# procfs polling
buffers {
size_kb: 8192
fill_policy: RING_BUFFER
}
data_sources {
config {
name: "linux.ftrace"
target_buffer: 0
ftrace_config {
throttle_rss_stat: true
# These parameters affect only the kernel trace buffer size and how
# frequently it gets moved into the userspace buffer defined above.
buffer_size_kb: 16384
drain_period_ms: 250
# Store certain high-volume "sched" ftrace events in a denser format
# (falling back to the default format if not supported by the tracer).
compact_sched {
enabled: true
}
# Enables symbol name resolution against /proc/kallsyms
symbolize_ksyms: true
# Parse kallsyms before acknowledging that the ftrace data source has been started. In
# combination with "perfetto --background-wait" as the consumer, it lets us defer the
# test we're tracing until after the cpu has quieted down from the cpu-bound kallsyms parsing.
initialize_ksyms_synchronously_for_testing: true
# Avoid re-parsing kallsyms on every test run, as it takes 200-500ms per run. See b/239951079
ksyms_mem_policy: KSYMS_RETAIN
# We need to do process tracking to ensure kernel ftrace events targeted at short-lived
# threads are associated correctly
ftrace_events: "task/task_newtask"
ftrace_events: "task/task_rename"
ftrace_events: "sched/sched_process_exit"
ftrace_events: "sched/sched_process_free"
# Memory events
ftrace_events: "rss_stat"
ftrace_events: "ion_heap_shrink"
ftrace_events: "ion_heap_grow"
ftrace_events: "ion/ion_stat"
ftrace_events: "dmabuf_heap/dma_heap_stat"
ftrace_events: "oom_score_adj_update"
ftrace_events: "gpu_mem/gpu_mem_total"
ftrace_events: "fastrpc/fastrpc_dma_stat"
# Power events
ftrace_events: "power/suspend_resume"
ftrace_events: "power/cpu_frequency"
ftrace_events: "power/cpu_idle"
ftrace_events: "power/gpu_frequency"
# Old (kernel) LMK
ftrace_events: "lowmemorykiller/lowmemory_kill"
atrace_apps: "*"
atrace_categories: "am"
atrace_categories: "aidl"
atrace_categories: "bionic"
atrace_categories: "camera"
atrace_categories: "wm"
atrace_categories: "dalvik"
atrace_categories: "sched"
atrace_categories: "freq"
atrace_categories: "gfx"
atrace_categories: "video"
atrace_categories: "view"
atrace_categories: "webview"
atrace_categories: "input"
atrace_categories: "hal"
atrace_categories: "binder_driver"
atrace_categories: "sync"
atrace_categories: "workq"
atrace_categories: "res"
atrace_categories: "power"
}
}
}
data_sources: {
config {
name: "android.gpu.memory"
target_buffer: 0
}
}
data_sources {
config {
name: "linux.process_stats"
target_buffer: 1
process_stats_config {
proc_stats_poll_ms: 10000
}
}
}
data_sources {
config {
name: "linux.sys_stats"
target_buffer: 1
sys_stats_config {
meminfo_period_ms: 1000
meminfo_counters: MEMINFO_MEM_TOTAL
meminfo_counters: MEMINFO_MEM_FREE
meminfo_counters: MEMINFO_MEM_AVAILABLE
meminfo_counters: MEMINFO_BUFFERS
meminfo_counters: MEMINFO_CACHED
meminfo_counters: MEMINFO_SWAP_CACHED
meminfo_counters: MEMINFO_ACTIVE
meminfo_counters: MEMINFO_INACTIVE
meminfo_counters: MEMINFO_ACTIVE_ANON
meminfo_counters: MEMINFO_INACTIVE_ANON
meminfo_counters: MEMINFO_ACTIVE_FILE
meminfo_counters: MEMINFO_INACTIVE_FILE
meminfo_counters: MEMINFO_UNEVICTABLE
meminfo_counters: MEMINFO_SWAP_TOTAL
meminfo_counters: MEMINFO_SWAP_FREE
meminfo_counters: MEMINFO_DIRTY
meminfo_counters: MEMINFO_WRITEBACK
meminfo_counters: MEMINFO_ANON_PAGES
meminfo_counters: MEMINFO_MAPPED
meminfo_counters: MEMINFO_SHMEM
}
}
}
data_sources: {
config: {
name: "android.surfaceflinger.frametimeline"
}
}
data_sources: {
config {
name: "android.power"
target_buffer: 1
android_power_config {
battery_poll_ms: 1000
collect_power_rails: true
battery_counters: BATTERY_COUNTER_CAPACITY_PERCENT
battery_counters: BATTERY_COUNTER_CHARGE
battery_counters: BATTERY_COUNTER_CURRENT
}
}
}
data_sources: {
config: {
name: "track_event"
}
}
|