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
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to