From owner-svn-src-all@FreeBSD.ORG Sat Feb 27 20:05:07 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 113881065670; Sat, 27 Feb 2010 20:05:07 +0000 (UTC) (envelope-from julian@elischer.org) Received: from out-0.mx.aerioconnect.net (out-0-9.mx.aerioconnect.net [216.240.47.69]) by mx1.freebsd.org (Postfix) with ESMTP id E4F2B8FC1F; Sat, 27 Feb 2010 20:05:06 +0000 (UTC) Received: from idiom.com (postfix@mx0.idiom.com [216.240.32.160]) by out-0.mx.aerioconnect.net (8.13.8/8.13.8) with ESMTP id o1RJsYu7008880; Sat, 27 Feb 2010 11:54:34 -0800 X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e Received: from julian-mac.elischer.org (h-67-100-89-137.snfccasy.static.covad.net [67.100.89.137]) by idiom.com (Postfix) with ESMTP id 230552D6011; Sat, 27 Feb 2010 11:54:34 -0800 (PST) Message-ID: <4B897879.9090507@elischer.org> Date: Sat, 27 Feb 2010 11:54:33 -0800 From: Julian Elischer User-Agent: Thunderbird 2.0.0.23 (Macintosh/20090812) MIME-Version: 1.0 To: Jilles Tjoelker References: <201002271215.o1RCFxGg056229@svn.freebsd.org> In-Reply-To: <201002271215.o1RCFxGg056229@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.67 on 216.240.47.51 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 20:05:07 -0000 Jilles Tjoelker wrote: > Author: jilles > Date: Sat Feb 27 12:15:59 2010 > New Revision: 204410 > URL: http://svn.freebsd.org/changeset/base/204410 > > Log: > Include terminated threads in ps's process cpu time field. > > MFC after: 2 weeks > > Modified: > head/sys/kern/kern_proc.c > > Modified: head/sys/kern/kern_proc.c > ============================================================================== > --- head/sys/kern/kern_proc.c Sat Feb 27 10:55:43 2010 (r204409) > +++ head/sys/kern/kern_proc.c Sat Feb 27 12:15:59 2010 (r204410) > @@ -676,11 +676,9 @@ fill_kinfo_aggregate(struct proc *p, str > > kp->ki_estcpu = 0; > kp->ki_pctcpu = 0; > - kp->ki_runtime = 0; > FOREACH_THREAD_IN_PROC(p, td) { > thread_lock(td); > kp->ki_pctcpu += sched_pctcpu(td); > - kp->ki_runtime += cputick2usec(td->td_runtime); > kp->ki_estcpu += td->td_estcpu; > thread_unlock(td); > } this patch seems to do a lot less than the comment suggests.