- result = ltt_marker_connect(m->channel, m->name, probe_name);
- if(result && result != -EEXIST)
- ERR("ltt_marker_connect (marker = %s/%s, errno = %d)", m->channel, m->name, -result);
+ result = ltt_ust_marker_connect(m->channel, m->name, probe_name);
+ if (result && result != -EEXIST)
+ ERR("ltt_ust_marker_connect (ust_marker = %s/%s, errno = %d)", m->channel, m->name, -result);
+
+ DBG("auto connected ust_marker %s (addr: %p) %s to probe default", m->channel, m, m->name);
+
+}
+
+static struct ustcomm_sock * init_app_socket(int epoll_fd)
+{
+ char *dir_name, *sock_name;
+ int result;
+ struct ustcomm_sock *sock = NULL;
+ time_t mtime;
+
+ dir_name = ustcomm_user_sock_dir();
+ if (!dir_name)
+ return NULL;
+
+ mtime = ustcomm_pid_st_mtime(getpid());
+ if (!mtime) {
+ goto free_dir_name;
+ }
+
+ result = asprintf(&sock_name, "%s/%d.%ld", dir_name,
+ (int) getpid(), (long) mtime);
+ if (result < 0) {
+ ERR("string overflow allocating socket name, "
+ "UST thread bailing");
+ goto free_dir_name;
+ }
+
+ result = ensure_dir_exists(dir_name, S_IRWXU);
+ if (result == -1) {
+ ERR("Unable to create socket directory %s, UST thread bailing",
+ dir_name);
+ goto free_sock_name;
+ }
+
+ sock = ustcomm_init_named_socket(sock_name, epoll_fd);
+ if (!sock) {
+ ERR("Error initializing named socket (%s). Check that directory"
+ "exists and that it is writable. UST thread bailing", sock_name);
+ goto free_sock_name;
+ }