From: Julien Desfossez Date: Mon, 6 Jul 2015 17:22:32 +0000 (-0400) Subject: kernctl commands to extract the stream instance id X-Git-Tag: v2.8.0-rc1~86 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=000fa86f1276f62aa32cdb18f6556db1bdeee09b;p=lttng-tools.git kernctl commands to extract the stream instance id Signed-off-by: Julien Desfossez Acked-by: Mathieu Desnoyers Signed-off-by: Jérémie Galarneau --- diff --git a/src/common/kernel-ctl/kernel-ctl.c b/src/common/kernel-ctl/kernel-ctl.c index 82d766e1c..dd228773b 100644 --- a/src/common/kernel-ctl/kernel-ctl.c +++ b/src/common/kernel-ctl/kernel-ctl.c @@ -538,3 +538,9 @@ int kernctl_get_sequence_number(int fd, uint64_t *seq) { return ioctl(fd, LTTNG_RING_BUFFER_GET_SEQ_NUM, seq); } + +/* Returns the stream instance id. */ +int kernctl_get_instance_id(int fd, uint64_t *id) +{ + return ioctl(fd, LTTNG_RING_BUFFER_INSTANCE_ID, id); +} diff --git a/src/common/kernel-ctl/kernel-ctl.h b/src/common/kernel-ctl/kernel-ctl.h index ab8154ca6..929488841 100644 --- a/src/common/kernel-ctl/kernel-ctl.h +++ b/src/common/kernel-ctl/kernel-ctl.h @@ -100,5 +100,6 @@ int kernctl_get_packet_size(int fd, uint64_t *packet_size); int kernctl_get_stream_id(int fd, uint64_t *stream_id); int kernctl_get_current_timestamp(int fd, uint64_t *ts); int kernctl_get_sequence_number(int fd, uint64_t *seq); +int kernctl_get_instance_id(int fd, uint64_t *seq); #endif /* _LTTNG_KERNEL_CTL_H */ diff --git a/src/common/kernel-ctl/kernel-ioctl.h b/src/common/kernel-ctl/kernel-ioctl.h index d988a83ea..b37605bb1 100644 --- a/src/common/kernel-ctl/kernel-ioctl.h +++ b/src/common/kernel-ctl/kernel-ioctl.h @@ -66,6 +66,8 @@ #define LTTNG_RING_BUFFER_GET_CURRENT_TIMESTAMP _IOR(0xF6, 0x26, uint64_t) /* returns the packet sequence number */ #define LTTNG_RING_BUFFER_GET_SEQ_NUM _IOR(0xF6, 0x27, uint64_t) +/* returns the stream instance id */ +#define LTTNG_RING_BUFFER_INSTANCE_ID _IOR(0xF6, 0x28, uint64_t) /* Old ABI (without support for 32/64 bits compat) */ /* LTTng file descriptor ioctl */