X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=src%2Fcommon%2Fkernel-ctl%2Fkernel-ctl.c;h=fffa64c87dd79cdec16e53380b5ba0003b257d44;hb=b007ec59a0b4fef96860cc92325795890191af11;hp=3d12df4177db3f686dc482562fab286473efd487;hpb=5226f1bc2f82f9c68e974a6e49a7bcdb547f6a55;p=lttng-tools.git diff --git a/src/common/kernel-ctl/kernel-ctl.c b/src/common/kernel-ctl/kernel-ctl.c index 3d12df417..fffa64c87 100644 --- a/src/common/kernel-ctl/kernel-ctl.c +++ b/src/common/kernel-ctl/kernel-ctl.c @@ -225,11 +225,16 @@ int kernctl_list_tracker_pids(int fd) return LTTNG_IOCTL_NO_CHECK(fd, LTTNG_KERNEL_SESSION_LIST_TRACKER_PIDS); } -int kernctl_session_metadata_regenerate(int fd) +int kernctl_session_regenerate_metadata(int fd) { return LTTNG_IOCTL_CHECK(fd, LTTNG_KERNEL_SESSION_METADATA_REGEN); } +int kernctl_session_regenerate_statedump(int fd) +{ + return LTTNG_IOCTL_CHECK(fd, LTTNG_KERNEL_SESSION_STATEDUMP); +} + int kernctl_create_stream(int fd) { return compat_ioctl_no_arg(fd, LTTNG_KERNEL_OLD_STREAM, @@ -393,37 +398,6 @@ int kernctl_wait_quiescent(int fd) LTTNG_KERNEL_WAIT_QUIESCENT); } -int kernctl_calibrate(int fd, struct lttng_kernel_calibrate *calibrate) -{ - int ret; - - if (lttng_kernel_use_old_abi == -1) { - ret = LTTNG_IOCTL_CHECK(fd, LTTNG_KERNEL_CALIBRATE, calibrate); - if (!ret) { - lttng_kernel_use_old_abi = 0; - goto end; - } - lttng_kernel_use_old_abi = 1; - } - if (lttng_kernel_use_old_abi) { - struct lttng_kernel_old_calibrate old_calibrate; - - old_calibrate.type = calibrate->type; - ret = LTTNG_IOCTL_CHECK(fd, LTTNG_KERNEL_OLD_CALIBRATE, - &old_calibrate); - if (ret) { - goto end; - } - calibrate->type = old_calibrate.type; - } else { - ret = LTTNG_IOCTL_CHECK(fd, LTTNG_KERNEL_CALIBRATE, calibrate); - } - -end: - return ret; -} - - int kernctl_buffer_flush(int fd) { return LTTNG_IOCTL_CHECK(fd, RING_BUFFER_FLUSH); @@ -496,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) {