projects
/
lttng-ust.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add get proc name wrapper for FreeBSD
[lttng-ust.git]
/
liblttng-ust
/
ltt-events.c
diff --git
a/liblttng-ust/ltt-events.c
b/liblttng-ust/ltt-events.c
index b67a15c67b51fef30683b99a0c929dffef06fcfb..c9d35dde199e11929e6307cfe3eb31c1dc272406 100644
(file)
--- a/
liblttng-ust/ltt-events.c
+++ b/
liblttng-ust/ltt-events.c
@@
-10,7
+10,6
@@
#define _GNU_SOURCE
#include <stdio.h>
#define _GNU_SOURCE
#include <stdio.h>
-#include <endian.h>
#include <urcu/list.h>
#include <urcu/hlist.h>
#include <pthread.h>
#include <urcu/list.h>
#include <urcu/hlist.h>
#include <pthread.h>
@@
-22,7
+21,7
@@
#include <stddef.h>
#include <inttypes.h>
#include <time.h>
#include <stddef.h>
#include <inttypes.h>
#include <time.h>
-#include <
sys/prctl
.h>
+#include <
lttng/ust-endian
.h>
#include "clock.h"
#include <urcu-bp.h>
#include "clock.h"
#include <urcu-bp.h>
@@
-36,6
+35,7
@@
#include <usterr-signal-safe.h>
#include <helper.h>
#include "error.h"
#include <usterr-signal-safe.h>
#include <helper.h>
#include "error.h"
+#include "compat.h"
#include "tracepoint-internal.h"
#include "ltt-tracer.h"
#include "tracepoint-internal.h"
#include "ltt-tracer.h"
@@
-44,8
+44,6
@@
#include "../libringbuffer/shm.h"
#include "jhash.h"
#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
/*
* 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;
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;
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. */
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"
ret = lttng_metadata_printf(session,
"env {\n"
" vpid = %d;\n"
This page took
0.024126 seconds
and
4
git commands to generate.