diff options
| author | 2024-08-12 22:54:09 +0000 | |
|---|---|---|
| committer | 2024-08-14 16:54:18 +0000 | |
| commit | b056f98cc6a6195357172fa27642d7d66ba5df2a (patch) | |
| tree | a5a4c3bb122f1d7f5ad63f00d4b8054428b298f7 /api/coverage/tools | |
| parent | e4ec8c4093b2134fbd04ecace85c20cdfe138e65 (diff) | |
Remove lock from send start timestamps
It can occur that doDie and surfaceflinger callback occur
simultaneously, this will result in doDie holding the
ViewRootImpl lock while it waits for dequeueBuffer but
maybeSendAppStartTimes will be blocking the thread
waiting on the same lock causing a deadlock.
To remedy this, replace the lock with an atomic variable
for mAppStartTimestampsSent and post to main thread in
all cases. The synchronization only exists to ensure that
sending timestamp is not triggered multiple times
simultaneously, so this is sufficient. Post to main thread
in all cases to ensure values are updated.
Test: AppStartTests, no way to test the actual deadlock
Bug: 359627195
Bug: 357735727
Bug: 357795880
Flag: NONE infeasible
Change-Id: I9c1f7b677b8db93a9ec5a54cf7d0aa9dd9100bb8
Diffstat (limited to 'api/coverage/tools')
0 files changed, 0 insertions, 0 deletions