X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fcommon%2Fkernel-ctl%2Fkernel-ctl.c;h=fffa64c87dd79cdec16e53380b5ba0003b257d44;hp=839a8600e2a3a94ca3eab38b03863138225758fa;hb=b007ec59a0b4fef96860cc92325795890191af11;hpb=b0880ae543e5a637f05aeda604e958efb523a224 diff --git a/src/common/kernel-ctl/kernel-ctl.c b/src/common/kernel-ctl/kernel-ctl.c index 839a8600e..fffa64c87 100644 --- a/src/common/kernel-ctl/kernel-ctl.c +++ b/src/common/kernel-ctl/kernel-ctl.c @@ -470,6 +470,16 @@ int kernctl_snapshot(int fd) return LTTNG_IOCTL_CHECK(fd, RING_BUFFER_SNAPSHOT); } +/* + * Get a snapshot of the current ring buffer producer and consumer positions, + * regardless of whether or not the two positions are contained within the + * same sub-buffer. + */ +int kernctl_snapshot_sample_positions(int fd) +{ + return LTTNG_IOCTL_CHECK(fd, RING_BUFFER_SNAPSHOT_SAMPLE_POSITIONS); +} + /* Get the consumer position (iteration start) */ int kernctl_snapshot_get_consumed(int fd, unsigned long *pos) {