Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1706609
| From | Laurent Dufour <ldufour@linux.vnet.ibm.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 14/16] x86/mm: Add support for SPF events |
| Date | 2017-08-08 16:40 +0200 |
| Message-ID | <ucdPQ-1fE-7@gated-at.bofh.it> (permalink) |
| References | <ucdPQ-1fE-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Add support for the new speculative page faults software events.
Signed-off-by: Laurent Dufour <ldufour@linux.vnet.ibm.com>
---
arch/x86/mm/fault.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c
index 46fb9c2a832d..17985f11b9da 100644
--- a/arch/x86/mm/fault.c
+++ b/arch/x86/mm/fault.c
@@ -1374,8 +1374,12 @@ __do_page_fault(struct pt_regs *regs, unsigned long error_code,
* requires the vma pointer to be set. So in that case,
* we fall through the normal path.
*/
- if (!(fault & VM_FAULT_RETRY || fault & VM_FAULT_ERROR))
+ if (!(fault & VM_FAULT_RETRY || fault & VM_FAULT_ERROR)) {
+ perf_sw_event(PERF_COUNT_SW_SPF_DONE, 1,
+ regs, address);
goto done;
+ }
+ perf_sw_event(PERF_COUNT_SW_SPF_FAILED, 1, regs, address);
}
/*
--
2.7.4
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
[PATCH 14/16] x86/mm: Add support for SPF events Laurent Dufour <ldufour@linux.vnet.ibm.com> - 2017-08-08 16:40 +0200
csiph-web