4

Could you explain to nube how to correctly launch the traceview utility. When I write in command line (beeing in \tools folder) traceview I get this message:

Usage: java com.android.traceview.MainWindow [-r] trace

-r regression only

So then I write this Usage string in command line and get ClassNotFoundException. I tried to wrote classname of file I want to explore in traceview using it's package name and it's classname at the end, but get the same exception.

Tell me please what am I doing wrong?

teoREtik
  • 7,886
  • 15
  • 46
  • 65

2 Answers2

0

Old question, but someone else might have stumbled into this same problem (as I did 5 minutes ago)...

In order to run traceview from the command line, you must feed it a .trace file to process (it doesn't work like most other GUI programs, where you start the app, and then File->Open the input files), as explained here:

http://developer.android.com/tools/debugging/debugging-tracing.html#runningtraceview

This will bring forth the GUI with the profiling data for your application.

The instructions about how to generate the trace files are explained in the previous link as well.

You can also start traceview directly from DDMS (or the DDMS eclipse perspective) by starting and stopping the method tracing:

enter image description here

in which case you will probably better setting up some breakpoints, as only the methods invoked between the start and stop will be traced (which will make tracing the initialisation of an app tricky...)

Hope this helps

Rick77
  • 3,121
  • 25
  • 43
0

First you make sure that you are using Ubuntu 64 bit system or 32 bit sysytem if it is 64 bit then. To make traceview work on 64-bit Ubuntu 1) sudo apt-get install ia32-sun-java6-bin 2) Determine the path of the ia32-sun-java6-bin java binary

    update-java-alternatives -l

3) Replace javaCmd="java" in android-sdk-linux_x86-/tools/ traceview with the following

    # javaCmd="java"
    javaCmd="/usr/lib/jvm/ia32-java-6-sun/bin/java"