ssize_t read_len;
unsigned long len, padded_len;
const char *subbuf_addr;
+ struct lttng_buffer_view subbuf_view;
health_code_update();
goto error_put_subbuf;
}
+ subbuf_view = lttng_buffer_view_init(
+ subbuf_addr, 0, padded_len);
read_len = lttng_consumer_on_read_subbuffer_mmap(ctx,
- stream, subbuf_addr, len,
- padded_len - len, NULL);
+ stream, &subbuf_view, padded_len - len,
+ NULL);
if (use_relayd) {
if (read_len != len) {
ret = -EPERM;
struct ustctl_consumer_stream *ustream;
struct ctf_packet_index index;
const char *subbuf_addr;
+ struct lttng_buffer_view subbuf_view;
assert(stream);
assert(stream->ustream);
goto error_put_subbuf;
}
+ subbuf_view = lttng_buffer_view_init(subbuf_addr, 0, len);
+
/* write the subbuffer to the tracefile */
ret = lttng_consumer_on_read_subbuffer_mmap(
- ctx, stream, subbuf_addr, subbuf_size, padding, &index);
+ ctx, stream, &subbuf_view, padding, &index);
/*
* The mmap operation should write subbuf_size amount of data when
* network streaming or the full padding (len) size when we are _not_