문제

I'm following the instructions here to use systrace for my application but I keep getting the following error whenever I try to set the tags for systrace:

systrace.py: error: no such option: --set-tags

This seems to be a rather new issue that just cropped up for me yesterday. Does anyone know what's up? It seems to only be an issue for when I'm trying to systrace on a device running 4.3.

도움이 되었습니까?

해결책

There is no --set-tags option for 4.3. The way systrace works changed significantly, and the documentation hasn't yet been updated. (Edit: it has been updated for 4.3)

The systrace.py script checks the device version, and forwards the commands to systrace-legacy.py for pre-4.3 devices. That's why the old command still works for older devices.

An example for a 4.3 device would be:

python systrace.py gfx view sched dalvik

That is, you just list the tags you want as arguments to the command that starts the tracing.

I have an example (which also shows off the new app-defined tag feature) here.

다른 팁

Yes, "python systrace.py gfx view sched dalvik" works, I think google need to update the help info of systrace.py.

However, in Android 4.3, you can also use "Capture system wide trace using Android systrace" in DDMS perspective window in eclipse bundled in latest android sdk. Just like the post here.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top