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);
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_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.
_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 \
_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)
uint32_t patchlevel;
};
-struct lttng_kernel_old_calibrate {
- enum lttng_kernel_calibrate_type type; /* type (input) */
-};
-
/*
* kernel channel
*/
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[];
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,
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)
{
- 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;
}
/*