diff options
author | bde <bde@FreeBSD.org> | 1999-11-27 14:37:34 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 1999-11-27 14:37:34 +0000 |
commit | 61f11af11f95325c66aff7b724f463909642c2aa (patch) | |
tree | 56d6ca4657eb825ecdd46b5dfb4ed7b8a0a231e0 /sys/kern/kern_tc.c | |
parent | a3e4a9264f20e4e36cae6f1bfb2051210dd3ae89 (diff) | |
download | FreeBSD-src-61f11af11f95325c66aff7b724f463909642c2aa.zip FreeBSD-src-61f11af11f95325c66aff7b724f463909642c2aa.tar.gz |
Fixed some comments in statclock(). The previous commit made it clearer
that one comment was attached to null code.
Diffstat (limited to 'sys/kern/kern_tc.c')
-rw-r--r-- | sys/kern/kern_tc.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/sys/kern/kern_tc.c b/sys/kern/kern_tc.c index a8d492d..55dcc5d 100644 --- a/sys/kern/kern_tc.c +++ b/sys/kern/kern_tc.c @@ -361,7 +361,9 @@ stopprofclock(p) /* * Statistics clock. Grab profile sample, and if divider reaches 0, - * do process and kernel statistics. + * do process and kernel statistics. Most of the statistics are only + * used by user-level statistics programs. The main exceptions are + * p->p_uticks, p->p_sticks, p->p_iticks, and p->p_estcpu. */ void statclock(frame) @@ -378,6 +380,10 @@ statclock(frame) struct vmspace *vm; if (curproc != NULL && CLKF_USERMODE(frame)) { + /* + * Came from user mode; CPU was in user state. + * If this process is being profiled, record the tick. + */ p = curproc; if (p->p_flag & P_PROFIL) addupc_intr(p, CLKF_PC(frame), 1); @@ -388,8 +394,7 @@ statclock(frame) if (--pscnt > 0) return; /* - * Came from user mode; CPU was in user state. - * If this process is being profiled record the tick. + * Charge the time as appropriate. */ p->p_uticks++; if (p->p_nice > NZERO) @@ -441,11 +446,6 @@ statclock(frame) } pscnt = psdiv; - /* - * We maintain statistics shown by user-level statistics - * programs: the amount of time in each cpu state. - */ - if (p != NULL) { schedclock(p); |