I posted a similar question some days ago without any success (http://
groups.google.com/group/android-developers/browse_thread/thread/
dddf6d5062dfb6b5/e970f0df5e229380?hl=en&lnk=gst&q=memory
+dump#e970f0df5e229380).  At least you have got the heap dump (that
was the first step).

Have you tried with other memory analyzers like JProfiler (http://
www.ej-technologies.com/products/jprofiler/overview.html) or the SAP
Memory Analyzer (now Eclipse Memory Analyzer)
https://www.sdn.sap.com/irj/sdn/wiki?path=/display/Java/Java+Memory+Analysis
?

Could you tell us where did you find exactly the 'runhat' shell
function? I have found an old post from a Googler telling this:

>>
- In DDMS force a GC on your process, a couple of GCs on the system
process, then another GC on your process, to get rid of any garbage
left on the heap
- Run the following command from a shell: adb shell kill -10 [pid of
your application]
- This will generate two files on the emulator, in /data/musci. One is
called heap-dump-tmXXXXXX-pidXXX.hprof and the other one has the same
name but with the extension .hprof-head. For instance, I have
/data/misc/heap-dump-tm1213483064-pid4748.hprof and
/data/misc/heap-dump-tm1213483064-pid4748.hprof-head
- Download the two files on your computer with adb pull
- Merge the two files by putting the .hrof-head at the beginning:
cat heap-dump-tm1213483064-pid4748.hprof-head
heap-dump-tm1213483064-pid4748.hprof > heap-profile.hprof
- Open the resulting file with a tool that supports hprof files
(JProfiler, hat, etc.)
>>

But I haven't had time to try it.

Good luck!

Jose Luis.



On Nov 5, 8:12 pm, Disco Stu 010 <[EMAIL PROTECTED]> wrote:
> Hello,
>
> While perusing the source code, came across a shell function that  
> envsetup.sh defines called "runhat". Judging by the parameters, etc.,  
> to this function, it allows one to get a heap-dump for a given  
> application. This dump can then be analyzed by the tools "hat" and  
> "jhat".
>
> Has anyone had any luck running these tools? I tried earlier today and  
> consistently get an error message
>
> Started HTTP server on port 7000
> Reading from /tmp/t.hat...
> java.io.IOException: Version string not recognized at byte 17
>         at hat.parser.HprofReader.readVersionHeader(HprofReader.java:325)
>         at hat.parser.HprofReader.read(HprofReader.java:169)
>         at hat.parser.Reader.readFile(Reader.java:90)
>         at hat.Main.main(Main.java:149)
>
> I have tried jhat (built into Java SE 6.0) as well as hat (downloaded  
> fromhttps://hat.dev.java.net/). Both versions get the same error.
>
> Can anyone help?
>
> Thanks,
> DS.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to