This context adds the hostname context field for the event(s) selected.
It is particularly useful when tracing a machine with containers (lxc),
that way we can easily distinguish events generated inside a container.
The API is extended but no features nor behaviors are changed.
Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
LTTNG_EVENT_CONTEXT_PPID = 8,
LTTNG_EVENT_CONTEXT_VPPID = 9,
LTTNG_EVENT_CONTEXT_PTHREAD_ID = 10,
+ LTTNG_EVENT_CONTEXT_HOSTNAME = 11,
};
enum lttng_calibrate_type {
case LTTNG_EVENT_CONTEXT_VPPID:
kctx.ctx = LTTNG_KERNEL_CONTEXT_VPPID;
break;
+ case LTTNG_EVENT_CONTEXT_HOSTNAME:
+ kctx.ctx = LTTNG_KERNEL_CONTEXT_HOSTNAME;
+ break;
default:
return LTTCOMM_KERN_CONTEXT_FAIL;
}
CONTEXT_PPID = 8,
CONTEXT_VPPID = 9,
CONTEXT_PTHREAD_ID = 10,
+ CONTEXT_HOSTNAME = 11,
};
/*
{ "vtid", CONTEXT_VTID },
{ "ppid", CONTEXT_PPID },
{ "vppid", CONTEXT_VPPID },
+ { "hostname", CONTEXT_HOSTNAME },
/* Perf options */
PERF_HW(cpu-cycles, CPU_CYCLES),
PERF_HW(cycles, CPU_CYCLES),
LTTNG_KERNEL_CONTEXT_VTID = 7,
LTTNG_KERNEL_CONTEXT_PPID = 8,
LTTNG_KERNEL_CONTEXT_VPPID = 9,
+ LTTNG_KERNEL_CONTEXT_HOSTNAME = 10,
};
/* Perf counter attributes */