diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-02-25 23:09:22 +0100 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-02-25 23:09:22 +0100 |
commit | bc85e585c6d0fab4bde12d60964b2f25802c3163 (patch) | |
tree | 80f5fe916e3458d0676e595e3433a0313e7ba72b /arch/arm/mm | |
parent | Merge branch 'tmpreg' into devel (diff) | |
parent | ARM: 5903/1: arm/perfevents: add support for ARMv7 (diff) | |
download | linux-bc85e585c6d0fab4bde12d60964b2f25802c3163.tar.xz linux-bc85e585c6d0fab4bde12d60964b2f25802c3163.zip |
Merge branch 'perf' into devel
Conflicts:
arch/arm/Kconfig
Diffstat (limited to 'arch/arm/mm')
-rw-r--r-- | arch/arm/mm/fault.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/arm/mm/fault.c b/arch/arm/mm/fault.c index 10e06801afb3..9d40c341e07e 100644 --- a/arch/arm/mm/fault.c +++ b/arch/arm/mm/fault.c @@ -18,6 +18,7 @@ #include <linux/page-flags.h> #include <linux/sched.h> #include <linux/highmem.h> +#include <linux/perf_event.h> #include <asm/system.h> #include <asm/pgtable.h> @@ -302,6 +303,12 @@ do_page_fault(unsigned long addr, unsigned int fsr, struct pt_regs *regs) fault = __do_page_fault(mm, addr, fsr, tsk); up_read(&mm->mmap_sem); + perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS, 1, 0, regs, addr); + if (fault & VM_FAULT_MAJOR) + perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS_MAJ, 1, 0, regs, addr); + else if (fault & VM_FAULT_MINOR) + perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS_MIN, 1, 0, regs, addr); + /* * Handle the "normal" case first - VM_FAULT_MAJOR / VM_FAULT_MINOR */ |