Message tracing: use plain long, not AtomicLong
Ensure that the value is written before the reader thread can read it. Replace the Atomic with a volatile value to avoid the extra allocation. Also fix a narrow pre-existing race where a Message could be pushed to the stack, then the enqueuing thread is interrupted immediately until that Message is dispatched, then the enqueuing thread increments the Message count and sets a flow ID (after it's already been handled). Fixes: 424307660 Test: PerfettoTraceMessageQueueTest Flag: EXEMPT bugfix Change-Id: I72c99b34660c32829af440290ce35cb132bee4d1
Loading
Please register or sign in to comment