X-Git-Url: http://git.lttng.org/?a=blobdiff_plain;f=libust%2Ftracectl.c;h=bd640c3ecd9ecb363285d92ce62dc225a1713808;hb=8161463975e218e0833d31ab1577a7ceb9e8e9f3;hp=414162c1df96ad0a03586496a10bfce7d6113dc0;hpb=b521931e0000388ff9080d46719936be98af54c6;p=ust.git diff --git a/libust/tracectl.c b/libust/tracectl.c index 414162c..bd640c3 100644 --- a/libust/tracectl.c +++ b/libust/tracectl.c @@ -21,6 +21,7 @@ */ #define _GNU_SOURCE +#define _LGPL_SOURCE #include #include #include @@ -38,6 +39,7 @@ #include #include +#include #include #include #include "tracer.h" @@ -110,9 +112,12 @@ static void print_ust_marker(FILE *fp) fprintf(fp, "ust_marker: %s/%s %d \"%s\" %p\n", (*iter.ust_marker)->channel, (*iter.ust_marker)->name, - (int)imv_read((*iter.ust_marker)->state), + (int)(*iter.ust_marker)->state, (*iter.ust_marker)->format, - (*iter.ust_marker)->location); + NULL); /* + * location is null for now, will be added + * to a different table. + */ ust_marker_iter_next(&iter); } unlock_ust_marker(); @@ -1224,12 +1229,19 @@ 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; - result = asprintf(&sock_name, "%s/%d", dir_name, (int)getpid()); + 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");