Remove calibrate from liblttng-ctl
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Tue, 14 Jun 2016 23:10:30 +0000 (19:10 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 7 Oct 2016 16:16:05 +0000 (12:16 -0400)
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
include/lttng/lttng.h
src/common/kernel-ctl/kernel-ctl.c
src/common/kernel-ctl/kernel-ctl.h
src/common/kernel-ctl/kernel-ioctl.h
src/common/lttng-kernel-old.h
src/common/lttng-kernel.h
src/common/sessiond-comm/sessiond-comm.h
src/lib/lttng-ctl/lttng-ctl.c

index d37d6c06510528423025fd4ba250fb87651e83cd..5478641b2eb66f0d6139281c2d4c7a61220f8cd4 100644 (file)
@@ -111,11 +111,8 @@ extern int lttng_stop_tracing(const char *session_name);
 extern int lttng_stop_tracing_no_wait(const char *session_name);
 
 /*
 extern int lttng_stop_tracing_no_wait(const char *session_name);
 
 /*
- * Calibrate LTTng overhead.
- *
- * The chan and handle params can not be NULL.
- *
- * Return 0 on success else a negative LTTng error code.
+ * Deprecated: As of LTTng 2.9, this function always returns
+ * -LTTNG_ERR_UND.
  */
 extern int lttng_calibrate(struct lttng_handle *handle,
                struct lttng_calibrate *calibrate);
  */
 extern int lttng_calibrate(struct lttng_handle *handle,
                struct lttng_calibrate *calibrate);
index 1c2ab61886c824d62389efa39d777f162bb59c36..839a8600e2a3a94ca3eab38b03863138225758fa 100644 (file)
@@ -398,37 +398,6 @@ int kernctl_wait_quiescent(int fd)
                        LTTNG_KERNEL_WAIT_QUIESCENT);
 }
 
                        LTTNG_KERNEL_WAIT_QUIESCENT);
 }
 
-int kernctl_calibrate(int fd, struct lttng_kernel_calibrate *calibrate)
-{
-       int ret;
-
-       if (lttng_kernel_use_old_abi == -1) {
-               ret = LTTNG_IOCTL_CHECK(fd, LTTNG_KERNEL_CALIBRATE, calibrate);
-               if (!ret) {
-                       lttng_kernel_use_old_abi = 0;
-                       goto end;
-               }
-               lttng_kernel_use_old_abi = 1;
-       }
-       if (lttng_kernel_use_old_abi) {
-               struct lttng_kernel_old_calibrate old_calibrate;
-
-               old_calibrate.type = calibrate->type;
-               ret = LTTNG_IOCTL_CHECK(fd, LTTNG_KERNEL_OLD_CALIBRATE,
-                               &old_calibrate);
-               if (ret) {
-                       goto end;
-               }
-               calibrate->type = old_calibrate.type;
-       } else {
-               ret = LTTNG_IOCTL_CHECK(fd, LTTNG_KERNEL_CALIBRATE, calibrate);
-       }
-
-end:
-       return ret;
-}
-
-
 int kernctl_buffer_flush(int fd)
 {
        return LTTNG_IOCTL_CHECK(fd, RING_BUFFER_FLUSH);
 int kernctl_buffer_flush(int fd)
 {
        return LTTNG_IOCTL_CHECK(fd, RING_BUFFER_FLUSH);
index 7c25a17c35e69378074ad812c7413d926e8ae7ba..a8c27dd3a7f143d2e3f6bdee1d10df6b79116992 100644 (file)
@@ -44,7 +44,6 @@ int kernctl_syscall_list(int fd);
 int kernctl_tracer_version(int fd, struct lttng_kernel_tracer_version *v);
 int kernctl_tracer_abi_version(int fd, struct lttng_kernel_tracer_abi_version *v);
 int kernctl_wait_quiescent(int fd);
 int kernctl_tracer_version(int fd, struct lttng_kernel_tracer_version *v);
 int kernctl_tracer_abi_version(int fd, struct lttng_kernel_tracer_abi_version *v);
 int kernctl_wait_quiescent(int fd);
-int kernctl_calibrate(int fd, struct lttng_kernel_calibrate *calibrate);
 
 /*
  * kernctl_syscall_mask - Get syscall mask associated to a channel FD.
 
 /*
  * kernctl_syscall_mask - Get syscall mask associated to a channel FD.
index e235d109309350501417a537bd69380e6ef10e64..2ade00cd1b99091ab4cc5e4dc1977b7da806d285 100644 (file)
@@ -78,8 +78,6 @@
                _IOR(0xF6, 0x41, struct lttng_kernel_old_tracer_version)
 #define LTTNG_KERNEL_OLD_TRACEPOINT_LIST        _IO(0xF6, 0x42)
 #define LTTNG_KERNEL_OLD_WAIT_QUIESCENT         _IO(0xF6, 0x43)
                _IOR(0xF6, 0x41, struct lttng_kernel_old_tracer_version)
 #define LTTNG_KERNEL_OLD_TRACEPOINT_LIST        _IO(0xF6, 0x42)
 #define LTTNG_KERNEL_OLD_WAIT_QUIESCENT         _IO(0xF6, 0x43)
-#define LTTNG_KERNEL_OLD_CALIBRATE             \
-       _IOWR(0xF6, 0x44, struct lttng_kernel_old_calibrate)
 
 /* Session FD ioctl */
 #define LTTNG_KERNEL_OLD_METADATA               \
 
 /* Session FD ioctl */
 #define LTTNG_KERNEL_OLD_METADATA               \
        _IOR(0xF6, 0x46, struct lttng_kernel_tracer_version)
 #define LTTNG_KERNEL_TRACEPOINT_LIST   _IO(0xF6, 0x47)
 #define LTTNG_KERNEL_WAIT_QUIESCENT            _IO(0xF6, 0x48)
        _IOR(0xF6, 0x46, struct lttng_kernel_tracer_version)
 #define LTTNG_KERNEL_TRACEPOINT_LIST   _IO(0xF6, 0x47)
 #define LTTNG_KERNEL_WAIT_QUIESCENT            _IO(0xF6, 0x48)
-#define LTTNG_KERNEL_CALIBRATE                 \
-       _IOWR(0xF6, 0x49, struct lttng_kernel_calibrate)
 #define LTTNG_KERNEL_SYSCALL_LIST              _IO(0xF6, 0x4A)
 #define LTTNG_KERNEL_TRACER_ABI_VERSION                \
        _IOR(0xF6, 0x4B, struct lttng_kernel_tracer_abi_version)
 #define LTTNG_KERNEL_SYSCALL_LIST              _IO(0xF6, 0x4A)
 #define LTTNG_KERNEL_TRACER_ABI_VERSION                \
        _IOR(0xF6, 0x4B, struct lttng_kernel_tracer_abi_version)
index 1b8999afbd381a48e49eb444c50cb4a29787cded..ed7fd2d726e4c7a5c53bc3b9ea9b06d75889383c 100644 (file)
@@ -93,10 +93,6 @@ struct lttng_kernel_old_tracer_version {
        uint32_t patchlevel;
 };
 
        uint32_t patchlevel;
 };
 
-struct lttng_kernel_old_calibrate {
-       enum lttng_kernel_calibrate_type type;  /* type (input) */
-};
-
 /*
  * kernel channel
  */
 /*
  * kernel channel
  */
index 78d5fc449ced3d3aae92e6feb1e35a3335d78509..8d87539a47ac25b05a8e86d239422a1af8a81dc2 100644 (file)
@@ -129,14 +129,6 @@ struct lttng_kernel_tracer_abi_version {
        uint32_t minor;
 } LTTNG_PACKED;
 
        uint32_t minor;
 } LTTNG_PACKED;
 
