Android性能优化--Perfetto分析native内存泄露
Android性能优化--Perfetto分析native内存泄露
本地首发地址 https://h89.cn/archives/24.html
本文示例是windows,这里使用了python工具,在Linux和mac同样适用
首先安装python3环境,参见 https://www.python.org/downloads/
下载 perfetto ,地址在 https://github.com/google/perfetto
后面需要用到这里的 perfetto\tools\heap_profile 本文放在了目录 D:\tools\perfetto
抓取一次某个应用的内存命令如下,注意提前关闭其它adb程序,如AS
python D:\tools\perfetto\tools\heap_profile -n com.app.