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

Commit 51e73d36 authored by Andy Hung's avatar Andy Hung
Browse files

TimeCheck: Track waiting through thread join in AudioFlinger

The TimeCheck watchdog is used to diagnose binder stalls.
When one occurs, it does a thread-wait analysis, tracking
downstream to the ultimate thread the target is blocked on.

We add thread join diagnostic tracing in AudioFlinger
ThreadBase::exit().

Test: atest CtsMediaAudioTestCases
Bug: 328693634
Change-Id: Id633d1371c6aedd111a04510c49e95729a0c7790
parent a7ebac08
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -694,6 +694,10 @@ void ThreadBase::exit()
    }
    // When Thread::requestExitAndWait is made virtual and this method is renamed to
    // "virtual status_t requestExitAndWait()", replace by "return Thread::requestExitAndWait();"

    // For TimeCheck: track waiting on the thread join of getTid().
    audio_utils::mutex::scoped_join_wait_check sjw(getTid());

    requestExitAndWait();
}