Launch Traceview

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

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

-r only regression

So, I write this Usage line on the command line and get a ClassNotFoundException. I tried to write the class name of the file that I want to examine in traceview, using its package name and class name at the end, but I get the same exception.

Please tell me what am I doing wrong?

+4
source share
2 answers

First, you will make sure that you are using a 64-bit Ubuntu system or a 32-bit system if it is 64 bit, then To do tracking work with 64-bit Ubuntu 1) sudo apt-get install ia32-sun-java6-bin 2) Determine the path of the ia32-sun-java6-bin 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" 
0
source

Old question, but someone else might stumble upon the same problem (as I did 5 minutes ago) ...

To run traceview from the command line, you must pass the .trace file for processing (it does not work, like most other graphics programs in which you run the application, and then File-> Open input files), as described here:

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

This will create a GUI with profiling data for your application.

Instructions on how to create trace files are also described in the previous link.

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

enter image description here

in this case, you are probably better off setting some breakpoints, since only methods called between start and stop will be tracked (which will make application initialization tracing difficult ...)

Hope this helps

0
source

Source: https://habr.com/ru/post/1345842/


All Articles