X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=liblttng-ust%2Fltt-events.c;h=fb3d721e4cbcb43151f309419baf2e69ff52bc22;hb=48621a4272bdeb1e8fced511ca6bf3c4c2240c15;hp=f49746e99ff17b1676b8fba02feb1898a6547a04;hpb=020760b19e351bda940b38ca273f32206ab4d03f;p=lttng-ust.git diff --git a/liblttng-ust/ltt-events.c b/liblttng-ust/ltt-events.c index f49746e9..fb3d721e 100644 --- a/liblttng-ust/ltt-events.c +++ b/liblttng-ust/ltt-events.c @@ -21,7 +21,6 @@ #include #include #include -#include #include #include "clock.h" @@ -36,6 +35,7 @@ #include #include #include "error.h" +#include "compat.h" #include "tracepoint-internal.h" #include "ltt-tracer.h" @@ -44,8 +44,6 @@ #include "../libringbuffer/shm.h" #include "jhash.h" -#define PROCNAME_LEN 17 - /* * The sessions mutex is the centralized mutex across UST tracing * control and probe registration. All operations within this file are @@ -1093,7 +1091,7 @@ int _ltt_session_metadata_statedump(struct ltt_session *session) struct ltt_channel *chan; struct ltt_event *event; int ret = 0; - char procname[PROCNAME_LEN] = ""; + char procname[LTTNG_UST_PROCNAME_LEN] = ""; if (!CMM_ACCESS_ONCE(session->active)) return 0; @@ -1147,8 +1145,8 @@ int _ltt_session_metadata_statedump(struct ltt_session *session) goto end; /* ignore error, just use empty string if error. */ - (void) prctl(PR_GET_NAME, (unsigned long) procname, 0, 0, 0); - procname[PROCNAME_LEN - 1] = '\0'; + lttng_ust_getprocname(procname); + procname[LTTNG_UST_PROCNAME_LEN - 1] = '\0'; ret = lttng_metadata_printf(session, "env {\n" " vpid = %d;\n"