From: Mathieu Desnoyers Date: Mon, 21 Nov 2016 20:58:29 +0000 (-0500) Subject: Performance: add missing "caa_unlikely" on fast-path X-Git-Tag: v2.10.0-rc1~34 X-Git-Url: http://git.lttng.org/?p=lttng-ust.git;a=commitdiff_plain;h=630d6836f88124699c2a4554aeb33d9793f6764a 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 --- 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))) {