Android, standalone version of traceview is out of date

I want to see my footprints.

1- In the code, I added these lines of code:

// Start trace recording android.os.Debug.startMethodTracing("hc_traceview"); 

and

 // Stop trace recording android.os.Debug.stopMethodTracing(); 

2- I see " hc_traceview.terac " in the DDMS file explorer.

3- Based on the View trace files in Traceview, I executed the following command in the terminal:

 @hesam-K5VD:~/Desktop/Eclipse/sdk/tools$ traceview /mnt/sdcard/hc_traceview 

But outside of this:

 The standalone version of traceview is deprecated. Please use Android Device Monitor (tools/monitor) instead. trace file '/mnt/sdcard/hc_traceview' not found 

4- Based on the suggestion, I executed the following command in the terminal:

 @hesam-K5VD:~/Desktop/Eclipse/sdk/tools$ monitor /mnt/sdcard/hc_traceview 

DDMS is open, but my footprints are not here :( How can I see my footprints?

Any suggestion would be appreciated.

+6
source share
4 answers

Please see here: DDMS

The page says that you can start and stop profiling methods in the DDMS view as follows:

  • Run the application from eclipse in debug mode.
  • Go to the DDMS view
  • There is a small button in the device window with the name Profiling of the profile method
  • Click whenever you want (you can combine it with break points to get an exact start / end)
  • when you're done click Stop Profiling
  • In a new window in DDMS, a similer for traceview with the same output will appear.
+9
source

You should output the trace from the SD card as follows:

cd your sdk/platform-tools
$ adb pull /sdcard/hc_traceview.trace
open the monitor (double-click monitor.bat in sdk/tools ). click "Open file ..." and select hc_traceview.trace in the sdk/platform-tools folder. You should now have a clean look at your footprint. If you encounter any problem, please comment here.

+6
source

After opening DDMS, you need to click on the "File" menu and select "Open File ...", and then select the trace file generated in the previous step, all trace information will be displayed.

+2
source

Remove the trace file from the SD card

$ adb pull / sdcard /

Then call

$ traceview /

Note. Note the .trace at the end of the traceview file name when calling the traceview command .

Look here for more information.

-1
source

All Articles