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:26 +0000 (17:52 -0400)
commitbaa1e0bcf6630bd3f9282b82586d1a730f3d7ae2
tree1b04721e8fe55a721ebff5298d2712c529feec82
parentf4a90c3e8f3f5e8dd5c1896afb82fa96c1a32f22
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.024412 seconds and 4 git commands to generate.