[PATCH] [V2] add options to ps(1) to display lwp data

Nicolas Thery nthery at gmail.com
Tue Aug 14 14:04:34 PDT 2007


2007/8/14, Matthew Dillon <dillon at apollo.backplane.com>:
> :Hello,
> :
> :Here is a revised patch that displays the TID when -H set.
> :
> :Cheers,
> :Nicolas
>
>     Committed!

Thanks for that.  Thanks too to Simon and you for your feedback regarding my
initial patch.

There is a minor annoyance when ps displays a multi-lwp process and
-H is not used: only the most recently created lwp is displayed because
proc.p_lwps is a LIST and so lwp_fork() adds new lwps in front.  IMO
it would be less consuming if ps displayed the initial lwp.

Doing so could be done if p_lwps were turned into a TAILQ.  This seems
feasible as there are less than 10 occurrences of p_lwps and the added
RAM footprint to struct proc is small.

What do you think of this? Is it sensible?

Thanks,
Nicolas





More information about the Submit mailing list