From e0b5f87b7e697508c09e8db401f40f7de296b97a Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Thu, 21 Dec 2017 11:03:33 -0500 Subject: [PATCH] Add likely/unlikely annotations on channel sample handling path MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérémie Galarneau --- src/bin/lttng-sessiond/notification-thread-events.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/bin/lttng-sessiond/notification-thread-events.c b/src/bin/lttng-sessiond/notification-thread-events.c index 254aa5396..87939f066 100644 --- a/src/bin/lttng-sessiond/notification-thread-events.c +++ b/src/bin/lttng-sessiond/notification-thread-events.c @@ -2404,7 +2404,7 @@ int handle_notification_thread_channel_sample( &latest_sample.key, &iter); node = cds_lfht_iter_get_node(&iter); - if (!node) { + if (caa_unlikely(!node)) { /* * Not an error since the consumer can push a sample to the pipe * and the rest of the session daemon could notify us of the @@ -2433,7 +2433,7 @@ int handle_notification_thread_channel_sample( &latest_sample.key, &iter); node = cds_lfht_iter_get_node(&iter); - if (node) { + if (caa_likely(node)) { struct channel_state_sample *stored_sample; /* Update the sample stored. */ @@ -2472,7 +2472,7 @@ int handle_notification_thread_channel_sample( &latest_sample.key, &iter); node = cds_lfht_iter_get_node(&iter); - if (!node) { + if (caa_likely(!node)) { goto end_unlock; } @@ -2535,7 +2535,7 @@ int handle_notification_thread_channel_sample( channel_info->session_info->uid, channel_info->session_info->gid); lttng_evaluation_destroy(evaluation); - if (ret) { + if (caa_unlikely(ret)) { goto end_unlock; } } -- 2.34.1