X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=src%2Fcommon%2Fkernel-ctl%2Fkernel-ctl.c;h=2efbfa19d7bb21288845ad2070a893b323479122;hb=88be8d77519f987de53a8f1f17aeec296dddb283;hp=a495ca9b705bee48c94d7d32c9b602cbc9a48a7f;hpb=8024cc8c4f2b6b0413b2e8d5b5bf01024a91a337;p=lttng-tools.git diff --git a/src/common/kernel-ctl/kernel-ctl.c b/src/common/kernel-ctl/kernel-ctl.c index a495ca9b7..2efbfa19d 100644 --- a/src/common/kernel-ctl/kernel-ctl.c +++ b/src/common/kernel-ctl/kernel-ctl.c @@ -22,9 +22,11 @@ #include #include #include +#include #include #include #include +#include #include "kernel-ctl.h" #include "kernel-ioctl.h" @@ -238,6 +240,39 @@ int kernctl_session_regenerate_statedump(int fd) return LTTNG_IOCTL_CHECK(fd, LTTNG_KERNEL_SESSION_STATEDUMP); } +int kernctl_session_set_name(int fd, const char *name) +{ + int ret; + struct lttng_kernel_session_name session_name; + + ret = lttng_strncpy(session_name.name, name, sizeof(session_name.name)); + if (ret) { + goto end; + } + + ret = LTTNG_IOCTL_CHECK( + fd, LTTNG_KERNEL_SESSION_SET_NAME, &session_name); +end: + return ret; +} + +int kernctl_session_set_creation_time(int fd, time_t time) +{ + int ret; + struct lttng_kernel_session_creation_time creation_time; + + ret = time_to_iso8601_str(time, creation_time.iso8601, + sizeof(creation_time.iso8601)); + if (ret) { + goto end; + } + + ret = LTTNG_IOCTL_CHECK(fd, LTTNG_KERNEL_SESSION_SET_CREATION_TIME, + &creation_time); +end: + return ret; +} + int kernctl_create_stream(int fd) { return compat_ioctl_no_arg(fd, LTTNG_KERNEL_OLD_STREAM, @@ -350,6 +385,11 @@ int kernctl_filter(int fd, struct lttng_filter_bytecode *filter) return ret; } +int kernctl_add_callsite(int fd, struct lttng_kernel_event_callsite *callsite) +{ + return LTTNG_IOCTL_CHECK(fd, LTTNG_KERNEL_ADD_CALLSITE, callsite); +} + int kernctl_tracepoint_list(int fd) { return compat_ioctl_no_arg(fd, LTTNG_KERNEL_OLD_TRACEPOINT_LIST, @@ -413,6 +453,13 @@ int kernctl_buffer_flush_empty(int fd) return LTTNG_IOCTL_CHECK(fd, RING_BUFFER_FLUSH_EMPTY); } +int kernctl_get_next_subbuf_metadata_check(int fd, bool *consistent) +{ + return LTTNG_IOCTL_NO_CHECK(fd, + RING_RING_BUFFER_GET_NEXT_SUBBUF_METADATA_CHECK, + consistent); +} + /* returns the version of the metadata. */ int kernctl_get_metadata_version(int fd, uint64_t *version) {