Monday, June 8, 2009

Android java space profiling tool - traceview

Android provides a good java space profiling tool: traceview. Traceview can be found in the same folder as adb in Android SDK package. Usage is quite simple and straightforward:
  1. import android.os.Debug;
  2. Debug.startMethodTracing("tag-name");
  3. Debug.stopMethodTracing();
  4. Run the Java application
  5. Fetch out the profiling output file on SD card (SD card is needed) root folder: tag-name.trace
  6. traceview tag-name.trace to open the traceview window
Insert items 1, 2, 3 into your java source code where you want to do profiling.
For more information about traceview window, refer to http://developer.android.com/guide/developing/tools/traceview.html

3 comments:

Unknown said...

I tried running "traceview" tool with scores.trace , it opened Traceview window showing Colorful markings in first panel(TimeLine panel) & second(Profile) panel With 998 entries overall,What do i do with that, how to Understand it & then how to Optimize my code by looking @ TraceView output, what all those Values & percentages indicate, All(most) of them are System level Methods, What do i do with them?

sasha said...

One of the biggest reasons for smartphones from Samsung, Sony Ericsson and Motorola to do roaring business is thanks to the presence of the android applications in them

best android apps

best iphone apps

Unknown said...

I wasn’t aware of some of the info that you mentioned so I want to just say thank you.
white cocktail dress 2013