svn commit: r204410 - head/sys/kern
Jilles Tjoelker
jilles at stack.nl
Sat Feb 27 21:00:29 UTC 2010
On Sat, Feb 27, 2010 at 11:54:33AM -0800, Julian Elischer wrote:
> Jilles Tjoelker wrote:
> > Log:
> > Include terminated threads in ps's process cpu time field.
> this patch seems to do a lot less than the comment suggests.
I guess the commit message could have been more verbose.
When a kinfo_proc is filled, first fill_kinfo_proc_only() fills in
ki_runtime using p->p_rux.rux_runtime (all cpu time used by the process
including terminated threads). If information for a specific thread is
requested, fill_kinfo_thread() then overwrites this with the thread's
td->td_runtime (good). If not, fill_kinfo_aggregate() overwrote it with
the sum of all threads' td->td_runtime which does not include terminated
threads.
This affects ps(1)'s TIME field, not its %CPU field nor anything in
top(1).
See also
http://lists.freebsd.org/pipermail/freebsd-hackers/2010-February/030610.html
--
Jilles Tjoelker
More information about the svn-src-all
mailing list