Remove calibrate from lttng-sessiond
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Tue, 14 Jun 2016 22:50:32 +0000 (18:50 -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>
src/bin/lttng-sessiond/cmd.c
src/bin/lttng-sessiond/cmd.h
src/bin/lttng-sessiond/kernel.c
src/bin/lttng-sessiond/kernel.h
src/bin/lttng-sessiond/lttng-ust-abi.h
src/bin/lttng-sessiond/lttng-ust-ctl.h
src/bin/lttng-sessiond/main.c
src/bin/lttng-sessiond/ust-app.c
src/bin/lttng-sessiond/ust-app.h

index 916a73be2fa8990f2317a49ca09c418e998e9619..325ffd2cf14f6ec3e320e402e8db17a6dac71adc 100644 (file)
@@ -2748,64 +2748,6 @@ int cmd_destroy_session(struct ltt_session *session, int wpipe)
        return ret;
 }
 
-/*
- * Command LTTNG_CALIBRATE processed by the client thread.
- */
-int cmd_calibrate(enum lttng_domain_type domain,
-               struct lttng_calibrate *calibrate)
-{
-       int ret;
-
-       switch (domain) {
-       case LTTNG_DOMAIN_KERNEL:
-       {
-               struct lttng_kernel_calibrate kcalibrate;
-
-               switch (calibrate->type) {
-               case LTTNG_CALIBRATE_FUNCTION:
-               default:
-                       /* Default and only possible calibrate option. */
-                       kcalibrate.type = LTTNG_KERNEL_CALIBRATE_KRETPROBE;
-                       break;
-               }
-
-               ret = kernel_calibrate(kernel_tracer_fd, &kcalibrate);
-               if (ret < 0) {
-                       ret = LTTNG_ERR_KERN_ENABLE_FAIL;
-                       goto error;
-               }
-               break;
-       }
-       case LTTNG_DOMAIN_UST:
-       {
-               struct lttng_ust_calibrate ucalibrate;
-
-               switch (calibrate->type) {
-               case LTTNG_CALIBRATE_FUNCTION:
-               default:
-                       /* Default and only possible calibrate option. */
-                       ucalibrate.type = LTTNG_UST_CALIBRATE_TRACEPOINT;
-                       break;
-               }
-
-               ret = ust_app_calibrate_glb(&ucalibrate);
-               if (ret < 0) {
-                       ret = LTTNG_ERR_UST_CALIBRATE_FAIL;
-                       goto error;
-               }
-               break;
-       }
-       default:
-               ret = LTTNG_ERR_UND;
-               goto error;
-       }
-
-       ret = LTTNG_OK;
-
-error:
-       return ret;
-}
-
 /*
  * Command LTTNG_REGISTER_CONSUMER processed by the client thread.
  */
index 975a7f10f53110e84a485309c08f9d7407e291b8..ac88d51308dc6270337f81e48cc3288cbb155210 100644 (file)
@@ -96,8 +96,6 @@ ssize_t cmd_list_syscalls(struct lttng_event **events);
 ssize_t cmd_list_tracker_pids(struct ltt_session *session,
                enum lttng_domain_type domain, int32_t **pids);
 
-int cmd_calibrate(enum lttng_domain_type domain,
-               struct lttng_calibrate *calibrate);
 int cmd_data_pending(struct ltt_session *session);
 
 /* Snapshot */
index ae8349c897ded12d90bfc2d018ba1994e1822f63..aa51649783f64c0e324c0090c42033cdbbb41f7a 100644 (file)
@@ -576,25 +576,6 @@ void kernel_wait_quiescent(int fd)
        }
 }
 
-/*
- * Kernel calibrate
- */
-int kernel_calibrate(int fd, struct lttng_kernel_calibrate *calibrate)
-{
-       int ret;
-
-       assert(calibrate);
-
-       ret = kernctl_calibrate(fd, calibrate);
-       if (ret < 0) {
-               PERROR("calibrate ioctl");
-               return -1;
-       }
-
-       return 0;
-}
-
-
 /*
  *  Force flush buffer of metadata.
  */
index 2a9a76f92337dec6e07e67e9b3bc73ec54682426..233ceffea09222a4a140a774e0723915adc19aee 100644 (file)
@@ -54,7 +54,6 @@ int kernel_start_session(struct ltt_kernel_session *session);
 int kernel_stop_session(struct ltt_kernel_session *session);
 ssize_t kernel_list_events(int tracer_fd, struct lttng_event **event_list);
 void kernel_wait_quiescent(int fd);
-int kernel_calibrate(int fd, struct lttng_kernel_calibrate *calibrate);
 int kernel_validate_version(int tracer_fd);
 void kernel_destroy_session(struct ltt_kernel_session *ksess);
 void kernel_destroy_channel(struct ltt_kernel_channel *kchan);
index 57b1d4e42ea540ff2052459c9802ce4e4e325c28..fb9c5a336e71d8a5325d8bb95b135b9960caa7fa 100644 (file)
@@ -220,21 +220,6 @@ struct lttng_ust_object_data {
        } u;
 } LTTNG_PACKED;
 
