1.cmd 進入D:\AndroidSDK\platform-tools> 目錄,下面有hprof-conv.exe,執行命令
D:\AndroidSDK\platform-tools>hprof-conv memory-20191106T171841.hprof heap-converted.hprof
把android格式的轉爲標準的hprof文件。
然後執行
jhat -J-Xmx1024m heap-converted.hprof
輸出
Reading from heap-converted.hprof...
Dump file created Wed Nov 06 17:18:26 CST 2019
WARNING: Stack trace not found for serial # -1
.....
Snapshot read, resolving...
Resolving 897880 objects...
Chasing references, expect 179 dots...................................................................................................................................................................................
Eliminating duplicate references...................................................................................................................................................................................
Snapshot resolved.
Started HTTP server on port 7000
Server is ready.
瀏覽器訪問http://localhost:7000/ 即可