diff options
author | jhb <jhb@FreeBSD.org> | 2001-12-18 09:06:10 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2001-12-18 09:06:10 +0000 |
commit | 3b3c195480fed60a230e8401bd4db8d5f2092d58 (patch) | |
tree | 3f813024556280e8358079cdcdd3b633aa6e3e95 /sys/kern/subr_prof.c | |
parent | 5d7a6cb932b96b3e71596f48d3603f5806a26be9 (diff) | |
download | FreeBSD-src-3b3c195480fed60a230e8401bd4db8d5f2092d58.zip FreeBSD-src-3b3c195480fed60a230e8401bd4db8d5f2092d58.tar.gz |
- Change all callers of addupc_task() to check PS_PROFIL explicitly and
remove the check from addupc_task(). It would need sched_lock while
testing the flag anyways.
- Always read sticks while holding sched_lock using a temporary variable
where needed.
- Always init prticks to 0 in ast() to quiet a warning.
Diffstat (limited to 'sys/kern/subr_prof.c')
-rw-r--r-- | sys/kern/subr_prof.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sys/kern/subr_prof.c b/sys/kern/subr_prof.c index 8808651..a5dc71b 100644 --- a/sys/kern/subr_prof.c +++ b/sys/kern/subr_prof.c @@ -513,8 +513,7 @@ addupc_task(ke, pc, ticks) register u_int i; u_short v; - /* Testing PS_PROFIL may be unnecessary, but is certainly safe. */ - if ((p->p_sflag & PS_PROFIL) == 0 || ticks == 0) + if (ticks == 0) return; prof = &p->p_stats->p_prof; |