diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-02-25 17:09:22 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-02-25 17:09:22 -0500 |
commit | bc85e585c6d0fab4bde12d60964b2f25802c3163 (patch) | |
tree | 80f5fe916e3458d0676e595e3433a0313e7ba72b /arch/arm/mm | |
parent | 186f93ea1f274f4cde4a356401c1786c818ff881 (diff) | |
parent | 796d12959ad374cae8eb77faaf4243455a305433 (diff) |
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 @@ | |||
18 | #include <linux/page-flags.h> | 18 | #include <linux/page-flags.h> |
19 | #include <linux/sched.h> | 19 | #include <linux/sched.h> |
20 | #include <linux/highmem.h> | 20 | #include <linux/highmem.h> |
21 | #include <linux/perf_event.h> | ||
21 | 22 | ||
22 | #include <asm/system.h> | 23 | #include <asm/system.h> |
23 | #include <asm/pgtable.h> | 24 | #include <asm/pgtable.h> |
@@ -302,6 +303,12 @@ do_page_fault(unsigned long addr, unsigned int fsr, struct pt_regs *regs) | |||
302 | fault = __do_page_fault(mm, addr, fsr, tsk); | 303 | fault = __do_page_fault(mm, addr, fsr, tsk); |
303 | up_read(&mm->mmap_sem); | 304 | up_read(&mm->mmap_sem); |
304 | 305 | ||
306 | perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS, 1, 0, regs, addr); | ||
307 | if (fault & VM_FAULT_MAJOR) | ||
308 | perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS_MAJ, 1, 0, regs, addr); | ||
309 | else if (fault & VM_FAULT_MINOR) | ||
310 | perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS_MIN, 1, 0, regs, addr); | ||
311 | |||
305 | /* | 312 | /* |
306 | * Handle the "normal" case first - VM_FAULT_MAJOR / VM_FAULT_MINOR | 313 | * Handle the "normal" case first - VM_FAULT_MAJOR / VM_FAULT_MINOR |
307 | */ | 314 | */ |