This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/11390] support for pthread_setname_np() / pthread_getname_np()
- From: "johnstul at us dot ibm dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: 9 Apr 2010 01:12:21 -0000
- Subject: [Bug libc/11390] support for pthread_setname_np() / pthread_getname_np()
- References: <20100316225040.11390.johnstul@us.ibm.com>
- Reply-to: sourceware-bugzilla at sourceware dot org
------- Additional Comments From johnstul at us dot ibm dot com 2010-04-09 01:12 -------
Its not related to PR_SET_PROCTITLE_AREA.
My understanding is PR_SET_PROCTITLE_AREA is per process, and is accessed via
proc/<pid>/cmdline.
The /proc/self/task/<tid>/comm value is per thread and utilizes the taskstruct's
comm value. Its closer to the PR_SET_NAME prctl interface, only it allows thread
siblings to set each other's comm.
The initial motivation for this work was allow large java processes with
hundreds of threads to be able to name the threads, so external analysis could
make some sense of which thread what doing.
I'll admit the task->comm length is limiting, but the 1:1 mapping of what the
kernel often uses (as well as things like perf and ftrace output) makes it quite
useful.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |NEW
http://sourceware.org/bugzilla/show_bug.cgi?id=11390
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.