Debug.StartNativeTracing Method

Definition

Enable qemu tracing.

[Android.Runtime.Register("startNativeTracing", "()V", "")]
public static void StartNativeTracing ();
[<Android.Runtime.Register("startNativeTracing", "()V", "")>]
static member StartNativeTracing : unit -> unit
Attributes

Remarks

Enable qemu tracing. For this to work requires running everything inside the qemu emulator; otherwise, this method will have no effect. The trace file is specified on the command line when the emulator is started. For example, the following command line <br /> emulator -trace foo<br /> will start running the emulator and create a trace file named "foo". This method simply enables writing the trace records to the trace file.

The main differences between this and #startMethodTracing() are that tracing in the qemu emulator traces every cpu instruction of every process, including kernel code, so we have more complete information, including all context switches. We can also get more detailed information such as cache misses. The sequence of calls is determined by post-processing the instruction trace. The qemu tracing is also done without modifying the application or perturbing the timing of calls because no instrumentation is added to the application being traced.

One limitation of using this method compared to using #startMethodTracing() on the real device is that the emulator does not model all of the real hardware effects such as memory and bus contention. The emulator also has a simple cache model and cannot capture all the complexities of a real cache.

Java documentation for android.os.Debug.startNativeTracing().

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to