projects
/
lttng-modules.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add env hostname information
[lttng-modules.git]
/
lttng-events.c
diff --git
a/lttng-events.c
b/lttng-events.c
index 9d933935dbf87a6fa6707ee88b9d415df79dfbdd..7a1be7295a7ef33d1e61f692d9a2926c0ed03d77 100644
(file)
--- a/
lttng-events.c
+++ b/
lttng-events.c
@@
-292,7
+292,7
@@
struct lttng_event *lttng_event_create(struct lttng_channel *chan,
int ret;
mutex_lock(&sessions_mutex);
int ret;
mutex_lock(&sessions_mutex);
- if (chan->free_event_id == -1U
L
)
+ if (chan->free_event_id == -1U)
goto full;
/*
* This is O(n^2) (for each event, the loop is called at event
goto full;
/*
* This is O(n^2) (for each event, the loop is called at event
@@
-903,6
+903,7
@@
int _lttng_session_metadata_statedump(struct lttng_session *session)
unsigned char uuid_s[37], clock_uuid_s[BOOT_ID_LEN];
struct lttng_channel *chan;
struct lttng_event *event;
unsigned char uuid_s[37], clock_uuid_s[BOOT_ID_LEN];
struct lttng_channel *chan;
struct lttng_event *event;
+ char hostname[__NEW_UTS_LEN + 1];
int ret = 0;
if (!ACCESS_ONCE(session->active))
int ret = 0;
if (!ACCESS_ONCE(session->active))
@@
-959,8
+960,14
@@
int _lttng_session_metadata_statedump(struct lttng_session *session)
if (ret)
goto end;
if (ret)
goto end;
+ rcu_read_lock();
+ memcpy(hostname, task_nsproxy(current)->uts_ns->name.nodename,
+ sizeof(hostname));
+ rcu_read_unlock();
+
ret = lttng_metadata_printf(session,
"env {\n"
ret = lttng_metadata_printf(session,
"env {\n"
+ " hostname = \"%s\";\n"
" domain = \"kernel\";\n"
" sysname = \"%s\";\n"
" kernel_release = \"%s\";\n"
" domain = \"kernel\";\n"
" sysname = \"%s\";\n"
" kernel_release = \"%s\";\n"
@@
-970,6
+977,7
@@
int _lttng_session_metadata_statedump(struct lttng_session *session)
" tracer_minor = %d;\n"
" tracer_patchlevel = %d;\n"
"};\n\n",
" tracer_minor = %d;\n"
" tracer_patchlevel = %d;\n"
"};\n\n",
+ hostname,
utsname()->sysname,
utsname()->release,
utsname()->version,
utsname()->sysname,
utsname()->release,
utsname()->version,
This page took
0.023342 seconds
and
4
git commands to generate.