sparc: Add alignment and emulation fault perf events.
This mirrors commit 196f02bf90
(powerpc: perf_event: Add alignment-faults and emulation-faults software events)
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
@ -5,6 +5,7 @@
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/errno.h>
|
||||
#include <linux/thread_info.h>
|
||||
#include <linux/perf_event.h>
|
||||
|
||||
#include <asm/ptrace.h>
|
||||
#include <asm/pstate.h>
|
||||
@ -801,6 +802,8 @@ int vis_emul(struct pt_regs *regs, unsigned int insn)
|
||||
|
||||
BUG_ON(regs->tstate & TSTATE_PRIV);
|
||||
|
||||
perf_sw_event(PERF_COUNT_SW_EMULATION_FAULTS, 1, 0, regs, 0);
|
||||
|
||||
if (test_thread_flag(TIF_32BIT))
|
||||
pc = (u32)pc;
|
||||
|
||||
|
Reference in New Issue
Block a user