Skip to content

Instantly share code, notes, and snippets.

@abhaysood
Last active June 21, 2024 13:42
Show Gist options
  • Save abhaysood/7731cdfa61c200dcf2ec8054405fed8a to your computer and use it in GitHub Desktop.
Save abhaysood/7731cdfa61c200dcf2ec8054405fed8a to your computer and use it in GitHub Desktop.
A perfetto config for Android
buffers: {
size_kb: 260096
fill_policy: DISCARD
}
buffers: {
size_kb: 2048
fill_policy: DISCARD
}
data_sources: {
config {
name: "android.packages_list"
target_buffer: 1
}
}
data_sources: {
config {
name: "android.gpu.memory"
}
}
data_sources: {
config {
name: "android.power"
android_power_config {
battery_poll_ms: 1000
battery_counters: BATTERY_COUNTER_CAPACITY_PERCENT
battery_counters: BATTERY_COUNTER_CHARGE
battery_counters: BATTERY_COUNTER_CURRENT
collect_power_rails: true
}
}
}
data_sources: {
config {
name: "linux.process_stats"
target_buffer: 1
process_stats_config {
scan_all_processes_on_start: true
proc_stats_poll_ms: 1000
}
}
}
data_sources: {
config {
name: "android.log"
android_log_config {
}
}
}
data_sources: {
config {
name: "android.surfaceflinger.frametimeline"
}
}
data_sources: {
config {
name: "linux.sys_stats"
sys_stats_config {
stat_period_ms: 1000
stat_counters: STAT_CPU_TIMES
stat_counters: STAT_FORK_COUNT
cpufreq_period_ms: 1000
}
}
}
data_sources: {
config {
name: "android.java_hprof"
target_buffer: 0
java_hprof_config {
process_cmdline: "com.google.android.inputmethod.latin"
dump_smaps: true
}
}
}
data_sources: {
config {
name: "linux.ftrace"
ftrace_config {
ftrace_events: "sched/sched_switch"
ftrace_events: "power/suspend_resume"
ftrace_events: "sched/sched_wakeup"
ftrace_events: "sched/sched_wakeup_new"
ftrace_events: "sched/sched_waking"
ftrace_events: "power/cpu_frequency"
ftrace_events: "power/cpu_idle"
ftrace_events: "power/gpu_frequency"
ftrace_events: "gpu_mem/gpu_mem_total"
ftrace_events: "raw_syscalls/sys_enter"
ftrace_events: "raw_syscalls/sys_exit"
ftrace_events: "sched/sched_process_exit"
ftrace_events: "sched/sched_process_free"
ftrace_events: "task/task_newtask"
ftrace_events: "task/task_rename"
ftrace_events: "lowmemorykiller/lowmemory_kill"
ftrace_events: "oom/oom_score_adj_update"
ftrace_events: "ftrace/print"
atrace_categories: "gfx"
atrace_categories: "input"
atrace_categories: "view"
atrace_categories: "webview"
atrace_categories: "wm"
atrace_categories: "am"
atrace_categories: "sm"
atrace_categories: "audio"
atrace_categories: "video"
atrace_categories: "camera"
atrace_categories: "hal"
atrace_categories: "res"
atrace_categories: "dalvik"
atrace_categories: "rs"
atrace_categories: "bionic"
atrace_categories: "power"
atrace_categories: "pm"
atrace_categories: "ss"
atrace_categories: "database"
atrace_categories: "network"
atrace_categories: "adb"
atrace_categories: "vibrator"
atrace_categories: "aidl"
atrace_categories: "nnapi"
atrace_categories: "core_services"
atrace_categories: "pdx"
atrace_apps: "*"
}
}
}
duration_ms: 10000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment