return ret;
}
+/*
+ * For each tracing session, update newly registered apps.
+ */
+static void update_ust_app(int app_sock)
+{
+ struct ltt_session *sess, *stmp;
+
+ /* For all tracing session(s) */
+ cds_list_for_each_entry_safe(sess, stmp, &session_list_ptr->head, list) {
+ ust_app_global_update(sess->ust_session, app_sock);
+ }
+}
+
/*
* This thread manage event coming from the kernel.
*
DBG("Apps with sock %d added to poll set",
ust_cmd.sock);
}
+
+ /*
+ * Add channel(s) and event(s) to newly registered apps
+ * from lttng global UST domain.
+ */
+ update_ust_app(ust_cmd.sock);
break;
}
} else {
/* No ustctl for the global UST domain */
break;
default:
+ ERR("Unknown UST domain on create session %d", domain->type);
goto error;
}
session->ust_session = lus;
ret = LTTCOMM_UST_ENABLE_FAIL;
goto error;
}
+
+ rcu_read_lock();
+ hashtable_add_unique(uchan->events, &uevent->node);
+ rcu_read_unlock();
break;
}
case LTTNG_DOMAIN_UST_EXEC_NAME:
kernel_wait_quiescent(kernel_tracer_fd);
}
+ /* Flag session that trace should start automatically */
+ usess->start_trace = 1;
+
ret = ust_app_start_trace(usess);
if (ret < 0) {
ret = LTTCOMM_UST_START_FAIL;