blob: d3b726964c796843847162ce990263e83ddd5f61 [file]
# Copyright (C) 2025 Google LLC.
#
# 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.
buffers {
size_kb: 65536
fill_policy: RING_BUFFER
}
# procfs polling
buffers {
size_kb: 8192
fill_policy: RING_BUFFER
}
buffers {
size_kb: 10240
fill_policy: RING_BUFFER
}
# Frame timeline and CPU samples on binder transactions
buffers {
size_kb: 40960
fill_policy: RING_BUFFER
}
# Buffer for native heap profiling data
buffers {
size_kb: 65536
fill_policy: RING_BUFFER
}
data_sources {
config {
name: "linux.ftrace"
target_buffer: 0
ftrace_config {
# These parameters affect only the kernel trace buffer size and how
# frequently it gets moved into the userspace buffer defined above.
buffer_size_kb: 65536
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
}
symbolize_ksyms:true
# 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"
# sched events for performacne debugging
ftrace_events: "sched/sched_blocked_reason"
ftrace_events: "sched/sched_find_energy_efficient_cpu"
ftrace_events: "sched/sched_wakeup_task_attr"
ftrace_events: "perf_trace_counters/sched_switch_with_ctrs"
ftrace_events: "power/gpu_work_period"
# Added for power wattson
ftrace_events: "devfreq/devfreq_frequency"
# Added for storage issues debugging
ftrace_events: "ufs/ufshcd_command"
# New (userspace) LMK
atrace_apps: "lmkd"
atrace_categories: "aidl"
atrace_categories: "am"
atrace_categories: "binder_driver"
atrace_categories: "binder_lock"
atrace_categories: "camera"
atrace_categories: "cpm"
atrace_categories: "dalvik"
atrace_categories: "freq"
atrace_categories: "gfx"
atrace_categories: "hal"
atrace_categories: "idle"
atrace_categories: "input"
atrace_categories: "power"
atrace_categories: "sched"
atrace_categories: "ss"
atrace_categories: "sync"
atrace_categories: "view"
atrace_categories: "webview"
atrace_categories: "wm"
atrace_categories: "workq"
}
}
}
data_sources {
config {
name: "linux.process_stats"
target_buffer: 1
process_stats_config {
proc_stats_poll_ms: 10000
}
}
}
data_sources {
config {
name: "android.packages_list"
target_buffer: 1
}
}
data_sources {
config {
name: "linux.system_info"
target_buffer: 1
}
}
data_sources {
config {
name: "android.surfaceflinger.frametimeline"
target_buffer: 2
}
}
# Take CPU sample on every binder transaction
data_sources: {
config {
name: "linux.perf"
target_buffer: 3
perf_event_config {
ring_buffer_pages: 8192
target_cmdline: "android.app.memory.testhelper"
timebase {
tracepoint {
name: "binder:binder_transaction"
}
period: 1
}
callstack_sampling {
kernel_frames: false
}
max_daemon_memory_kb: 524288
}
}
}
# Native heap allocations
data_sources {
config {
name: "android.heapprofd"
target_buffer: 4
heapprofd_config {
process_cmdline: "android.app.memory.testhelper"
sampling_interval_bytes: 16384
shmem_size_bytes: 67108864
all_heaps: false
}
}
}