svn commit: r204410 - head/sys/kern

Julian Elischer julian at elischer.org
Sat Feb 27 20:05:07 UTC 2010


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.



More information about the svn-src-head mailing list