summaryrefslogtreecommitdiff
path: root/arch/sparc/math-emu/math_64.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2009-12-11 01:07:53 -0800
committerDavid S. Miller <davem@davemloft.net>2009-12-11 01:07:53 -0800
commit121dd5f2776522e03970916514b46e355480e538 (patch)
tree0235f760d5e40cb4982b52368e309eac00f8826d /arch/sparc/math-emu/math_64.c
parentc658ad1b4e1520511da8323aa5e60d444cc303ed (diff)
downloadlinux-3.10-121dd5f2776522e03970916514b46e355480e538.tar.gz
linux-3.10-121dd5f2776522e03970916514b46e355480e538.tar.bz2
linux-3.10-121dd5f2776522e03970916514b46e355480e538.zip
sparc: Add alignment and emulation fault perf events.
This mirrors commit 196f02bf900c5eb6f85d889c4f70e7cc11fda7e8 (powerpc: perf_event: Add alignment-faults and emulation-faults software events) Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc/math-emu/math_64.c')
-rw-r--r--arch/sparc/math-emu/math_64.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/sparc/math-emu/math_64.c b/arch/sparc/math-emu/math_64.c
index 6863c9bde25..56d2c44747b 100644
--- a/arch/sparc/math-emu/math_64.c
+++ b/arch/sparc/math-emu/math_64.c
@@ -11,6 +11,7 @@
#include <linux/types.h>
#include <linux/sched.h>
#include <linux/errno.h>
+#include <linux/perf_event.h>
#include <asm/fpumacro.h>
#include <asm/ptrace.h>
@@ -183,6 +184,7 @@ int do_mathemu(struct pt_regs *regs, struct fpustate *f)
if (tstate & TSTATE_PRIV)
die_if_kernel("unfinished/unimplemented FPop from kernel", regs);
+ perf_sw_event(PERF_COUNT_SW_EMULATION_FAULTS, 1, 0, regs, 0);
if (test_thread_flag(TIF_32BIT))
pc = (u32)pc;
if (get_user(insn, (u32 __user *) pc) != -EFAULT) {