Sdílet prostřednictvím


Debug.StartMethodTracingSampling(String, Int32, Int32) Method

Definition

Start sampling-based method tracing, specifying the trace log file name, the buffer size, and the sampling interval.

[Android.Runtime.Register("startMethodTracingSampling", "(Ljava/lang/String;II)V", "")]
public static void StartMethodTracingSampling (string? tracePath, int bufferSize, int intervalUs);
[<Android.Runtime.Register("startMethodTracingSampling", "(Ljava/lang/String;II)V", "")>]
static member StartMethodTracingSampling : string * int * int -> unit

Parameters

tracePath
String

Path to the trace log file to create. If null, this will default to "dmtrace.trace". If the file already exists, it will be truncated. If the path given does not end in ".trace", it will be appended for you.

bufferSize
Int32

The maximum amount of trace data we gather. If not given, it defaults to 8MB.

intervalUs
Int32

The amount of time between each sample in microseconds.

Attributes

Remarks

Start sampling-based method tracing, specifying the trace log file name, the buffer size, and the sampling interval.

When a relative file path is given, the trace file will be placed under your package-specific directory on primary shared/external storage, as returned by Context#getExternalFilesDir(String).

See Inspect Trace Logs with Traceview for information about reading trace files.

Java documentation for android.os.Debug.startMethodTracingSampling(java.lang.String, int, int).

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