From 630d6836f88124699c2a4554aeb33d9793f6764a Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Mon, 21 Nov 2016 15:58:29 -0500 Subject: [PATCH] Performance: add missing "caa_unlikely" on fast-path There is a missing branch prediction hint on the return value of lib_ring_buffer_reserve(). Signed-off-by: Mathieu Desnoyers --- liblttng-ust/lttng-ring-buffer-client.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/liblttng-ust/lttng-ring-buffer-client.h b/liblttng-ust/lttng-ring-buffer-client.h index c5867dc1..6ed06710 100644 --- a/liblttng-ust/lttng-ring-buffer-client.h +++ b/liblttng-ust/lttng-ring-buffer-client.h @@ -715,7 +715,7 @@ int lttng_event_reserve(struct lttng_ust_lib_ring_buffer_ctx *ctx, } ret = lib_ring_buffer_reserve(&client_config, ctx); - if (ret) + if (caa_unlikely(ret)) goto put; if (caa_likely(ctx->ctx_len >= sizeof(struct lttng_ust_lib_ring_buffer_ctx))) { -- 2.34.1