Tnx Fadden.

Two more issues:

1. hprof only works on emulator (unless i'm missing something). i
would much prefer to analize mem usage
    on the device itself. Is there a tool that does it?

2. when used on the emulator, hprof measure an amazing level of mem
usage by rather 'trivial' classes
   such as Class object and byte[], is there a way for me to learn
which 'significant' class is the owner of these
   classes, e.g.:
      - your app has 5555555 byte[] classes,  70% of which are owned
by MyClass

GiladH





On Feb 9, 11:18 pm, fadden <fad...@android.com> wrote:
> On Feb 9, 6:00 am,GiladH<gila...@gmail.com> wrote:
>
> > Is there a way of querying Android (or G1 or DDMS) for a list of all
> > currently live objects
> > by type and by nymber of instances.
>
> > That is:
> >    - your app currently have 122 objects of type MyClass
> >    - your app currently have 201 objects of type MyOtherClass
>
> You can generate an "hprof" dump by using "runhat"; some information
> is available in this thread:
>
>  http://groups.google.com/group/android-developers/browse_thread/threa...
>
> The android-specific dump must be converted with "hprof-conv"; sources
> are currently available here:
>
>  http://bigflake.com/HprofConv.c.txt
>
> The conversion tool, and a new API for generating dumps, will be
> included in a future release.
>
> Once you have the hprof output, you can process it with a number of
> tools, including "jhat" (part of the JDK) and "MAT".
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to