Android, the standalone version of traceview is deprecated

十年热恋 提交于 2019-12-05 07:53:43
Mr.Me

Please take a look here : DDMS

The page says you can start and stop method profiling inside DDMS view like this:

  • Launch your app from eclipse in debugging mode.
  • Go to DDMS View
  • In devices window there is a small button called Start Method Profiling
  • Click it when you want ( you can combine it with break points to get accurate start/end)
  • when you're done click Stop Method Profiling
  • A new window in DDMS will appear similer to traceview with the same output.

You should pull the trace out of the sdcard 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 the hc_traceview.trace from the sdk/platform-tools folder. You should now have clean view of your trace. If any problem appear, please comment here.

After the DDMS opened, you have to click on the File menu and select "Open File...", then select the trace file generated in the before step, all the trace info will be displayed.

Pull the trace file out from the sdcard

$ adb pull /sdcard/

Then call,

$ traceview /

Note: Please mention .trace at the end of the traceview file name while calling traceview command

Look here for more information

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!