]> git.lttng.org Git - lttng-ust.git/commit
Fix: sample discarded events count before reserve
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 9 Mar 2022 21:42:15 +0000 (16:42 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 11 Mar 2022 16:39:41 +0000 (11:39 -0500)
commit25f62b0a70363a36b8af93c7f7a010532072f861
treecc25c01e3615bac16041bb286acb84464390588d
parent2515d0f098944b52d08a2eb06381a3eb7a687ee7
Fix: sample discarded events count before reserve

Sampling the discarded events count in the buffer_end callback is done
out of order, and may therefore include increments performed by following
events (in following packets) if the thread doing the end-of-packet
event write is preempted for a long time.

Sampling the event discarded counts before reserving space for the last
event in a packet, and keeping this as part of the private ring buffer
context, should fix this race.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: Ib59b634bbaefd2444751547d20a891c9dd93cd73
src/common/ringbuffer-clients/metadata-template.h
src/common/ringbuffer-clients/template.h
src/common/ringbuffer/frontend.h
src/common/ringbuffer/frontend_api.h
src/common/ringbuffer/frontend_internal.h
src/common/ringbuffer/frontend_types.h
src/common/ringbuffer/ring_buffer_frontend.c
src/common/ringbuffer/ringbuffer-config.h
This page took 0.030228 seconds and 4 git commands to generate.