+/*
+ * Return an UST session by traceable app PID.
+ */
+struct ltt_ust_session *trace_ust_get_session_by_pid(pid_t pid,
+ struct ltt_ust_session_list *session_list)
+{
+ struct ltt_ust_session *lus;
+
+ cds_list_for_each_entry(lus, &session_list->head, list) {
+ if (lus->app->pid == pid) {
+ DBG("Found UST session by pid %d", pid);
+ return lus;
+ }
+ }
+
+ return NULL;
+}
+