diff options
author | David S. Miller <davem@davemloft.net> | 2010-01-20 03:04:14 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-01-20 16:23:03 -0800 |
commit | a084b6678a89a106a350c12e4845f42ccc9811f0 (patch) | |
tree | bf6b07e5590f5ecc69c8fcfc1cd6edf6c06bf811 /arch/sparc/mm/fault_64.c | |
parent | e7bef6b04ca2e8e4cf667c43d7e2ab3034a869d5 (diff) | |
download | kernel_samsung_aries-a084b6678a89a106a350c12e4845f42ccc9811f0.zip kernel_samsung_aries-a084b6678a89a106a350c12e4845f42ccc9811f0.tar.gz kernel_samsung_aries-a084b6678a89a106a350c12e4845f42ccc9811f0.tar.bz2 |
sparc: Add missing SW perf fault events.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc/mm/fault_64.c')
-rw-r--r-- | arch/sparc/mm/fault_64.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/arch/sparc/mm/fault_64.c b/arch/sparc/mm/fault_64.c index 6081936..b9d4ff0 100644 --- a/arch/sparc/mm/fault_64.c +++ b/arch/sparc/mm/fault_64.c @@ -16,6 +16,7 @@ #include <linux/mm.h> #include <linux/module.h> #include <linux/init.h> +#include <linux/perf_event.h> #include <linux/interrupt.h> #include <linux/kprobes.h> #include <linux/kdebug.h> @@ -296,6 +297,8 @@ asmlinkage void __kprobes do_sparc64_fault(struct pt_regs *regs) if (in_atomic() || !mm) goto intr_or_no_mm; + perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS, 1, 0, regs, address); + if (!down_read_trylock(&mm->mmap_sem)) { if ((regs->tstate & TSTATE_PRIV) && !search_exception_tables(regs->tpc)) { @@ -400,11 +403,15 @@ good_area: goto do_sigbus; BUG(); } - if (fault & VM_FAULT_MAJOR) + if (fault & VM_FAULT_MAJOR) { current->maj_flt++; - else + perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS_MAJ, 1, 0, + regs, address); + } else { current->min_flt++; - + perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS_MIN, 1, 0, + regs, address); + } up_read(&mm->mmap_sem); mm_rss = get_mm_rss(mm); |