- 论坛徽章:
- 0
|
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:
http://code.google.com/android/reference/android/os/Debug.html#startNativeTracing
http://code.google.com/android/reference/traceview.html
本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u2/87831/showart_1844667.html |
|