[lttng-dev] [lttng-ust RFC PATCH v2 0/1] Identify UST threads by changing thread names

Raphaël Beamonte raphael.beamonte at gmail.com
Fri Jun 3 15:16:59 UTC 2016


Hi,

This is the update of the RFC patch following your comments.
This patch updates the pthread_setname_np/pthread_set_name_np version of
the RFC patch, and includes the following changes:
- Check in configure.ac whether the pthread_setname_np or
  pthread_set_name_np functions exists. If it's not the case,
  current behavior is preserved.
- Update compat.h to define a macro for the pthread_set*name_np
  function to use in order to reduce repeated code.
- Update compat.h and lttng-ust-comm.c to use a macro to call the
  lttng_ust_setustprocname function in order for that macro to be
  empty when the required pthread_setn*ame_np is not available.
- Update compat.h to fix sprintf usage with the same variable to
  read from and write to.
- The patch has been rebased on current lttng-ust's master branch.

This patch still contains the link to the pthread library in the
liblttng-ust/Makefile.am file, which still seems required to avoid
compilation warnings about implicit function declaration.

Thoughts and comments?

Thanks!
Raphaël


Raphaël Beamonte (1):
  Add -ust to the name of UST threads of the application

 configure.ac                  |  5 +++++
 liblttng-ust/Makefile.am      |  1 +
 liblttng-ust/compat.h         | 48 ++++++++++++++++++++++++++++++++++++++++++-
 liblttng-ust/lttng-ust-comm.c |  6 ++++++
 4 files changed, 59 insertions(+), 1 deletion(-)

-- 
2.8.1



More information about the lttng-dev mailing list