Prevent logging ProtoLog messages queued before the session starts or after it stops
Sometimes, a proto log trace message is queued before a tracing session is started, or after it is stopped, but is processed by the thread pool at a later moment. This CL addresses this problem by checking for tracing session instances to be active before tracing queued messages. It adds a set of "active instances" that tracks all instances of the data source that are actively tracing. This set is updated on the background logging service single thread, ensuring that any message in the queue is consumed after a tracing session is started or before it is stopped. Bug: 410517697 Flag: EXEMPT minor tracing change Test: atest com.android.internal.protolog.ProcessedPerfettoProtoLogImplTest Change-Id: I6cf352ed7e2756747d4c31cfba97c03418eda9f4
Loading
Please register or sign in to comment