But when doing that, do not forget to convert the snapshots using * hprof-conv*. I'm still searching for a automatic way. We're using: for i in *.andhprof; do hprof-conv $i `basename $i .andhprof`.new.hprof ;done
On Thu, May 20, 2010 at 8:19 PM, Mathias Lin <m...@mathiaslin.com> wrote: > Yourkit, http://yourkit.com/overview/index.jsp, is another profiler > tool that could be used. > > In sdk2.1, you can also do it on a non-rooted device - you can create > a hprov from within the app and write it to sdcard. > > Debug.dumpHprofData("/sdcard/myapp.hprov"); > > At least in v2.1, possible that this wasn't availabe in 1.x sdk. > > > > On May 20, 8:10 pm, pacoder <sove...@gmail.com> wrote: > > I've been using Eclipse MAT (http://www.eclipse.org/mat/) to look at > > heap dumps. My phone isn't rooted so I run my app in the emulator then > > use adb to do a kill -10 which forces a heap dump. I then do an adb > > pull to grab the file (your logcat will give you the name of the heap > > dump output file when it runs). Then I use the android hprof-conv tool > > to convert the heap dump to one that MAT can read. Then just open it > > up in MAT and you can look around through the dump. It will also > > suggest leak candidates to you, it's a nice tool. Also, you will need > > to grant write permissions to the output directory in your emulator. I > > just go do a chmod 777 /user/data. > > > > hth, > > > > Sean Overby > > > > On May 20, 6:27 am, Jiang <webs...@yahoo.cn> wrote: > > > > > > > > > When start Activity A, I found the memory usage of application is about > 5MB, > > > > > Then start Activity B from A via startActivity. In Activity B, I > created a thread, and traverse file system > in this thread, after traversing completed, call finish() and to return to > Activity A. at this time, I found the memory usage of application is about > 8MB (GC is forced before check memory usage). > > > > > How to find Where memory leaks? > > > > > By the way, I checked the memory usage with DDMS. > > > > > Thanks. > > > > > -- > > > 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<android-developers%2bunsubscr...@googlegroups.com> > > > For more options, visit this group athttp:// > groups.google.com/group/android-developers?hl=en > > > > -- > > 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<android-developers%2bunsubscr...@googlegroups.com> > > For more options, visit this group athttp:// > groups.google.com/group/android-developers?hl=en > > -- > 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<android-developers%2bunsubscr...@googlegroups.com> > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en > -- 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