diff options
author | peter <peter@FreeBSD.org> | 2002-07-21 05:22:16 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 2002-07-21 05:22:16 +0000 |
commit | 4a13c91393492858f32e981fcb9b883277d3d233 (patch) | |
tree | faf3d981a2467cc4722eaeeb8691935195b398cc /sys/amd64/amd64/pmap.c | |
parent | bf5c9e0422fd1e4316ad6a9db5a470b98edeb67e (diff) | |
download | FreeBSD-src-4a13c91393492858f32e981fcb9b883277d3d233.zip FreeBSD-src-4a13c91393492858f32e981fcb9b883277d3d233.tar.gz |
Move SWTCH_OPTIM_STATS related code out of cpufunc.h. (This sort of stat
gathering is not an x86 cpu feature)
Diffstat (limited to 'sys/amd64/amd64/pmap.c')
-rw-r--r-- | sys/amd64/amd64/pmap.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index d3f76db..13c3c7d 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -672,6 +672,9 @@ pmap_invalidate_all(pmap_t pmap) u_int cpumask; u_int other_cpus; +#ifdef SWTCH_OPTIM_STATS + tlb_flush_count++; +#endif critical_enter(); /* * We need to disable interrupt preemption but MUST NOT have @@ -3385,9 +3388,6 @@ pmap_activate(struct thread *td) #else pmap->pm_active |= 1; #endif -#if defined(SWTCH_OPTIM_STATS) - tlb_flush_count++; -#endif cr3 = vtophys(pmap->pm_pdir); /* XXXKSE this is wrong. * pmap_activate is for the current thread on the current cpu @@ -3402,6 +3402,9 @@ pmap_activate(struct thread *td) td->td_pcb->pcb_cr3 = cr3; } load_cr3(cr3); +#ifdef SWTCH_OPTIM_STATS + tlb_flush_count++; +#endif } vm_offset_t |