From: Jérémie Galarneau Date: Thu, 21 Dec 2017 16:03:33 +0000 (-0500) Subject: Add likely/unlikely annotations on channel sample handling path X-Git-Tag: v2.11.0-rc1~332 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=e0b5f87b7e697508c09e8db401f40f7de296b97a;p=lttng-tools.git Add likely/unlikely annotations on channel sample handling path Signed-off-by: Jérémie Galarneau --- 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; } }