X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=libkernelctl%2Flibkernelctl.h;h=783f1258d86a273f6f1fb87d6bfb9f60bb8f3b4f;hb=99497cd03fb27fd2416a88d80292a0cc5647bff2;hp=36d7175f083d61b1f18270d49b7c4fef7059153d;hpb=16421f6edd83b37e777b55add8396a91afcbb08a;p=lttng-tools.git diff --git a/libkernelctl/libkernelctl.h b/libkernelctl/libkernelctl.h index 36d7175f0..783f1258d 100644 --- a/libkernelctl/libkernelctl.h +++ b/libkernelctl/libkernelctl.h @@ -4,8 +4,8 @@ * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * as published by the Free Software Foundation; only version 2 + * of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -22,23 +22,50 @@ #include -int kernctl_create_channel(int, struct lttng_channel*); -int kernctl_create_event(int, struct lttng_event*); -int kernctl_create_session(int); -int kernctl_create_stream(int); -int kernctl_get_max_subbuf_size(int, unsigned long*); -int kernctl_get_mmap_len(int, unsigned long*); -int kernctl_get_mmap_read_offset(int, unsigned long*); -int kernctl_get_next_subbuf(int); -int kernctl_get_padded_subbuf_size(int, unsigned long*); -int kernctl_get_subbuf(int fd, unsigned long*); -int kernctl_get_subbuf_size(int, unsigned long *); -int kernctl_put_next_subbuf(int); +#include "lttng-kernel.h" + +int kernctl_create_session(int fd); +int kernctl_open_metadata(int fd, struct lttng_channel_attr *chops); +int kernctl_create_channel(int fd, struct lttng_channel_attr *chops); +int kernctl_create_stream(int fd); +int kernctl_create_event(int fd, struct lttng_kernel_event *ev); +int kernctl_add_context(int fd, struct lttng_kernel_context *ctx); + +int kernctl_enable(int fd); +int kernctl_disable(int fd); +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); +int kernctl_wait_quiescent(int fd); +int kernctl_calibrate(int fd, struct lttng_kernel_calibrate *calibrate); + + +/* Buffer operations */ + +/* For mmap mode, readable without "get" operation */ +int kernctl_get_mmap_len(int fd, unsigned long *len); +int kernctl_get_max_subbuf_size(int fd, unsigned long *len); + +/* + * For mmap mode, operate on the current packet (between get/put or + * get_next/put_next). + */ +int kernctl_get_mmap_read_offset(int fd, unsigned long *len); +int kernctl_get_subbuf_size(int fd, unsigned long *len); +int kernctl_get_padded_subbuf_size(int fd, unsigned long *len); + +int kernctl_get_next_subbuf(int fd); +int kernctl_put_next_subbuf(int fd); + +/* snapshot */ +int kernctl_snapshot(int fd); +int kernctl_snapshot_get_consumed(int fd, unsigned long *pos); +int kernctl_snapshot_get_produced(int fd, unsigned long *pos); +int kernctl_get_subbuf(int fd, unsigned long *pos); int kernctl_put_subbuf(int fd); -int kernctl_snapshot(int); -int kernctl_snapshot_get_consumed(int, unsigned long*); -int kernctl_snapshot_get_produced(int, unsigned long*); -int kernctl_start_session(int); -int kernctl_stop_session(int); + +int kernctl_buffer_flush(int fd); #endif /* _LTT_LIBKERNELCTL_H */