From: Julien Desfossez Date: Tue, 24 May 2011 19:49:54 +0000 (+0200) Subject: Libkernctl sync ioctl values X-Git-Tag: v2.0-pre1~122 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=8d609afd07d40f27a17e6a0fe61ea3a54e111896;p=lttng-tools.git Libkernctl sync ioctl values Updated ioctl values, add kernel tracepoint_list and tracer_version Signed-off-by: Julien Desfossez --- diff --git a/libkernelctl/kernel-ioctl.h b/libkernelctl/kernel-ioctl.h index 5e2358c8d..0db8383b0 100644 --- a/libkernelctl/kernel-ioctl.h +++ b/libkernelctl/kernel-ioctl.h @@ -47,18 +47,21 @@ #define RING_BUFFER_GET_MMAP_READ_OFFSET _IOR(0xF6, 0x0B, unsigned long) #define LTTNG_KERNEL_SESSION _IO(0xF6, 0x40) -#define LTTNG_KERNEL_SESSION_START _IO(0xF6, 0x41) -#define LTTNG_KERNEL_SESSION_STOP _IO(0xF6, 0x42) -#define LTTNG_KERNEL_CHANNEL \ - _IOW(0xF6, 0x43, struct lttng_kernel_channel) -#define LTTNG_KERNEL_STREAM _IO(0xF6, 0x44) -#define LTTNG_KERNEL_EVENT \ - _IOW(0xF6, 0x45, struct lttng_kernel_event) -#define LTTNG_KERNEL_METADATA \ - _IOW(0xF6, 0x46, struct lttng_kernel_channel) -#define LTTNG_KERNEL_KPROBE \ - _IOW(0xF6, 0x47, struct lttng_kernel_kprobe) -#define LTTNG_KERNEL_TRACER_VERSION \ - _IOR(0xF6, 0x48, struct lttng_kernel_tracer_version) +#define LTTNG_KERNEL_TRACER_VERSION \ + _IOR(0xF6, 0x41, struct lttng_kernel_tracer_version) +#define LTTNG_KERNEL_TRACEPOINT_LIST _IO(0xF6, 0x42) + +/* Session FD ioctl */ +#define LTTNG_KERNEL_METADATA \ + _IOW(0xF6, 0x50, struct lttng_kernel_channel) +#define LTTNG_KERNEL_CHANNEL \ + _IOW(0xF6, 0x51, struct lttng_kernel_channel) +#define LTTNG_KERNEL_SESSION_START _IO(0xF6, 0x52) +#define LTTNG_KERNEL_SESSION_STOP _IO(0xF6, 0x53) + +/* Channel FD ioctl */ +#define LTTNG_KERNEL_STREAM _IO(0xF6, 0x60) +#define LTTNG_KERNEL_EVENT \ + _IOW(0xF6, 0x61, struct lttng_kernel_event) #endif /* _LTT_KERNEL_IOCTL_H */ diff --git a/libkernelctl/libkernelctl.c b/libkernelctl/libkernelctl.c index c06f57969..cfac1fa5c 100644 --- a/libkernelctl/libkernelctl.c +++ b/libkernelctl/libkernelctl.c @@ -131,3 +131,12 @@ int kernctl_stop_session(int fd) return ioctl(fd, LTTNG_KERNEL_SESSION_STOP); } +int kernctl_tracepoint_list(int fd) +{ + return ioctl(fd, LTTNG_KERNEL_TRACEPOINT_LIST); +} + +int kernctl_tracer_version(int fd, struct lttng_kernel_tracer_version *v) +{ + return ioctl(fd, LTTNG_KERNEL_TRACER_VERSION, v); +} diff --git a/libkernelctl/libkernelctl.h b/libkernelctl/libkernelctl.h index 34be7a5d3..938c079dc 100644 --- a/libkernelctl/libkernelctl.h +++ b/libkernelctl/libkernelctl.h @@ -41,5 +41,7 @@ int kernctl_snapshot_get_consumed(int fd, unsigned long *len); int kernctl_snapshot_get_produced(int fd, unsigned long *len); int kernctl_start_session(int fd); int kernctl_stop_session(int fd); +int kernctl_tracepoint_list(int fd); +int kernctl_tracer_version(int fd, struct lttng_kernel_tracer_version *v); #endif /* _LTT_LIBKERNELCTL_H */