Date: Sat, 27 Feb 2010 22:00:28 +0100 From: Jilles Tjoelker <jilles@stack.nl> To: Julian Elischer <julian@elischer.org> Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r204410 - head/sys/kern Message-ID: <20100227210028.GA77656@stack.nl> In-Reply-To: <4B897879.9090507@elischer.org> References: <201002271215.o1RCFxGg056229@svn.freebsd.org> <4B897879.9090507@elischer.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100227210028.GA77656>