~lttng/lttng-ust/lttng-ust

Viewing all changes in revision 2342.

  • Committer: Mathieu Desnoyers
  • Author(s): Jonathan Rajotte
  • Date: 2019-11-01 20:43:43 UTC
  • Revision ID: git-v1:94be38e8fd2d71397f79c0a368ba95678052e32d
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>

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: