SurfaceFlinger: Use a lockless stack for binder->tracing thread
Though the critical section is kept very small between the binder and tracing threads, the tracing thread is not RT, and so we still run the risk of it being descheduled and blocking one of our binder threads excessively. In this thread we provide a simple lockless stack implementation and use it to push pending transactions from the binder thread to the main thread. We also looked up "layer IDs" on the binder thread, which is no longer possible without the lock. To work around this we store the pointer itself in the proto until it reaches the tracing thread where we overwrite it with the mapped value. Bug: 200284593 Test: Existing tests pass Change-Id: I408dc87ddfe088b68f65601455147a96b870627d
Loading
Please register or sign in to comment