Performance: add missing unlikely in reserve
[lttng-modules.git] / lttng-ring-buffer-client.h
index c4b7304fdfa6026153e14affbee429cf57ac53c7..63f2b4ca7befa82da0b2fdaf265f1d8f127abe11 100644 (file)
@@ -606,7 +606,7 @@ int lttng_event_reserve(struct lib_ring_buffer_ctx *ctx,
        int ret, cpu;
 
        cpu = lib_ring_buffer_get_cpu(&client_config);
-       if (cpu < 0)
+       if (unlikely(cpu < 0))
                return -EPERM;
        ctx->cpu = cpu;
 
@@ -624,7 +624,7 @@ int lttng_event_reserve(struct lib_ring_buffer_ctx *ctx,
        }
 
        ret = lib_ring_buffer_reserve(&client_config, ctx);
-       if (ret)
+       if (unlikely(ret))
                goto put;
        lib_ring_buffer_backend_get_pages(&client_config, ctx,
                        &ctx->backend_pages);
This page took 0.023913 seconds and 4 git commands to generate.