andorid framework debug


collect the systrace
import android.os.Debug;
//call trace
Debug.startMethodTracing( "report" );
Debug.stopMethodTracing();
//memory usage
Debug.startAllocCounting(); 
Debug.stopAllocCounting();

see also:
http://blog.changyy.org/2011/04/android-ddms-traceview.html
life cycle of one APP:
http://www.linuxgraphics.cn/android/life_circle.html