]> git.saurik.com Git - apple/xnu.git/blobdiff - osfmk/i386/trap.c
xnu-2050.48.11.tar.gz
[apple/xnu.git] / osfmk / i386 / trap.c
index d7b4608786c2fd46b5168fe650dad279bc198ae2..c6f921c6f140692c407cdb03512deab581baaaa1 100644 (file)
 #include <mach/i386/syscall_sw.h>
 
 #include <libkern/OSDebug.h>
-
+#include <i386/cpu_threads.h>
 #include <machine/pal_routines.h>
 
 extern void throttle_lowpri_io(int);
@@ -350,7 +350,7 @@ interrupt(x86_saved_state_t *state)
        int             ipl;
        int             cnum = cpu_number();
        int             itype = 0;
-       
+
        if (is_saved_state64(state) == TRUE) {
                x86_saved_state64_t     *state64;
 
@@ -373,6 +373,9 @@ interrupt(x86_saved_state_t *state)
                interrupt_num = state32->trapno;
        }
 
+       if (cpu_data_ptr[cnum]->lcpu.package->num_idle == topoParms.nLThreadsPerPackage)
+               cpu_data_ptr[cnum]->cpu_hwIntpexits[interrupt_num]++;
+
        if (interrupt_num == (LAPIC_DEFAULT_INTERRUPT_BASE + LAPIC_INTERPROCESSOR_INTERRUPT))
                itype = 1;
        else if (interrupt_num == (LAPIC_DEFAULT_INTERRUPT_BASE + LAPIC_TIMER_INTERRUPT))