From owner-svn-src-all@FreeBSD.ORG Sat Feb 27 21:00:29 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7B677106566C; Sat, 27 Feb 2010 21:00:29 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from mx1.stack.nl (relay02.stack.nl [IPv6:2001:610:1108:5010::104]) by mx1.freebsd.org (Postfix) with ESMTP id 3EDB58FC15; Sat, 27 Feb 2010 21:00:29 +0000 (UTC) Received: from turtle.stack.nl (turtle.stack.nl [IPv6:2001:610:1108:5010::132]) by mx1.stack.nl (Postfix) with ESMTP id 9725635A880; Sat, 27 Feb 2010 22:00:28 +0100 (CET) Received: by turtle.stack.nl (Postfix, from userid 1677) id 7AD5A17B2B; Sat, 27 Feb 2010 22:00:28 +0100 (CET) Date: Sat, 27 Feb 2010 22:00:28 +0100 From: Jilles Tjoelker To: Julian Elischer Message-ID: <20100227210028.GA77656@stack.nl> References: <201002271215.o1RCFxGg056229@svn.freebsd.org> <4B897879.9090507@elischer.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4B897879.9090507@elischer.org> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r204410 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Feb 2010 21:00:29 -0000 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