- patches.suse/slab-handle-memoryless-nodes-v2a.patch: Refresh.
[linux-flexiantxendom0-3.2.10.git] / arch / sparc / math-emu / math_32.c
index e13f65d..a3fccde 100644 (file)
@@ -67,6 +67,7 @@
 #include <linux/types.h>
 #include <linux/sched.h>
 #include <linux/mm.h>
+#include <linux/perf_event.h>
 #include <asm/uaccess.h>
 
 #include "sfp-util_32.h"
@@ -163,6 +164,8 @@ int do_mathemu(struct pt_regs *regs, struct task_struct *fpt)
        int retcode = 0;                               /* assume all succeed */
        unsigned long insn;
 
+       perf_sw_event(PERF_COUNT_SW_EMULATION_FAULTS, 1, 0, regs, 0);
+
 #ifdef DEBUG_MATHEMU
        printk("In do_mathemu()... pc is %08lx\n", regs->pc);
        printk("fpqdepth is %ld\n", fpt->thread.fpqdepth);