Page faults
David Smith
dsmith@redhat.com
Tue Sep 10 18:12:00 GMT 2013
On 09/10/2013 11:14 AM, Paddie O'Brien wrote:
> Thanks David. I tried your approach but I get the same result.
>
> The script sometimes crashes unless I include --skip-badvars.
>
> Could my problem be caused by a misconfigured systemtap installation?
>
> Thanks,
> P
Hmm, interesting. I tweaked the script a bit to use the 'target()'
function, which returns the pid of the target (from either '-c command'
or '-x pid').
====
global handled
probe kernel.function("filemap_fault")
{
if (pid() != target()) next;
printf("%s: filemap_fault\n", execname());
printf("Page: %lu\n", $vmf->pgoff);
handled[tid()] = 1
}
probe kernel.function("filemap_fault").return
{
if (pid() != target()) next;
delete handled[tid()]
}
probe kernel.function("find_get_page")
{
if (handled[tid()] != 1) next;
printf("%s: find_get_page\n", execname());
printf("Page: %lu\n\n", $offset);
}
====
When I run "stap -c page_faults.stp -c ls", all the page numbers match up.
Since I didn't have to use '--skip-badvars', my next guess would be that
you've got an older systemtap.
I'm running HEAD systemtap (~2.3) on 3.11.0-0.rc5.git3.1.fc20.x86_64.
What version of systemtap and what kernel are you running?
--
David Smith
dsmith@redhat.com
Red Hat
http://www.redhat.com
256.217.0141 (direct)
256.837.0057 (fax)
More information about the Systemtap
mailing list