Hacker News AI· lalitmaganti·· 56 min agoAI score58
Finding and fixing Android memory leaks with Perfetto, SQL, and AI agents
Finding and fixing Android memory leaks with Perfetto, SQL, and AI agents
AI summary
This post describes how Perfetto's open-source memory tooling captures lightweight ART heap retention graphs, native heapprofd profiles, and memory counters on unmodified Android devices, then analyzes them via the Web UI's Heap Dump Explorer, PerfettoSQL queries, and BigTrace fleet-scale processing. It catalogs six recurring leak patterns—such as lifecycle-mismatched callback registries, window-root listener scoping, and cleanup coroutines cancelled before teardown—and shows how the open-source Perfetto AI Skill lets coding agents trace a dominator chain to the exact source line, propose a fix, and verify it with tests.
Source: Hacker News AI · perfetto.dev