Fix: many-events registration/unregistration speed
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 8 Aug 2016 21:08:00 +0000 (17:08 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 8 Aug 2016 21:52:33 +0000 (17:52 -0400)
commit3a38e72c90e7b93ef9bb86f506d5850e1985f363
tree50b213fbe0ab8bf684cf3eb7cba2f251c670bd3b
parent11dc92881a4e8cd59ed66387a0fbe9b409d88f79
Fix: many-events registration/unregistration speed

Batch invocation of synchronize_rcu() when unregistering many events
from a session.

Also batch invocation of synchronize_rcu() when registering the same
events within many concurrent sessions (starting from the 2nd session).

Those slowdowns are noticeable with applications processes that have a
short life-time, e.g. shell scripts spawning multiple short-lived
processes take significantly longer to complete when LD_PRELOADing a UST
probe provider.

This slowdown only occurs when UST tracing sessions are created in the
session daemon.

tracepoint_probe_update_all() (currently unused) implements a similar
mechanism which has the downside of iterating on all events in all probe
libraries (not as efficient). Move synchronize_rcu() in
tracepoint_probe_update_all() outside of the iteration on all events to
free in this function, because it is only needed between the last
callsite update and the first memory reclaim, not between list removal
and reclaim.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
liblttng-ust/lttng-events.c
liblttng-ust/tracepoint-internal.h
liblttng-ust/tracepoint.c
This page took 0.02467 seconds and 4 git commands to generate.