How to convert a heap dump in android to eclipse format

后端 未结 2 1396
南旧
南旧 2020-12-28 17:38

Im attempting to analyze a memory leak that has been driving me crazy for weeks, I found out about the eclipse MAT tool that helps you to figure out what is wro

相关标签:
2条回答
  • 2020-12-28 18:26

    Just to be said: You don't explicitly need to convert the .hprof file using hprof-conv. MAT does this for you automatically - as described here. In Eclipse,

    1. open the Preferences Window,
    2. navigate to Android > DDMS
    3. and change the HPROF action to "Open in Eclipse".

    0 讨论(0)
  • 2020-12-28 18:37

    Sounds like you need to use the hprof-conv tool that's located in [Android-SDK]\platform-tools.

    To do this on Windows:

    1. Press WINKEY+R and type in cmd

    2. Type in:

      cd "C:\android-sdk\platform-tools" (or whichever directory contains your Android sdk)

    3. Assuming you have your Dalvik file on the Desktop (I'm just guessing the directory), type in:

      hprof-conv "C:\Users\Edmund\Desktop\heap-dump-tm-pid.hprof" "C:\Users\Edmund\Desktop\4mat.hprof"

    4. This will generate the standard format HPROF file that you can use called 4mat.hprof

    0 讨论(0)
提交回复
热议问题