X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=libkernelctl%2Flibkernelctl.c;h=cfac1fa5c80ce32faa603315e2e5afa0a7142ca1;hp=e99e777c3ab0b25221e421db9aaca96cc8508cbc;hb=dbc03870c703720806e7859df4521293090c0c56;hpb=16421f6edd83b37e777b55add8396a91afcbb08a diff --git a/libkernelctl/libkernelctl.c b/libkernelctl/libkernelctl.c index e99e777c3..cfac1fa5c 100644 --- a/libkernelctl/libkernelctl.c +++ b/libkernelctl/libkernelctl.c @@ -23,24 +23,24 @@ #include "libkernelctl.h" #include "lttngerr.h" -int kernctl_create_channel(int fd, struct lttng_channel *chops) +int kernctl_create_channel(int fd, struct lttng_kernel_channel *chops) { - return ioctl(fd, KERNEL_IO_CREATE_CHANNEL, chops); + return ioctl(fd, LTTNG_KERNEL_CHANNEL, chops); } -int kernctl_create_event(int fd, struct lttng_event *ev) +int kernctl_create_event(int fd, struct lttng_kernel_event *ev) { - return ioctl(fd, KERNEL_IO_CREATE_EVENT, ev); + return ioctl(fd, LTTNG_KERNEL_EVENT, ev); } int kernctl_create_session(int fd) { - return ioctl(fd, KERNEL_IO_CREATE_SESSION); + return ioctl(fd, LTTNG_KERNEL_SESSION); } int kernctl_create_stream(int fd) { - return ioctl(fd, KERNEL_IO_CREATE_STREAM); + return ioctl(fd, LTTNG_KERNEL_STREAM); } /* returns the maximum size for sub-buffers. */ @@ -85,6 +85,12 @@ int kernctl_get_subbuf_size(int fd, unsigned long *len) return ioctl(fd, RING_BUFFER_GET_SUBBUF_SIZE, len); } +/* open the metadata global channel */ +int kernctl_open_metadata(int fd, struct lttng_kernel_channel *chops) +{ + return ioctl(fd, LTTNG_KERNEL_METADATA, chops); +} + /* Release exclusive sub-buffer access, move consumer forward. */ int kernctl_put_next_subbuf(int fd) { @@ -117,11 +123,20 @@ int kernctl_snapshot_get_produced(int fd, unsigned long *pos) int kernctl_start_session(int fd) { - return ioctl(fd, KERNEL_IO_SESSION_START); + return ioctl(fd, LTTNG_KERNEL_SESSION_START); } int kernctl_stop_session(int fd) { - return ioctl(fd, KERNEL_IO_SESSION_STOP); + 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); +}