From b32557dbb8813ae261f652a6964c45bf750a1b71 Mon Sep 17 00:00:00 2001 From: jhb Date: Tue, 12 Sep 2000 18:57:59 +0000 Subject: Clean up process accounting some more. Unfortunately, it is still not quite right on i386 as the CPU who runs statclock() doesn't have a valid clockframe to calculate statistics with. --- sys/kern/kern_clock.c | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) (limited to 'sys/kern/kern_clock.c') diff --git a/sys/kern/kern_clock.c b/sys/kern/kern_clock.c index 33eef3c..bc6bf06 100644 --- a/sys/kern/kern_clock.c +++ b/sys/kern/kern_clock.c @@ -389,20 +389,18 @@ statclock(frame) } pscnt = psdiv; - if (p != idleproc) { - schedclock(p); - - /* Update resource usage integrals and maximums. */ - if ((pstats = p->p_stats) != NULL && - (ru = &pstats->p_ru) != NULL && - (vm = p->p_vmspace) != NULL) { - ru->ru_ixrss += pgtok(vm->vm_tsize); - ru->ru_idrss += pgtok(vm->vm_dsize); - ru->ru_isrss += pgtok(vm->vm_ssize); - rss = pgtok(vmspace_resident_count(vm)); - if (ru->ru_maxrss < rss) - ru->ru_maxrss = rss; - } + schedclock(p); + + /* Update resource usage integrals and maximums. */ + if ((pstats = p->p_stats) != NULL && + (ru = &pstats->p_ru) != NULL && + (vm = p->p_vmspace) != NULL) { + ru->ru_ixrss += pgtok(vm->vm_tsize); + ru->ru_idrss += pgtok(vm->vm_dsize); + ru->ru_isrss += pgtok(vm->vm_ssize); + rss = pgtok(vmspace_resident_count(vm)); + if (ru->ru_maxrss < rss) + ru->ru_maxrss = rss; } } -- cgit v1.1