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

Commit 04dd9dc8 authored by Pablo Gamito's avatar Pablo Gamito
Browse files

Dump jank tagging to event log

Bug: 240648270
Test: N/A
Change-Id: I85b841c2b84031e1455a9cfda939a707141c1203
parent 4c7d5c9f
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
# See system/core/logcat/event.logtags for a description of the format of this file.

option java_package com.android.internal.jank;

# Marks a request to start tracing a CUJ. Doesn't mean the request was executed.
37001 jank_cuj_events_begin_request (CUJ Type|1|5)
# Marks a request to end tracing a CUJ. Doesn't mean the request was executed.
37002 jank_cuj_events_end_request (CUJ Type|1|5)
# Marks a request to cancel tracing a CUJ. Doesn't mean the request was executed.
37003 jank_cuj_events_cancel_request (CUJ Type|1|5)
+3 −0
Original line number Diff line number Diff line
@@ -541,6 +541,7 @@ public class InteractionJankMonitor {
    public boolean begin(@NonNull Configuration.Builder builder) {
        try {
            final Configuration config = builder.build();
            EventLogTags.writeJankCujEventsBeginRequest(config.mCujType);
            final TrackerResult result = new TrackerResult();
            final boolean success = config.getHandler().runWithScissors(
                    () -> result.mResult = beginInternal(config), EXECUTOR_TASK_TIMEOUT);
@@ -614,6 +615,7 @@ public class InteractionJankMonitor {
     * @return boolean true if the tracker is ended successfully, false otherwise.
     */
    public boolean end(@CujType int cujType) {
        EventLogTags.writeJankCujEventsEndRequest(cujType);
        FrameTracker tracker = getTracker(cujType);
        // Skip this call since we haven't started a trace yet.
        if (tracker == null) return false;
@@ -651,6 +653,7 @@ public class InteractionJankMonitor {
     * @return boolean true if the tracker is cancelled successfully, false otherwise.
     */
    public boolean cancel(@CujType int cujType) {
        EventLogTags.writeJankCujEventsCancelRequest(cujType);
        return cancel(cujType, REASON_CANCEL_NORMAL);
    }