Thread (28 messages) 28 messages, 4 authors, 2017-08-10

Re: [PATCH 13/16] perf: Add a speculative page fault sw events

From: Laurent Dufour <hidden>
Date: 2017-08-09 13:26:01
Also in: linux-mm, lkml

On 09/08/2017 15:18, Michael Ellerman wrote:
Laurent Dufour [off-list ref] writes:
quoted
Add new software events to count succeeded and failed speculative page
faults.

Signed-off-by: Laurent Dufour <redacted>
---
 include/uapi/linux/perf_event.h | 2 ++
 1 file changed, 2 insertions(+)
diff --git a/include/uapi/linux/perf_event.h b/include/uapi/linux/perf_event.h
index b1c0b187acfe..fbfb03dff334 100644
--- a/include/uapi/linux/perf_event.h
+++ b/include/uapi/linux/perf_event.h
@@ -111,6 +111,8 @@ enum perf_sw_ids {
 	PERF_COUNT_SW_EMULATION_FAULTS		= 8,
 	PERF_COUNT_SW_DUMMY			= 9,
 	PERF_COUNT_SW_BPF_OUTPUT		= 10,
+	PERF_COUNT_SW_SPF_DONE			= 11,
+	PERF_COUNT_SW_SPF_FAILED		= 12,
Can't you calculate:

  PERF_COUNT_SW_SPF_FAILED = PERF_COUNT_SW_PAGE_FAULTS - PERF_COUNT_SW_SPF_DONE

ie. do you need a separate event for it?
Unfortunately not, because PERF_COUNT_SW_PAGE_FAULTS counts also page
faults from the kernel space, while SPF is only concerning user space page
faults.

Cheers,
Laurent.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help