public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] tapsetset/memory.stp
@ 2014-04-01 19:49 William Cohen
  0 siblings, 0 replies; only message in thread
From: William Cohen @ 2014-04-01 19:49 UTC (permalink / raw)
  To: systemtap

[-- Attachment #1: Type: text/plain, Size: 726 bytes --]

When experimenting with the pfaults.stp systemtap example on Fedora 19 I noticed that pfaults failed because the probe vm.fault points. There are similar failure listed in dejazilla:

https://web.elastic.org/~dejazilla/view.php?_offset=0&_limit=100&_offset=0&summary=%3D%27%3C201404011556.s31FuPfn021470%40elastic.org%3E%27&age=&rg=&tool=%3D%27systemtap%27&variant=%3D%27x86_64-unknown-linux-gnu%27&versions=&testcase=&result=%3D%27FAIL%27

The attached patch attempts to instrument the exported function handle_mm_fault rather than the internal function __handle_mm_fault.  The internal function tends to get inlined and some arguments are not available causing the pfault.stp not to build. Does this look reasonable?

-Will

[-- Attachment #2: pagefault.patch --]
[-- Type: text/x-patch, Size: 1053 bytes --]

diff --git a/tapset/linux/memory.stp b/tapset/linux/memory.stp
index 28e3ed3..3ff5d17 100644
--- a/tapset/linux/memory.stp
+++ b/tapset/linux/memory.stp
@@ -64,8 +64,8 @@ function vm_fault_contains:long (value:long, test:long)
  *
  * Context: The process which triggered the fault
  */
-probe vm.pagefault = kernel.function("__handle_mm_fault@mm/memory.c") ?,
-                     kernel.function("handle_mm_fault@mm/memory.c") ?
+probe vm.pagefault = kernel.function("handle_mm_fault@mm/memory.c") !,
+		     kernel.function("__handle_mm_fault@mm/memory.c")
 {
 	name = "pagefault"
 	write_access = (@defined($flags)
@@ -84,8 +84,8 @@ probe vm.pagefault = kernel.function("__handle_mm_fault@mm/memory.c") ?,
  * nor major fault.
  */
 probe vm.pagefault.return =
-		kernel.function("__handle_mm_fault@mm/memory.c").return ?,
-		kernel.function("handle_mm_fault@mm/memory.c").return ?
+		kernel.function("handle_mm_fault@mm/memory.c").return !,
+		kernel.function("__handle_mm_fault@mm/memory.c").return
 {
 	name = "pagefault"
 	fault_type = $return

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-04-01 19:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-01 19:49 [PATCH] tapsetset/memory.stp William Cohen

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 read-only IMAP folder(s) and NNTP newsgroup(s).