This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
[PATCH] tapsetset/memory.stp
- From: William Cohen <wcohen at redhat dot com>
- To: systemtap at sourceware dot org
- Date: Tue, 01 Apr 2014 15:49:44 -0400
- Subject: [PATCH] tapsetset/memory.stp
- Authentication-results: sourceware.org; auth=none
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
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