-enum lttng_ust_calibrate_type {
-       LTTNG_UST_CALIBRATE_TRACEPOINT,
-};
-
-#define LTTNG_UST_CALIBRATE_PADDING1   16
-#define LTTNG_UST_CALIBRATE_PADDING2   (LTTNG_UST_SYM_NAME_LEN + 32)
-struct lttng_ust_calibrate {
-       enum lttng_ust_calibrate_type type;     /* type (input) */
-       char padding[LTTNG_UST_CALIBRATE_PADDING1];
-
-       union {
-               char padding[LTTNG_UST_CALIBRATE_PADDING2];
-       } u;
-} LTTNG_PACKED;
-
 #define FILTER_BYTECODE_MAX_LEN                65536
 #define LTTNG_UST_FILTER_PADDING       32
 struct lttng_ust_filter_bytecode {
index dccb089e1e2fbc8f6aea2f7305bb88e084f710e6..a812ee857c236d8734a71db667c945b5ca89268e 100644 (file)
@@ -124,8 +124,6 @@ int ustctl_wait_quiescent(int sock);
 
 int ustctl_sock_flush_buffer(int sock, struct lttng_ust_object_data *object);
 
-int ustctl_calibrate(int sock, struct lttng_ust_calibrate *calibrate);
-
 /* Release object created by members of this API. */
 int ustctl_release_object(int sock, struct lttng_ust_object_data *data);
 /* Release handle returned by create session. */
index a2afb8f757626b71f24655d7b682ac38c483a019..2752e9ff37be7f142a76eebd902a51a530c14217 100644 (file)
@@ -3058,7 +3058,6 @@ static int process_client_msg(struct command_ctx *cmd_ctx, int sock,
        case LTTNG_CREATE_SESSION:
        case LTTNG_CREATE_SESSION_SNAPSHOT:
        case LTTNG_CREATE_SESSION_LIVE:
-       case LTTNG_CALIBRATE:
        case LTTNG_LIST_SESSIONS:
        case LTTNG_LIST_TRACEPOINTS:
        case LTTNG_LIST_SYSCALLS:
@@ -3900,12 +3899,6 @@ error_add_context:
                ret = LTTNG_OK;
                break;
        }
-       case LTTNG_CALIBRATE:
-       {
-               ret = cmd_calibrate(cmd_ctx->lsm->domain.type,
-                               &cmd_ctx->lsm->u.calibrate);
-               break;
-       }
        case LTTNG_REGISTER_CONSUMER:
        {
                struct consumer_data *cdata;
index 47bd04cd837d76c2ecc8f4588ca7077d7581de49..e496a5f5548f78975fba58d773da3c8aa45d8d58 100644 (file)
@@ -5203,54 +5203,6 @@ end:
        return ret;
 }
 
-/*
- * Calibrate registered applications.
- */
-int ust_app_calibrate_glb(struct lttng_ust_calibrate *calibrate)
-{
-       int ret = 0;
-       struct lttng_ht_iter iter;
-       struct ust_app *app;
-
-       rcu_read_lock();
-
-       cds_lfht_for_each_entry(ust_app_ht->ht, &iter.iter, app, pid_n.node) {
-               if (!app->compatible) {
-                       /*
-                        * TODO: In time, we should notice the caller of this error by
-                        * telling him that this is a version error.
-                        */
-                       continue;
-               }
-
-               health_code_update();
-
-               pthread_mutex_lock(&app->sock_lock);
-               ret = ustctl_calibrate(app->sock, calibrate);
-               pthread_mutex_unlock(&app->sock_lock);
-               if (ret < 0) {
-                       switch (ret) {
-                       case -ENOSYS:
-                               /* Means that it's not implemented on the tracer side. */
-                               ret = 0;
-                               break;
-                       default:
-                               DBG2("Calibrate app PID %d returned with error %d",
-                                               app->pid, ret);
-                               break;
-                       }
-               }
-       }
-
-       DBG("UST app global domain calibration finished");
-
-       rcu_read_unlock();
-
-       health_code_update();
-
-       return ret;
-}
-
 /*
  * Receive registration and populate the given msg structure.
  *
index 3b5d6ae9a5f814fc205ef96a1dfa53334fcdd7d4..48f9fd38147318e1631b4695fdcfdf86c0572059 100644 (file)
@@ -328,7 +328,6 @@ void ust_app_global_update_all(struct ltt_ust_session *usess);
 void ust_app_clean_list(void);
 int ust_app_ht_alloc(void);
 struct ust_app *ust_app_find_by_pid(pid_t pid);
-int ust_app_calibrate_glb(struct lttng_ust_calibrate *calibrate);
 struct ust_app_stream *ust_app_alloc_stream(void);
 int ust_app_recv_registration(int sock, struct ust_register_msg *msg);
 int ust_app_recv_notify(int sock);
@@ -497,11 +496,6 @@ int ust_app_enable_event_pid(struct ltt_ust_session *usess,
        return 0;
 }
 static inline
-int ust_app_calibrate_glb(struct lttng_ust_calibrate *calibrate)
-{
-       return 0;
-}
-static inline
 int ust_app_recv_registration(int sock, struct ust_register_msg *msg)
 {
        return 0;
This page took 0.032129 seconds and 4 git commands to generate.