kernel and libc - Reimplement lwp_setname*() using /dev/lpmap
* Generally speaking we are implementing the features necessary
to allow per-thread titling set via pthread_set_name_np() to
show up in 'ps' output, and to use lpmap to make it fast.
* The lwp_setname() system call now stores the title in
lpmap->thread_title[].
* Implement a libc fast-path for lwp_setname() using lpmap.
If called more than 10 times, libc will use lpmap for any
further calls, which omits the need to make any system calls.
* setproctitle() now stores the title in upmap->proc_title[]
instead of replacing proc->p_args. proc->p_args is now no
longer modified from its original contents.
* The kernel now includes lpmap->thread_title[] in the following
priority order when retrieving the process command line:
lpmap->thread_title[] User-supplied thread title, if not empty
upmap->proc_title[] User-supplied process title, if not empty
proc->p_args Original process arguments (no longer modified)
* Put the TID in /dev/lpmap for convenient access
* Enhance the KERN_PROC_ARGS sysctl to allow the TID to be specified.
The sysctl now accepts { KERN_PROC, KERN_PROC_ARGS, pid, tid }
in addition to the existing { KERN_PROC, KERN_PROC_ARGS, pid }
mechanism.
Enhance libkvm to use the new feature. libkvm will fall-back to
the old version if necessary.
UnifiedSplitRaw