From: Jérémie Galarneau Date: Wed, 21 Nov 2018 15:30:15 +0000 (-0500) Subject: Acquire a reference to a session when a timer is active X-Git-Tag: v2.12.0-rc1~736 X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=commitdiff_plain;h=c7031a2c707646804e0088d069578d5eb74fc01e;hp=c7031a2c707646804e0088d069578d5eb74fc01e Acquire a reference to a session when a timer is active The timers associated to a session don't directly reference a session since, up to recently, session objects were not reference counted. There was essentially no mechanism in place to prevent a session from being destroyed while one of its timers was active. For this reason, the session was queried by id on every execution of its timers. However, this did not prevent the session from being destroyed; it only allowed the periodic jobs to handle that condition gracefully. This change that a reference to the session is held at all times by periodic jobs that are "in-flight". Signed-off-by: Jérémie Galarneau ---