# Perfetto config for an Android app: app atrace sections, sched, frames. # From Shubham Singh Bisht's Android helpers: https://shubhamsinghbisht.com/android-roadmap/#helpers # Push: adb push perfetto.cfg /data/local/tmp/app.cfg # Run: adb shell 'cat /data/local/tmp/app.cfg | perfetto --txt -c - -o /data/misc/perfetto-traces/app.perfetto-trace' # atrace_apps "*" records app trace sections from every app. To keep only # yours, replace it with your package, e.g. "com.example.app" and "com.example.app.debug". buffers { size_kb: 65536 fill_policy: RING_BUFFER } duration_ms: 15000 data_sources { config { name: "linux.ftrace" ftrace_config { ftrace_events: "sched/sched_switch" ftrace_events: "power/suspend_resume" atrace_categories: "gfx" atrace_categories: "view" atrace_categories: "input" atrace_categories: "am" atrace_categories: "dalvik" atrace_apps: "*" } } } data_sources { config { name: "linux.process_stats" } } data_sources { config { name: "android.surfaceflinger.frametimeline" } }