From f8522f5cc357c0d80257d5ace1cd556a88305c0c Mon Sep 17 00:00:00 2001 From: Jonathan Rajotte Date: Tue, 4 Feb 2020 15:14:34 -0500 Subject: [PATCH] Apply policy on channel sampling MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jonathan Rajotte Signed-off-by: Jérémie Galarneau Change-Id: Id755b73c1f976a5a7d7a188656a1de21bd703143 --- src/bin/lttng-sessiond/notification-thread-events.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/bin/lttng-sessiond/notification-thread-events.c b/src/bin/lttng-sessiond/notification-thread-events.c index 398ddc389..404503042 100644 --- a/src/bin/lttng-sessiond/notification-thread-events.c +++ b/src/bin/lttng-sessiond/notification-thread-events.c @@ -4099,6 +4099,12 @@ int handle_notification_thread_channel_sample( goto put_list; } + if (!lttng_trigger_should_fire(trigger)) { + goto put_list; + } + + lttng_trigger_fire(trigger); + /* * Ownership of `evaluation` transferred to the action executor * no matter the result. -- 2.34.1