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

Skip to content
Commit 75d4ffca authored by Ana Krulec's avatar Ana Krulec
Browse files

Optimizing OneShotTimer::reset() function

When running simpleperf, reset() function caused every once
in a while locks, which we suspect cause occasional janking.

- Moving the state to atomic, so there is no time spent
  acquiring the lock.
- When using condition_variable, atomic still needs to be
  changed under mutex, so moving to semaphores to guard
  and signal.

See b/170665374 for analysis report.

Bug: 170665374
Test: atest DisplayMicrobenchTests while running simple perf
Test: atest OneShotTimerTest
Change-Id: Ic450ea074bc07175c3fc681b69a8009be84d30a0
parent 29258758
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment