Add procname to lttng_ust_statedump information
authorJonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Fri, 28 Jun 2019 21:28:15 +0000 (17:28 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 1 Nov 2019 20:43:43 +0000 (16:43 -0400)
commit94be38e8fd2d71397f79c0a368ba95678052e32d
treefd949d04652c8bf405e0c872d96c4ce6d8fabc86
parentdf807054e56e2b476278b1da34de7204e1925452
Add procname to lttng_ust_statedump information

Adding the process procname to the statedump allows users to disable
procname context in scenario for which the data and serialization overhead
of the procname process is problematic. Users can stitch information in
post-processing based on other contexts (pid).

Users can skip this statedump via the
LTTNG_UST_WITHOUT_PROCNAME_STATEDUMP env variable.

Note that the procname statedump value is the procname seen at
application start (lttng_ust_init). Subsequent calls to pthread_setname_np
or equivalent have no effect on this value.

Since we cannot use the current thread name due to the
lttng_pthread_setname_np call in ust_listener_thread, we store the
process name inside the sock_info struct before the call to
lttng_pthread_setname_np. This data structure is already present as the
"owner" object in the statedump mechanism. During the statedump, we fetch
the procname from the "owner" object.

Use LTTNG_HIDDEN to reduce visibility of lttng_ust_sockinfo_get_procname.

Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
doc/man/lttng-ust.3.txt
include/helper.h
liblttng-ust/lttng-tracer-core.h
liblttng-ust/lttng-ust-comm.c
liblttng-ust/lttng-ust-statedump-provider.h
liblttng-ust/lttng-ust-statedump.c
This page took 0.026266 seconds and 4 git commands to generate.