I installed MAT, unloaded HEAP from Android Device Monitor and now I have a .hprof file, how can I analyze it in MAT?
- It is worth noting that Android Studio has its impressive set of tools for profiling, that what a leak can be easily caught. - pavlofff
- @pavlofff I am a beginner, and on the Internet there were mainly MAT examples on this topic, so I asked myself this question. And MAT seems to show exactly where the leak occurs (which class and so on), does Android Studio have a tool with similar functionality? - Amir Shabanov
- 1, 2, and 3 point on the link above. The analyzer is also there. Description of tools on the links in the answer. - pavlofff
- @pavlofff thanks, I'll know. - Amir Shabanov
|
1 answer
In order to convert the .hprof downloaded from Android Studio to the MAP-like .hprof, you need to do the following steps.
- Open the command prompt and go to the Android \ sdk \ platform-tool folder
- Then we enter the hprof-conv "path to the convertible file" "" path to the resulting file "for me it looked like this:
C: \ Users \ sh_am \ AppData \ Local \ Android \ sdk \ platform-tools> hprof-conv "C: \ Users \ sh_am \ Desktop \ rambotv30.hprof" "C: \ Users \ sh_am \ Desktop \ 4mat.hprof"
- This will create a standard .hprof file with the name you specified with me, this is 4mat.hprof
Opened the file in MAT, everything works fine
|