Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 27 Feb 2010 11:54:33 -0800
From:      Julian Elischer <julian@elischer.org>
To:        Jilles Tjoelker <jilles@FreeBSD.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:  <4B897879.9090507@elischer.org>
In-Reply-To: <201002271215.o1RCFxGg056229@svn.freebsd.org>
References:  <201002271215.o1RCFxGg056229@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4B897879.9090507>