projects
/
lttng-ust.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: configure.ac should use "--target", not "--host"
[lttng-ust.git]
/
liblttng-ust
/
ltt-events.c
diff --git
a/liblttng-ust/ltt-events.c
b/liblttng-ust/ltt-events.c
index 9ef28c9adb144c7cd0d01f43b17590360f8bd3de..7a7fd7efc07ba54b5baca467f3c82e6d0c23bf2c 100644
(file)
--- a/
liblttng-ust/ltt-events.c
+++ b/
liblttng-ust/ltt-events.c
@@
-246,9
+246,10
@@
int pending_probe_fix_events(const struct lttng_event_desc *desc)
memcpy(&event_param, &sw->event_param,
sizeof(event_param));
memcpy(&event_param, &sw->event_param,
sizeof(event_param));
-
mem
cpy(event_param.name,
+
strn
cpy(event_param.name,
desc->name,
sizeof(event_param.name));
desc->name,
sizeof(event_param.name));
+ event_param.name[sizeof(event_param.name) - 1] = '\0';
/* create event */
ret = ltt_event_create(sw->chan,
&event_param, &ev);
/* create event */
ret = ltt_event_create(sw->chan,
&event_param, &ev);
@@
-296,6
+297,8
@@
int pending_probe_fix_events(const struct lttng_event_desc *desc)
event->id = chan->free_event_id++;
ret |= _ltt_event_metadata_statedump(chan->session, chan,
event);
event->id = chan->free_event_id++;
ret |= _ltt_event_metadata_statedump(chan->session, chan,
event);
+ lttng_filter_event_link_bytecode(event,
+ event->filter_bytecode);
}
return ret;
}
}
return ret;
}
@@
-724,6
+727,9
@@
int _ltt_field_statedump(struct ltt_session *session,
{
int ret = 0;
{
int ret = 0;
+ if (field->nowrite)
+ return 0;
+
switch (field->type.atype) {
case atype_integer:
ret = lttng_metadata_printf(session,
switch (field->type.atype) {
case atype_integer:
ret = lttng_metadata_printf(session,
@@
-925,6
+931,14
@@
int _ltt_event_metadata_statedump(struct ltt_session *session,
if (ret)
goto end;
if (ret)
goto end;
+ if (event->desc->u.ext.model_emf_uri) {
+ ret = lttng_metadata_printf(session,
+ " model.emf.uri = \"%s\";\n",
+ *(event->desc->u.ext.model_emf_uri));
+ if (ret)
+ goto end;
+ }
+
if (event->ctx) {
ret = lttng_metadata_printf(session,
" context := struct {\n");
if (event->ctx) {
ret = lttng_metadata_printf(session,
" context := struct {\n");
@@
-1021,9
+1035,9
@@
int _ltt_stream_packet_context_declare(struct ltt_session *session)
"struct packet_context {\n"
" uint64_clock_monotonic_t timestamp_begin;\n"
" uint64_clock_monotonic_t timestamp_end;\n"
"struct packet_context {\n"
" uint64_clock_monotonic_t timestamp_begin;\n"
" uint64_clock_monotonic_t timestamp_end;\n"
+ " uint64_t content_size;\n"
+ " uint64_t packet_size;\n"
" unsigned long events_discarded;\n"
" unsigned long events_discarded;\n"
- " uint32_t content_size;\n"
- " uint32_t packet_size;\n"
" uint32_t cpu_id;\n"
"};\n\n"
);
" uint32_t cpu_id;\n"
"};\n\n"
);
@@
-1110,6
+1124,7
@@
int _ltt_session_metadata_statedump(struct ltt_session *session)
struct ltt_event *event;
int ret = 0;
char procname[LTTNG_UST_PROCNAME_LEN] = "";
struct ltt_event *event;
int ret = 0;
char procname[LTTNG_UST_PROCNAME_LEN] = "";
+ char hostname[HOST_NAME_MAX];
if (!CMM_ACCESS_ONCE(session->active))
return 0;
if (!CMM_ACCESS_ONCE(session->active))
return 0;
@@
-1166,10
+1181,15
@@
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. */
+ hostname[0] = '\0';
+ ret = gethostname(hostname, sizeof(hostname));
+ if (ret && errno == ENAMETOOLONG)
+ hostname[HOST_NAME_MAX - 1] = '\0';
lttng_ust_getprocname(procname);
procname[LTTNG_UST_PROCNAME_LEN - 1] = '\0';
ret = lttng_metadata_printf(session,
"env {\n"
lttng_ust_getprocname(procname);
procname[LTTNG_UST_PROCNAME_LEN - 1] = '\0';
ret = lttng_metadata_printf(session,
"env {\n"
+ " hostname = \"%s\";\n"
" vpid = %d;\n"
" procname = \"%s\";\n"
" domain = \"ust\";\n"
" vpid = %d;\n"
" procname = \"%s\";\n"
" domain = \"ust\";\n"
@@
-1178,6
+1198,7
@@
int _ltt_session_metadata_statedump(struct ltt_session *session)
" tracer_minor = %u;\n"
" tracer_patchlevel = %u;\n"
"};\n\n",
" tracer_minor = %u;\n"
" tracer_patchlevel = %u;\n"
"};\n\n",
+ hostname,
(int) getpid(),
procname,
LTTNG_UST_MAJOR_VERSION,
(int) getpid(),
procname,
LTTNG_UST_MAJOR_VERSION,
This page took
0.027526 seconds
and
4
git commands to generate.