diff options
author | Paul Mundt <lethal@linux-sh.org> | 2010-10-13 06:55:26 +0900 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2010-10-13 06:55:26 +0900 |
commit | ace2dc7d12693545b67f15ab8cdb3d255c937713 (patch) | |
tree | 18fa828ebe254e0137ec96a9e1cd4e146c6a7119 /arch/sh/kernel/traps_64.c | |
parent | 5a30d7bfcd33c03f1f67d3e1c317eb5d6a6bc811 (diff) |
sh: wire up perf alignment and emulation faults.
This plugs in the alignment and emulation fault reporting for perf sw
events.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/kernel/traps_64.c')
-rw-r--r-- | arch/sh/kernel/traps_64.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/sh/kernel/traps_64.c b/arch/sh/kernel/traps_64.c index fda6355654b7..6713ca97e553 100644 --- a/arch/sh/kernel/traps_64.c +++ b/arch/sh/kernel/traps_64.c @@ -24,6 +24,7 @@ #include <linux/interrupt.h> #include <linux/sysctl.h> #include <linux/module.h> +#include <linux/perf_event.h> #include <asm/system.h> #include <asm/uaccess.h> #include <asm/io.h> @@ -433,6 +434,8 @@ static int misaligned_load(struct pt_regs *regs, return error; } + perf_sw_event(PERF_COUNT_SW_ALIGNMENT_FAULTS, 1, 0, regs, address); + destreg = (opcode >> 4) & 0x3f; if (user_mode(regs)) { __u64 buffer; @@ -509,6 +512,8 @@ static int misaligned_store(struct pt_regs *regs, return error; } + perf_sw_event(PERF_COUNT_SW_ALIGNMENT_FAULTS, 1, 0, regs, address); + srcreg = (opcode >> 4) & 0x3f; if (user_mode(regs)) { __u64 buffer; @@ -583,6 +588,8 @@ static int misaligned_fpu_load(struct pt_regs *regs, return error; } + perf_sw_event(PERF_COUNT_SW_EMULATION_FAULTS, 1, 0, regs, address); + destreg = (opcode >> 4) & 0x3f; if (user_mode(regs)) { __u64 buffer; @@ -658,6 +665,8 @@ static int misaligned_fpu_store(struct pt_regs *regs, return error; } + perf_sw_event(PERF_COUNT_SW_EMULATION_FAULTS, 1, 0, regs, address); + srcreg = (opcode >> 4) & 0x3f; if (user_mode(regs)) { __u64 buffer; |