Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fc81096d authored by Mythri Alle's avatar Mythri Alle
Browse files

Update startMethodTracing documentation

In API 34, flags passed to startMethodTracing were extended to configure
time source. Add documentation about the new flags.

Bug: 329499422
Test: just updated documentation
Flag: EXEMPT DOCS_ONLY
(cherry picked from https://android-review.googlesource.com/q/commit:f58be28756ea8bfc8e353432a8eaebef7da2cf86)
Merged-In: I5f1a706d9c563db7b5dfc4974217746d2ddeb262
Change-Id: I5f1a706d9c563db7b5dfc4974217746d2ddeb262
parent 1f8bbc65
Loading
Loading
Loading
Loading
+10 −2
Original line number Original line Diff line number Diff line
@@ -1353,8 +1353,16 @@ public final class Debug
     *            in ".trace", it will be appended for you.
     *            in ".trace", it will be appended for you.
     * @param bufferSize The maximum amount of trace data we gather. If not
     * @param bufferSize The maximum amount of trace data we gather. If not
     *            given, it defaults to 8MB.
     *            given, it defaults to 8MB.
     * @param flags Flags to control method tracing. The only one that is
     * @param flags Flags to control method tracing. The following flags are supported:
     *            currently defined is {@link #TRACE_COUNT_ALLOCS}.
     *            0x0001 {@link #TRACE_COUNT_ALLOCS}
     *
     *            Flags to control time source: These are available with API #34 and higher.
     *            0x0010 Report the elapsed time since the start of the trace.
     *            0x0100 Report the time the thread has spent on the CPU since the start of the
     *                   trace. Please note that the thread cpu incurs a significant (typically
     *                   2-3x) performance penalty. Use this flag only when necessary.
     *            If neither of these flags are set, both the elapsed time and the thread cpu time
     *            are reported.
     */
     */
    public static void startMethodTracing(String tracePath, int bufferSize, int flags) {
    public static void startMethodTracing(String tracePath, int bufferSize, int flags) {
        VMDebug.startMethodTracing(fixTracePath(tracePath), bufferSize, flags, false, 0);
        VMDebug.startMethodTracing(fixTracePath(tracePath), bufferSize, flags, false, 0);