[android-developers] Re: in-memory live object histogram
I only have G1... Isn't there a way, maybe a poorly documented one, for chmod 777 G1 ? GiladH On Feb 11, 2:35 am, fadden wrote: > On Feb 10, 4:41 am,GiladH wrote: > > > 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? > > As implemented in 1.0 it requires root access (you need to "chmod 777 / > data/misc"). This can be had in the emulator or on the "ADP1" > developer device. > > > 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 555 byte[] classes, 70% of which are owned > > by MyClass > > That's entirely a matter of presentation by your hprof analysis tool > of choice. I don't have an opinion on which will work best here. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[android-developers] Re: in-memory live object histogram
On Feb 10, 4:41 am, GiladH wrote: > 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? As implemented in 1.0 it requires root access (you need to "chmod 777 / data/misc"). This can be had in the emulator or on the "ADP1" developer device. > 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 555 byte[] classes, 70% of which are owned > by MyClass That's entirely a matter of presentation by your hprof analysis tool of choice. I don't have an opinion on which will work best here. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[android-developers] Re: in-memory live object histogram
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 555 byte[] classes, 70% of which are owned by MyClass GiladH On Feb 9, 11:18 pm, fadden wrote: > On Feb 9, 6:00 am,GiladH 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 -~--~~~~--~~--~--~---
[android-developers] Re: in-memory live object histogram
On Feb 9, 6:00 am, GiladH 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/thread/e2653bff9e0eee3e/620b68305da4586e 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 -~--~~~~--~~--~--~---