projects
/
lttng-ust.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: namespace our gettid wrapper
[lttng-ust.git]
/
liblttng-ust
/
lttng-ring-buffer-client.h
diff --git
a/liblttng-ust/lttng-ring-buffer-client.h
b/liblttng-ust/lttng-ring-buffer-client.h
index e5640b2ea0e4e7096e8729e975f75141b0892692..a261dcfe02e01cf0eba9d69626cdc83270078d10 100644
(file)
--- a/
liblttng-ust/lttng-ring-buffer-client.h
+++ b/
liblttng-ust/lttng-ring-buffer-client.h
@@
-556,12
+556,11
@@
static int client_stream_id(struct lttng_ust_lib_ring_buffer *buf,
struct lttng_ust_shm_handle *handle,
uint64_t *stream_id)
{
struct lttng_ust_shm_handle *handle,
uint64_t *stream_id)
{
- struct packet_header *header;
+ struct channel *chan = shmp(handle, buf->backend.chan);
+ struct lttng_channel *lttng_chan = channel_get_private(chan);
+
+ *stream_id = lttng_chan->id;
- header = client_packet_header(buf, handle);
- if (!header)
- return -1;
- *stream_id = header->stream_id;
return 0;
}
return 0;
}
@@
-592,10
+591,8
@@
static int client_instance_id(struct lttng_ust_lib_ring_buffer *buf,
struct lttng_ust_shm_handle *handle,
uint64_t *id)
{
struct lttng_ust_shm_handle *handle,
uint64_t *id)
{
-
struct packet_header *header
;
+
*id = buf->backend.cpu
;
- header = client_packet_header(buf, handle);
- *id = header->stream_instance_id;
return 0;
}
return 0;
}
@@
-715,8
+712,16
@@
int lttng_event_reserve(struct lttng_ust_lib_ring_buffer_ctx *ctx,
}
ret = lib_ring_buffer_reserve(&client_config, ctx);
}
ret = lib_ring_buffer_reserve(&client_config, ctx);
- if (
ret
)
+ if (
caa_unlikely(ret)
)
goto put;
goto put;
+ if (caa_likely(ctx->ctx_len
+ >= sizeof(struct lttng_ust_lib_ring_buffer_ctx))) {
+ if (lib_ring_buffer_backend_get_pages(&client_config, ctx,
+ &ctx->backend_pages)) {
+ ret = -EPERM;
+ goto put;
+ }
+ }
lttng_write_event_header(&client_config, ctx, event_id);
return 0;
put:
lttng_write_event_header(&client_config, ctx, event_id);
return 0;
put:
This page took
0.02339 seconds
and
4
git commands to generate.