diff options
| author | Takashi Iwai <tiwai@suse.de> | 2015-03-09 08:42:00 +0100 |
|---|---|---|
| committer | Takashi Iwai <tiwai@suse.de> | 2015-03-09 08:42:00 +0100 |
| commit | 4aa01c408b7022c620241b373d4c3707a2ebeab6 (patch) | |
| tree | 25df2a7453ec3bf7fc82f2871756b4efd6d3d283 /arch/arc/mm/fault.c | |
| parent | 5371fc0ecdf55b6811ade8a198de8ace2f4e5861 (diff) | |
| parent | a1f3f1ca66bd12c339b17a0c2ef93a093f90a277 (diff) | |
Merge branch 'for-linus' into for-next
Merging the HD-audio fixes back to base devel branch for further
working on it.
Diffstat (limited to 'arch/arc/mm/fault.c')
| -rw-r--r-- | arch/arc/mm/fault.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/arch/arc/mm/fault.c b/arch/arc/mm/fault.c index 563cb27e37f5..6a2e006cbcce 100644 --- a/arch/arc/mm/fault.c +++ b/arch/arc/mm/fault.c @@ -14,6 +14,7 @@ #include <linux/ptrace.h> #include <linux/uaccess.h> #include <linux/kdebug.h> +#include <linux/perf_event.h> #include <asm/pgalloc.h> #include <asm/mmu.h> @@ -139,13 +140,20 @@ good_area: return; } + perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS, 1, regs, address); + if (likely(!(fault & VM_FAULT_ERROR))) { if (flags & FAULT_FLAG_ALLOW_RETRY) { /* To avoid updating stats twice for retry case */ - if (fault & VM_FAULT_MAJOR) + if (fault & VM_FAULT_MAJOR) { tsk->maj_flt++; - else + perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS_MAJ, 1, + regs, address); + } else { tsk->min_flt++; + perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS_MIN, 1, + regs, address); + } if (fault & VM_FAULT_RETRY) { flags &= ~FAULT_FLAG_ALLOW_RETRY; |
