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.9.0~11 X-Git-Url: http://git.liburcu.org/?p=lttng-ust.git;a=commitdiff_plain;h=0c1a7553a0a7ef4936230e7775bd743b29e908d4 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))) {