如何将android中的堆转储转换为eclipse格式 [英] How to convert a heap dump in android to eclipse format

查看:166
本文介绍了如何将android中的堆转储转换为eclipse格式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图分析一段令我疯狂数周的内存泄漏,我发现了有关eclipse MAT 工具,帮助您找出错误,问题是每个单独的教程,我发现我需要将文件格式从dalvik转换为 HPROF 格式,但是没有一个单一的教程可以解释如何实际上做到这一点,而不是像这样的模糊的东西

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 wrong, the problem is every single tutorial I have found says that I need to convert the format of the file from dalvik to HPROF format, however not one single tutorial I can find explains how to actually do it, instead I get vague things like this


现在您将获得的文件不符合标准Sun .hprof格式,但是以Dalvik自己的格式编写,您需要转换它:

Now the file you will get does not conform to the "standard" Sun .hprof format but is written in Dalvik's own format and you need to convert it:

hprof-conv heap-dump -tm-pid.hprof 4mat.hprof

这是什么意思?点击什么?我要去哪?我完全失去和沮丧,任何帮助将会有很长的路要走,谢谢。

what does that actually mean? what do I click? where do I go? Im totally lost and frustrated, any help will go a long way, thanks.

推荐答案

听起来你需要使用 hprof-conv 位于 [Android-SDK] \platform-tools

在Windows上执行此操作:

To do this on Windows:


  1. WINKEY + R 键入 cmd

  2. 输入:

  1. Press WINKEY+R and type in cmd
  2. Type in:

cdC:\android-sdk\platform -tools(或任何目录包含您的Android sdk)

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

假设您的桌面上有您的Dalvik文件(我是只需猜测目录),输入:

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

hprof-convC:\Users\Edmund\Desktop\heap-dump -tm-pid.hprofC:\Users\Edmund\Desktop\4mat.hprof

这篇关于如何将android中的堆转储转换为eclipse格式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