the traceview tool which can be used to view traces gathered with startMethodTracing() (android.os.Debug) looks quite good.
This applies to an
emulator run from git sources...
0. Make sure that development/tools/traceview/etc/manifest.txt says
"com.android.traceview.MainWindow" on the first line, not
"com.google". If it doesn't, change it, remove out/host/common/obj/
JAVA_LIBRARIES/traceview_intermediates/javalib.jar, and rebuild.
(Otherwise, "traceview" won't start. The current sources are correct,
so if you're synced up with git you're fine.)
1. Start the
emulator with the
trace flag, e.g. "
emulator -
trace foo".
2. Hit F9 to start tracing. Hit it again to stop tracing.
3. Exit the
emulator.
4. Run "tracedmdump foo". tracedmdump is a shell command added when
you sourced "envsetup.sh".
5. "traceview out/target/product/generic/traces/foo/dmtrace".
refer to:
阅读(1101) | 评论(0) | 转发(0) |