Android - Cannot use traceview

I am trying to use traceview to run some profiling against an android app. I wrapped the code I want to track with the following lines:

Debug.startMethodTracing("xxx"); // code Debug.stopMethodTracing(); 

He successfully created a trace file that I pulled from sdcard using the following command line:

./adb pull / sdcard / xxx.trace

However, when running traceview :

./traceview/.../xxx.trace

The following error message appears:

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

I cannot understand this error message, and I did not find anything useful on Google.

Any help would be greatly appreciated.

Thanks!

+4
source share
1 answer

make sure your Debug class is selected: android.os.Debug

or do the following:

 android.os.Debug.startMethodTracing("xxx"); android.os.Debug.stopMethodTracing(); 
+1
source

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


All Articles