if (ret < 0) {
ERR("Creating session for app pid %d", app->pid);
/* This means that the tracer is gone... */
+ delete_ust_app_session(-1, ua_sess);
ua_sess = (void*) -1UL;
- goto error;
+ goto end;
}
ua_sess->handle = ret;
end:
return ua_sess;
-
-error:
- delete_ust_app_session(-1, ua_sess);
- return NULL;
}
/*
goto error_rcu_unlock;
}
+ /* Ask UST to open the write side of the wait pipe */
+ DBG("Asking UST to open metadata stream wait pipe path: %s\n",
+ ua_sess->metadata->stream_obj->wait_pipe_path);
+
+ ret = ustctl_open_wait_pipe(app->sock, ua_sess->metadata->obj);
+
+ if (ret < 0) {
+ ERR("Asking UST to open wait_pipe failed");
+ }
+
+ /* each channel */
+ cds_lfht_for_each_entry(ua_sess->channels->ht, &iter.iter, ua_chan,
+ node.node) {
+
+ DBG("Asking UST to open channel wait pipe path: %s\n",
+ ua_chan->obj->wait_pipe_path);
+
+ ret = ustctl_open_wait_pipe(app->sock, ua_chan->obj);
+
+ if (ret < 0) {
+ ERR("Asking UST to open wait_pipe failed for wait pipe: %s",
+ ua_chan->obj->wait_pipe_path);
+ }
+ }
+
skip_setup:
/* This start the UST tracing */
ret = ustctl_start_session(app->sock, ua_sess->handle);
}
ua_sess = create_ust_app_session(usess, app);
- if (ua_sess == NULL) {
+ if (ua_sess == NULL || ua_sess == (void *) -1UL) {
goto error;
}