From: Francis Deslauriers <fdeslaur@gmail.com>
To: linux-mm@kvack.org, tglx@linutronix.de, mingo@redhat.com,
hpa@zytor.com, x86@kernel.org, rostedt@goodmis.org,
fweisbec@gmail.com
Cc: raphael.beamonte@gmail.com, mathieu.desnoyers@efficios.com,
linux-kernel@vger.kernel.org,
Francis Deslauriers <fdeslaur@gmail.com>
Subject: [page fault tracepoint 1/2] Add page fault trace event definitions
Date: Thu, 9 May 2013 02:05:19 -0400 [thread overview]
Message-ID: <1368079520-11015-1-git-send-email-fdeslaur@gmail.com> (raw)
Add page_fault_entry and page_fault_exit event definitions. It will
allow each architecture to instrument their page faults.
Signed-off-by: Francis Deslauriers <fdeslaur@gmail.com>
Reviewed-by: RaphaA<<l Beamonte <raphael.beamonte@gmail.com>
Reviewed-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
---
include/trace/events/fault.h | 51 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 51 insertions(+)
create mode 100644 include/trace/events/fault.h
diff --git a/include/trace/events/fault.h b/include/trace/events/fault.h
new file mode 100644
index 0000000..522ddee
--- /dev/null
+++ b/include/trace/events/fault.h
@@ -0,0 +1,51 @@
+#undef TRACE_SYSTEM
+#define TRACE_SYSTEM fault
+
+#if !defined(_TRACE_FAULT_H) || defined(TRACE_HEADER_MULTI_READ)
+#define _TRACE_FAULT_H
+
+#include <linux/tracepoint.h>
+
+TRACE_EVENT(page_fault_entry,
+
+ TP_PROTO(struct pt_regs *regs, unsigned long address,
+ int write_access),
+
+ TP_ARGS(regs, address, write_access),
+
+ TP_STRUCT__entry(
+ __field( unsigned long, ip )
+ __field( unsigned long, addr )
+ __field( uint8_t, write )
+ ),
+
+ TP_fast_assign(
+ __entry->ip = regs ? instruction_pointer(regs) : 0UL;
+ __entry->addr = address;
+ __entry->write = !!write_access;
+ ),
+
+ TP_printk("ip=%lu addr=%lu write_access=%d",
+ __entry->ip, __entry->addr, __entry->write)
+);
+
+TRACE_EVENT(page_fault_exit,
+
+ TP_PROTO(int result),
+
+ TP_ARGS(result),
+
+ TP_STRUCT__entry(
+ __field( int, res )
+ ),
+
+ TP_fast_assign(
+ __entry->res = result;
+ ),
+
+ TP_printk("result=%d", __entry->res)
+);
+
+#endif /* _TRACE_FAULT_H */
+/* This part must be outside protection */
+#include <trace/define_trace.h>
--
1.7.10.4
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next reply other threads:[~2013-05-09 6:06 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-09 6:05 Francis Deslauriers [this message]
2013-05-09 6:05 ` [page fault tracepoint 2/2] x86:Instruments page fault trace event Francis Deslauriers
2013-05-09 6:46 ` [page fault tracepoint 1/2] Add page fault trace event definitions zhangwei(Jovi)
2013-05-09 13:48 ` H. Peter Anvin
2013-05-13 11:21 ` Mathieu Desnoyers
2013-05-13 15:08 ` Steven Rostedt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1368079520-11015-1-git-send-email-fdeslaur@gmail.com \
--to=fdeslaur@gmail.com \
--cc=fweisbec@gmail.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=mingo@redhat.com \
--cc=raphael.beamonte@gmail.com \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).