diff options
| author | 2020-10-16 14:56:19 -0700 | |
|---|---|---|
| committer | 2020-10-23 09:09:50 -0700 | |
| commit | 75d4ffca8474ec7c976ebec5f15336182af12c6d (patch) | |
| tree | 4167153aa776ca5bf7b39b92c2e66967ac9ca76c /libs/gui/QueueBufferInputOutput.cpp | |
| parent | 292587587633c4557a09713bba151b8cec07a281 (diff) | |
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
Diffstat (limited to 'libs/gui/QueueBufferInputOutput.cpp')
0 files changed, 0 insertions, 0 deletions