public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* Tracking vm activity
@ 2007-04-23 21:05 William Cohen
  2007-04-23 23:19 ` Frank Ch. Eigler
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: William Cohen @ 2007-04-23 21:05 UTC (permalink / raw)
  To: SystemTAP

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

Hi,

I am playing around with getting information about page faults and I noticed 
that there is a probe alias for the entry for the pagefault code. However, there 
is no matching probe point for the return. It is useful to look at the return 
value to determine what kind of page fault occurred (major or minor). The 
attached patch provides a similar probe point for the return point. any comments 
on the patch?

This would be useful for the following senario. A probe on vm.pagefault could 
get the address and a probe on vm.pagefault.return could get information how it 
was handled. The analysis could then do things like which addresses cause major 
page faults (real disk accesses). One could write out a log of the major page 
faults (and the mmap operations) and track which files caused the page faults. 
Probably don't want to walk through the mm structures when taking a page fault 
to determine which file it came from.

-Will

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

Index: tapset/memory.stp
===================================================================
RCS file: /cvs/systemtap/src/tapset/memory.stp,v
retrieving revision 1.4
diff -U2 -u -r1.4 memory.stp
--- tapset/memory.stp	7 Nov 2006 09:26:24 -0000	1.4
+++ tapset/memory.stp	21 Mar 2007 14:40:27 -0000
@@ -27,4 +27,10 @@
 }
 
+probe vm.pagefault.return = kernel.function(
+        %( kernel_v >= "2.6.13" %? "__handle_mm_fault" %: "handle_mm_fault" %)
+        ).return
+{
+}
+
 /* Return which node the given address belongs to in a NUMA system */
 function addr_to_node:long(addr:long)  /* pure */ 

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2007-05-11  6:15 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-04-23 21:05 Tracking vm activity William Cohen
2007-04-23 23:19 ` Frank Ch. Eigler
2007-04-24 17:13 ` Stone, Joshua I
2007-04-24 18:17   ` William Cohen
2007-04-24 20:36     ` Stone, Joshua I
2007-05-08  3:08 ` Jun Koi
2007-05-08 14:15   ` Frank Ch. Eigler
2007-05-10 10:38     ` Jun Koi
2007-05-10 11:32       ` Frank Ch. Eigler
2007-05-11  6:15         ` Jun Koi
2007-05-08 21:12   ` 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).