You can also PMD for code analysis/optimization. -E
On Sep 13, 12:20 pm, Xavier Ducrohet <x...@android.com> wrote: > On Sun, Sep 12, 2010 at 1:22 PM, Samsyn <d...@synthetic-reality.com> wrote: > > I believe DDMS has much of what you need. > > > For code profiling, search for 'TraceView' > > > * you will want to add some UI to your app to let you toggle tracing > > on and off, so you can capture samples while your code is doing the > > thing you're interested in improving. > > there's also a toggle in the DeviceView of DDMS that start/stops the > trace recording. Upon stopping it, it'll launch Traceview too. > > > For memory leak checking, you need to run the full DDMS (not the DDMS > > panel in eclipse), and you ideally should use that full DDMS to launch > > the app (either on a emulator or a real phone). If you let eclipse > > launch it, it will probably grab the access port and then the full > > DDMS won't be able to connect and you will scratch your head wondering > > why. > > Actually AllocationTracker is in the DDMS plug-in too now. > > Also DDMS has a dump hprof button. If you use from Eclipse it'll open > the .hprof in Eclipse. Install MAT (http://eclipse.org/mat/) which is > able to identify possible leaks. > > > And if you trace on a real phone, don't forget to give your app > > permission to write to the SDCARD. > > Unless you're running froyo. Starting with froyo (2.2), if you use the > "dump hprof" or "start/stop tracing" buttons in DDMS, the VM is able > to record the files locally and send them to DDMs through JDWP instead > of storing them on the SD Card (and then have DDMS pull them with > adb). > > For older VMs you will need to have your app use the SD Card permission > > Xav > -- > Xavier Ducrohet > Android SDK Tech Lead > Google Inc. > > Please do not send me questions directly. 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 For more options, visit this group at http://groups.google.com/group/android-developers?hl=en