lkml.org 
[lkml]   [2010]   [May]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: How to use perf to log page faults
From
Date
Taras Glek <tglek@mozilla.com> writes:

> Hi,
> From the docs it seems that perf may be useful for logging page
> faults. I tried
> perf record -g -d -f -e page-faults <mycommand>
> but all I got were PERF_RECORD_MMAP events.
>
> I'm using 2.6.32. Ideally I'd like to collect fault addresses and
> userspace stacks that caused them. Isn't this what the page-fault
> event is for?

Some time ago I used systemtap to do this for my pbitmaps
works. This was the old systemtap script.

-Andi

probe vm.pagefault {
if (task_execname(task_current()) == "executable" && address < 0x100000000) {
printf("%u\n", address);
}

}



--
ak@linux.intel.com -- Speaking for myself only.


\
 
 \ /
  Last update: 2010-05-12 22:09    [W:0.044 / U:10.980 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site