-enum lttng_kernel_calibrate_type {
-       LTTNG_KERNEL_CALIBRATE_KRETPROBE,
-};
-
-struct lttng_kernel_calibrate {
-       enum lttng_kernel_calibrate_type type;  /* type (input) */
-} LTTNG_PACKED;
-
 struct lttng_kernel_syscall_mask {
        uint32_t len;   /* in bits */
        char mask[];
 struct lttng_kernel_syscall_mask {
        uint32_t len;   /* in bits */
        char mask[];
index 628b1ea674d96a15964b932b58bafaa09fac3f9b..0c2667031b55bd5603adaca04b09bf5fcab808c1 100644 (file)
@@ -56,7 +56,7 @@
 enum lttcomm_sessiond_command {
        /* Tracer command */
        LTTNG_ADD_CONTEXT                   = 0,
 enum lttcomm_sessiond_command {
        /* Tracer command */
        LTTNG_ADD_CONTEXT                   = 0,
-       LTTNG_CALIBRATE                     = 1,
+       /* LTTNG_CALIBRATE used to be here */
        LTTNG_DISABLE_CHANNEL               = 2,
        LTTNG_DISABLE_EVENT                 = 3,
        LTTNG_LIST_SYSCALLS                 = 4,
        LTTNG_DISABLE_CHANNEL               = 2,
        LTTNG_DISABLE_EVENT                 = 3,
        LTTNG_LIST_SYSCALLS                 = 4,
index bcd59f0c637979cccb09ce923db97d9146e35508..f0b211c7b4a426e959855637ce23d7c08496143d 100644 (file)
@@ -1927,26 +1927,13 @@ int lttng_set_tracing_group(const char *name)
        return 0;
 }
 
        return 0;
 }
 
-/*
- * Returns size of returned session payload data or a negative error code.
- */
 int lttng_calibrate(struct lttng_handle *handle,
                struct lttng_calibrate *calibrate)
 {
 int lttng_calibrate(struct lttng_handle *handle,
                struct lttng_calibrate *calibrate)
 {
-       struct lttcomm_session_msg lsm;
-
-       /* Safety check. NULL pointer are forbidden */
-       if (handle == NULL || calibrate == NULL) {
-               return -LTTNG_ERR_INVALID;
-       }
-
-       memset(&lsm, 0, sizeof(lsm));
-       lsm.cmd_type = LTTNG_CALIBRATE;
-       lttng_ctl_copy_lttng_domain(&lsm.domain, &handle->domain);
-
-       memcpy(&lsm.u.calibrate, calibrate, sizeof(lsm.u.calibrate));
-
-       return lttng_ctl_ask_sessiond(&lsm, NULL);
+       /*
+        * This command was removed in LTTng 2.9.
+        */
+       return -LTTNG_ERR_UND;
 }
 
 /*
 }
 
 /*
This page took 0.029194 seconds and 4 git commands to generate.