diff options
Diffstat (limited to 'sys')
-rw-r--r-- | sys/alpha/alpha/interrupt.c | 4 | ||||
-rw-r--r-- | sys/alpha/alpha/trap.c | 4 | ||||
-rw-r--r-- | sys/amd64/amd64/intr_machdep.c | 2 | ||||
-rw-r--r-- | sys/amd64/amd64/trap.c | 2 | ||||
-rw-r--r-- | sys/amd64/ia32/ia32_syscall.c | 2 | ||||
-rw-r--r-- | sys/arm/arm/trap.c | 6 | ||||
-rw-r--r-- | sys/arm/arm/undefined.c | 2 | ||||
-rw-r--r-- | sys/i386/i386/intr_machdep.c | 2 | ||||
-rw-r--r-- | sys/i386/i386/trap.c | 2 | ||||
-rw-r--r-- | sys/ia64/ia32/ia32_trap.c | 4 | ||||
-rw-r--r-- | sys/ia64/ia64/interrupt.c | 2 | ||||
-rw-r--r-- | sys/ia64/ia64/trap.c | 4 | ||||
-rw-r--r-- | sys/kern/kern_intr.c | 2 | ||||
-rw-r--r-- | sys/powerpc/aim/trap.c | 4 | ||||
-rw-r--r-- | sys/powerpc/powerpc/trap.c | 4 | ||||
-rw-r--r-- | sys/sparc64/sparc64/trap.c | 4 |
16 files changed, 25 insertions, 25 deletions
diff --git a/sys/alpha/alpha/interrupt.c b/sys/alpha/alpha/interrupt.c index e9eb81e..06beb01 100644 --- a/sys/alpha/alpha/interrupt.c +++ b/sys/alpha/alpha/interrupt.c @@ -139,7 +139,7 @@ interrupt(a0, a1, a2, framep) break; case ALPHA_INTR_DEVICE: /* I/O device interrupt */ - cnt.v_intr++; + PCPU_LAZY_INC(cnt.v_intr); if (platform.iointr) (*platform.iointr)(framep, a1); break; @@ -462,7 +462,7 @@ static void alpha_clock_interrupt(struct trapframe *framep) { - cnt.v_intr++; + PCPU_LAZY_INC(cnt.v_intr); #ifdef EVCNT_COUNTERS clock_intr_evcnt.ev_count++; #else diff --git a/sys/alpha/alpha/trap.c b/sys/alpha/alpha/trap.c index 21ead59..dc800ef 100644 --- a/sys/alpha/alpha/trap.c +++ b/sys/alpha/alpha/trap.c @@ -295,7 +295,7 @@ trap(a0, a1, a2, entry, framep) * Giant hasn't been acquired yet. */ - cnt.v_trap++; + PCPU_LAZY_INC(cnt.v_trap); ucode = 0; user = (framep->tf_regs[FRAME_PS] & ALPHA_PSL_USERMODE) != 0; CTR5(KTR_TRAP, "%s trap: pid %d, (%lx, %lx, %lx)", @@ -655,7 +655,7 @@ syscall(code, framep) panic("syscall"); #endif - cnt.v_syscall++; + PCPU_LAZY_INC(cnt.v_syscall); td->td_frame = framep; opc = framep->tf_regs[FRAME_PC] - 4; sticks = td->td_sticks; diff --git a/sys/amd64/amd64/intr_machdep.c b/sys/amd64/amd64/intr_machdep.c index 0c5f6af..a3d7933 100644 --- a/sys/amd64/amd64/intr_machdep.c +++ b/sys/amd64/amd64/intr_machdep.c @@ -167,7 +167,7 @@ intr_execute_handlers(struct intsrc *isrc, struct intrframe *iframe) * processed too. */ (*isrc->is_count)++; - cnt.v_intr++; + PCPU_LAZY_INC(cnt.v_intr); it = isrc->is_ithread; if (it == NULL) diff --git a/sys/amd64/amd64/trap.c b/sys/amd64/amd64/trap.c index a3adaa4..4933633 100644 --- a/sys/amd64/amd64/trap.c +++ b/sys/amd64/amd64/trap.c @@ -162,7 +162,7 @@ trap(frame) u_int sticks = 0; int i = 0, ucode = 0, type, code; - atomic_add_int(&cnt.v_trap, 1); + PCPU_LAZY_INC(cnt.v_trap); type = frame.tf_trapno; #ifdef KDB diff --git a/sys/amd64/ia32/ia32_syscall.c b/sys/amd64/ia32/ia32_syscall.c index 39eb81a..f159cfb 100644 --- a/sys/amd64/ia32/ia32_syscall.c +++ b/sys/amd64/ia32/ia32_syscall.c @@ -106,7 +106,7 @@ ia32_syscall(struct trapframe frame) * note: PCPU_LAZY_INC() can only be used if we can afford * occassional inaccuracy in the count. */ - cnt.v_syscall++; + PCPU_LAZY_INC(cnt.v_syscall); sticks = td->td_sticks; td->td_frame = &frame; diff --git a/sys/arm/arm/trap.c b/sys/arm/arm/trap.c index bcb703d..fad077a 100644 --- a/sys/arm/arm/trap.c +++ b/sys/arm/arm/trap.c @@ -251,7 +251,7 @@ data_abort_handler(trapframe_t *tf) td = curthread; p = td->td_proc; - atomic_add_int(&cnt.v_trap, 1); + PCPU_LAZY_INC(cnt.v_trap); /* Data abort came from user mode? */ user = TRAP_USERMODE(tf); @@ -716,7 +716,7 @@ prefetch_abort_handler(trapframe_t *tf) td = curthread; p = td->td_proc; - atomic_add_int(&cnt.v_trap, 1); + PCPU_LAZY_INC(cnt.v_trap); if (TRAP_USERMODE(tf)) { td->td_frame = tf; @@ -867,7 +867,7 @@ syscall(struct thread *td, trapframe_t *frame, u_int32_t insn) int locked = 0; u_int sticks = 0; - atomic_add_int(&cnt.v_syscall, 1); + PCPU_LAZY_INC(cnt.v_syscall); sticks = td->td_sticks; if (td->td_ucred != td->td_proc->p_ucred) cred_update_thread(td); diff --git a/sys/arm/arm/undefined.c b/sys/arm/arm/undefined.c index 257e612..3d7d3cb 100644 --- a/sys/arm/arm/undefined.c +++ b/sys/arm/arm/undefined.c @@ -185,7 +185,7 @@ undefinedinstruction(trapframe_t *frame) enable_interrupts(I32_bit); frame->tf_pc -= INSN_SIZE; - atomic_add_int(&cnt.v_trap, 1); + PCPU_LAZY_INC(cnt.v_trap); fault_pc = frame->tf_pc; diff --git a/sys/i386/i386/intr_machdep.c b/sys/i386/i386/intr_machdep.c index 0c5f6af..a3d7933 100644 --- a/sys/i386/i386/intr_machdep.c +++ b/sys/i386/i386/intr_machdep.c @@ -167,7 +167,7 @@ intr_execute_handlers(struct intsrc *isrc, struct intrframe *iframe) * processed too. */ (*isrc->is_count)++; - cnt.v_intr++; + PCPU_LAZY_INC(cnt.v_intr); it = isrc->is_ithread; if (it == NULL) diff --git a/sys/i386/i386/trap.c b/sys/i386/i386/trap.c index 1a49784..a75ecec 100644 --- a/sys/i386/i386/trap.c +++ b/sys/i386/i386/trap.c @@ -180,7 +180,7 @@ trap(frame) static int lastalert = 0; #endif - atomic_add_int(&cnt.v_trap, 1); + PCPU_LAZY_INC(cnt.v_trap); type = frame.tf_trapno; #ifdef KDB diff --git a/sys/ia64/ia32/ia32_trap.c b/sys/ia64/ia32/ia32_trap.c index 630ef0f..58a805f 100644 --- a/sys/ia64/ia32/ia32_trap.c +++ b/sys/ia64/ia32/ia32_trap.c @@ -62,7 +62,7 @@ ia32_syscall(struct trapframe *tf) u_int code; int error, i, narg; - atomic_add_int(&cnt.v_syscall, 1); + PCPU_LAZY_INC(cnt.v_syscall); td = curthread; params = (caddr_t)(tf->tf_special.sp & ((1L<<32)-1)) + @@ -205,7 +205,7 @@ ia32_trap(int vector, struct trapframe *tf) KASSERT(TRAPF_USERMODE(tf), ("%s: In kernel mode???", __func__)); ia64_set_fpsr(IA64_FPSR_DEFAULT); - atomic_add_int(&cnt.v_trap, 1); + PCPU_LAZY_INC(cnt.v_trap); td = curthread; td->td_frame = tf; diff --git a/sys/ia64/ia64/interrupt.c b/sys/ia64/ia64/interrupt.c index 0cc1fb6..7e28935 100644 --- a/sys/ia64/ia64/interrupt.c +++ b/sys/ia64/ia64/interrupt.c @@ -152,7 +152,7 @@ interrupt(u_int64_t vector, struct trapframe *tf) if (vector == CLOCK_VECTOR) {/* clock interrupt */ /* CTR0(KTR_INTR, "clock interrupt"); */ - cnt.v_intr++; + PCPU_LAZY_INC(cnt.v_intr); #ifdef EVCNT_COUNTERS clock_intr_evcnt.ev_count++; #else diff --git a/sys/ia64/ia64/trap.c b/sys/ia64/ia64/trap.c index c34daa0..bd8f848 100644 --- a/sys/ia64/ia64/trap.c +++ b/sys/ia64/ia64/trap.c @@ -332,7 +332,7 @@ trap(int vector, struct trapframe *tf) user = TRAPF_USERMODE(tf) ? 1 : 0; - atomic_add_int(&cnt.v_trap, 1); + PCPU_LAZY_INC(cnt.v_trap); td = curthread; p = td->td_proc; @@ -896,7 +896,7 @@ syscall(struct trapframe *tf) code = tf->tf_scratch.gr15; args = &tf->tf_scratch.gr16; - atomic_add_int(&cnt.v_syscall, 1); + PCPU_LAZY_INC(cnt.v_syscall); td = curthread; td->td_frame = tf; diff --git a/sys/kern/kern_intr.c b/sys/kern/kern_intr.c index c1de705..837a2bb 100644 --- a/sys/kern/kern_intr.c +++ b/sys/kern/kern_intr.c @@ -457,7 +457,7 @@ swi_sched(void *cookie, int flags) struct ithd *it = ih->ih_ithread; int error; - atomic_add_int(&cnt.v_intr, 1); /* one more global interrupt */ + PCPU_LAZY_INC(cnt.v_intr); CTR3(KTR_INTR, "swi_sched pid %d(%s) need=%d", it->it_td->td_proc->p_pid, it->it_td->td_proc->p_comm, it->it_need); diff --git a/sys/powerpc/aim/trap.c b/sys/powerpc/aim/trap.c index cee51bc..a19cacc 100644 --- a/sys/powerpc/aim/trap.c +++ b/sys/powerpc/aim/trap.c @@ -147,7 +147,7 @@ trap(struct trapframe *frame) int sig, type, user; u_int sticks, ucode; - atomic_add_int(&cnt.v_trap, 1); + PCPU_LAZY_INC(cnt.v_trap); td = PCPU_GET(curthread); p = td->td_proc; @@ -338,7 +338,7 @@ syscall(struct trapframe *frame) td = PCPU_GET(curthread); p = td->td_proc; - atomic_add_int(&cnt.v_syscall, 1); + PCPU_LAZY_INC(cnt.v_syscall); if (p->p_flag & P_SA) thread_user_enter(td); diff --git a/sys/powerpc/powerpc/trap.c b/sys/powerpc/powerpc/trap.c index cee51bc..a19cacc 100644 --- a/sys/powerpc/powerpc/trap.c +++ b/sys/powerpc/powerpc/trap.c @@ -147,7 +147,7 @@ trap(struct trapframe *frame) int sig, type, user; u_int sticks, ucode; - atomic_add_int(&cnt.v_trap, 1); + PCPU_LAZY_INC(cnt.v_trap); td = PCPU_GET(curthread); p = td->td_proc; @@ -338,7 +338,7 @@ syscall(struct trapframe *frame) td = PCPU_GET(curthread); p = td->td_proc; - atomic_add_int(&cnt.v_syscall, 1); + PCPU_LAZY_INC(cnt.v_syscall); if (p->p_flag & P_SA) thread_user_enter(td); diff --git a/sys/sparc64/sparc64/trap.c b/sys/sparc64/sparc64/trap.c index 8a6f75d..4629dea 100644 --- a/sys/sparc64/sparc64/trap.c +++ b/sys/sparc64/sparc64/trap.c @@ -240,7 +240,7 @@ trap(struct trapframe *tf) trap_msg[tf->tf_type & ~T_KERNEL], (TRAPF_USERMODE(tf) ? "user" : "kernel"), rdpr(pil)); - atomic_add_int(&cnt.v_trap, 1); + PCPU_LAZY_INC(cnt.v_trap); if ((tf->tf_tstate & TSTATE_PRIV) == 0) { KASSERT(td != NULL, ("trap: curthread NULL")); @@ -510,7 +510,7 @@ syscall(struct trapframe *tf) p = td->td_proc; - atomic_add_int(&cnt.v_syscall, 1); + PCPU_LAZY_INC(cnt.v_syscall); narg = 0; error = 0; |