}
read_count += copy_len;
}
- return read_count;
+ goto put_record;
nodata:
*ppos = 0;
chan->iter.len_left = 0;
+
+put_record:
+ lib_ring_buffer_put_current_record(buf);
return read_count;
}
const struct lib_ring_buffer_config *config = &chan->backend.config;
int finalized, disabled;
unsigned long consumed, offset;
+ size_t subbuffer_header_size = config->cb.subbuffer_header_size();
if (filp->f_mode & FMODE_READ) {
poll_wait_set_exclusive(wait);
/*
* If there is a non-empty subbuffer, flush and try again.
*/
- if (subbuf_offset(offset, chan) != 0) {
+ if (subbuf_offset(offset, chan) > subbuffer_header_size) {
lib_ring_buffer_switch_remote(buf);
goto retry;
}
switch (event_notifier_param->event.instrumentation) {
case LTTNG_KERNEL_TRACEPOINT:
+ break;
case LTTNG_KERNEL_KPROBE:
case LTTNG_KERNEL_UPROBE:
case LTTNG_KERNEL_KRETPROBE: