mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-16 10:20:30 +00:00
Add a call to calcru() to update the kproc_info fields of ki_rusage.ru_utime
and ki_rusage.ru_stime. This greatly improves the accuracy of those fields. Suggested by: bde
This commit is contained in:
parent
34d55919fb
commit
99d2ecbc7d
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=130759
@ -694,6 +694,8 @@ fill_kinfo_thread(struct thread *td, struct kinfo_proc *kp)
|
||||
kp->ki_start = p->p_stats->p_start;
|
||||
timevaladd(&kp->ki_start, &boottime);
|
||||
kp->ki_rusage = p->p_stats->p_ru;
|
||||
calcru(p, &kp->ki_rusage.ru_utime, &kp->ki_rusage.ru_stime,
|
||||
NULL);
|
||||
kp->ki_childstime = p->p_stats->p_cru.ru_stime;
|
||||
kp->ki_childutime = p->p_stats->p_cru.ru_utime;
|
||||
/* Some callers want child-times in a single value */
|
||||
|
Loading…
Reference in New Issue
Block a user