ust-app: remove dead code
[lttng-tools.git] / src / bin / lttng-sessiond / ust-app.c
index b1dba0a09cf755384b4c80f4a6491a485160b8f0..823de94785c1a6d6964ed9b165f47d4690d59741 100644 (file)
@@ -4161,88 +4161,6 @@ end:
        return ret;
 }
 
-/*
- * For a specific UST session, create the channel for all registered apps.
- */
-int ust_app_create_channel_glb(struct ltt_ust_session *usess,
-               struct ltt_ust_channel *uchan)
-{
-       int ret = 0;
-       struct cds_lfht_iter iter;
-       struct ust_app *app;
-
-       assert(usess);
-       assert(usess->active);
-       assert(uchan);
-
-       DBG2("UST app adding channel %s to UST domain for session id %" PRIu64,
-                       uchan->name, usess->id);
-
-       rcu_read_lock();
-       /* For every registered applications */
-       cds_lfht_for_each_entry(ust_app_ht->ht, &iter, app, pid_n.node) {
-               struct ust_app_session *ua_sess;
-               int session_was_created = 0;
-               bool present_in_tracker =
-                               trace_ust_id_tracker_lookup(LTTNG_TRACKER_VPID,
-                                               usess, app->pid) &&
-                               trace_ust_id_tracker_lookup(LTTNG_TRACKER_VUID,
-                                               usess, app->uid) &&
-                               trace_ust_id_tracker_lookup(LTTNG_TRACKER_VGID,
-                                               usess, app->gid);
-
-               if (!app->compatible || !(present_in_tracker)) {
-                       /*
-                        * This is probably an error this MUST BE TESTED
-                        * Introduced by
-                        * 88e3c2f5610b9ac89b0923d448fee34140fc46fb On app not
-                        * in tracker we should skip it. not sure what to do on
-                        * app !compatible
-                        */
-                       goto error_rcu_unlock;
-               }
-
-               /*
-                * Create session on the tracer side and add it to app session HT. Note
-                * that if session exist, it will simply return a pointer to the ust
-                * app session.
-                */
-               ret = find_or_create_ust_app_session(usess, app, &ua_sess,
-                               &session_was_created);
-               if (ret < 0) {
-                       switch (ret) {
-                       case -ENOTCONN:
-                               /*
-                                * The application's socket is not valid. Either a bad
-                                * socket or a timeout on it. We can't inform the caller
-                                * that for a specific app, the session failed so lets
-                                * continue here; it is not an error.
-                                */
-                               ret = 0;
-                               goto error_rcu_unlock;
-                       case -ENOMEM:
-                       default:
-                               goto error_rcu_unlock;
-                       }
-               }
-
-               if (ua_sess->deleted) {
-                       continue;
-               }
-               ret = ust_app_channel_create(usess, ua_sess, uchan, app, NULL);
-               if (ret) {
-                       if (session_was_created) {
-                               destroy_app_session(app, ua_sess);
-                       }
-                       /* Continue to the next application. */
-               }
-       }
-
-error_rcu_unlock:
-       rcu_read_unlock();
-       return ret;
-}
-
 /*
  * Enable event for a specific session and channel on the tracer.
  */
This page took 0.023618 seconds and 4 git commands to generate.