projects
/
lttng-modules.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Performance: add missing unlikely in reserve
[lttng-modules.git]
/
lttng-ring-buffer-client.h
diff --git
a/lttng-ring-buffer-client.h
b/lttng-ring-buffer-client.h
index c4b7304fdfa6026153e14affbee429cf57ac53c7..63f2b4ca7befa82da0b2fdaf265f1d8f127abe11 100644
(file)
--- a/
lttng-ring-buffer-client.h
+++ b/
lttng-ring-buffer-client.h
@@
-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);
int ret, cpu;
cpu = lib_ring_buffer_get_cpu(&client_config);
- if (
cpu < 0
)
+ if (
unlikely(cpu < 0)
)
return -EPERM;
ctx->cpu = cpu;
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);
}
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);
goto put;
lib_ring_buffer_backend_get_pages(&client_config, ctx,
&ctx->backend_pages);
This page took
0.024117 seconds
and
4
git commands to generate.