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>
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user