{
int ret = 0;
- if (!field->written)
+ if (field->nowrite)
return 0;
switch (field->type.atype) {
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");
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;
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"
+ " hostname = \"%s\";\n"
" vpid = %d;\n"
" procname = \"%s\";\n"
" domain = \"ust\";\n"
" tracer_minor = %u;\n"
" tracer_patchlevel = %u;\n"
"};\n\n",
+ hostname,
(int) getpid(),
procname,
LTTNG_UST_MAJOR_VERSION,