我正在尝试在android 4.2(avd 17)模拟器上使用systrace

我已在跟踪选项中启用usb debuggimg并激活了webview,并在此http://www.youtube.com/watch?feature=player_embedded&v=Q8m9sHdyXnE#t=31m15s

但是当我尝试使用android tools目录中的./systrace.py开始跟踪时,我看到以下输出

error opening /sys/kernel/debug/tracing/options/overwrite: No such file or directory (2)
error opening /sys/kernel/debug/tracing/events/sched/sched_switch/enable: No such file or directory (2)
error opening /sys/kernel/debug/tracing/events/sched/sched_wakeup/enable: No such file or directory (2)
error opening /sys/kernel/debug/tracing/events/power/cpu_frequency/enable: No such file or directory (2)
error opening /sys/kernel/debug/tracing/events/power/cpu_idle/enable: No such file or directory (2)
error opening /sys/kernel/debug/tracing/buffer_size_kb: No such file or directory (2)
error opening /sys/kernel/debug/tracing/trace_clock: No such file or directory (2)
error opening /sys/kernel/debug/tracing/events/workqueue/enable: No such file or directory (2)
error opening /sys/kernel/debug/tracing/events/ext4/ext4_sync_file_enter/enable: No such file or directory (2)
error opening /sys/kernel/debug/tracing/events/ext4/ext4_sync_file_exit/enable: No such file or directory (2)
error opening /sys/kernel/debug/tracing/events/block/block_rq_issue/enable: No such file or directory (2)
error opening /sys/kernel/debug/tracing/events/block/block_rq_complete/enable: No such file or directory (2)
error opening /sys/kernel/debug/tracing/tracing_on: No such file or directory (2)
error: unable to start trace
error opening /sys/kernel/debug/tracing/tracing_on: No such file or directory (2)
error opening /sys/kernel/debug/tracing/options/overwrite: No such file or directory (2)
error opening /sys/kernel/debug/tracing/events/sched/sched_switch/enable: No such file or directory (2)
error opening /sys/kernel/debug/tracing/events/sched/sched_wakeup/enable: No such file or directory (2)
error opening /sys/kernel/debug/tracing/events/power/cpu_frequency/enable: No such file or directory (2)
error opening /sys/kernel/debug/tracing/trace_clock: No such file or directory (2)
error opening /sys/kernel/debug/tracing/events/workqueue/enable: No such file or directory (2)
error opening /sys/kernel/debug/tracing/events/ext4/ext4_sync_file_enter/enable: No such file or directory (2)
error opening /sys/kernel/debug/tracing/events/ext4/ext4_sync_file_exit/enable: No such file or directory (2)
error opening /sys/kernel/debug/tracing/events/block/block_rq_issue/enable: No such file or directory (2)
error opening /sys/kernel/debug/tracing/events/block/block_rq_complete/enable: No such file or directory (2)
unable to start tracing
error opening /sys/kernel/debug/tracing/buffer_size_kb: No such file or directory (2)


有人知道我需要做些什么才能使跟踪工作吗?

最佳答案

systrace在模拟器上不支持。它仅支持设备。

更多细节:

Unable to run systrace tool on android emulator

Error running systrace tool in ADB using a Jelly Bean 4.1 emulator on Windows 7

对于设备,请将您的SDK更新到最新版本。

systrace文件路径为android-sdk\tools\systrace\systrace.py。最新的android 4.2+ android-sdk\platform-tools\systrace\systrace.py

根并使用以下命令重新安装设备。

adb root
adb remount

关于android - Android模拟器上的Systrace,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/16167038/

10-12 04:11