public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* Page faults
@ 2013-09-09 20:36 Paddie O'Brien
  2013-09-09 21:00 ` David Smith
  0 siblings, 1 reply; 6+ messages in thread
From: Paddie O'Brien @ 2013-09-09 20:36 UTC (permalink / raw)
  To: systemtap

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

Hi,

I run the attached to print out the offsets of faulting pages. Both
probes should (I think) print the same number but instead I get this:

hello: filemap_fault
Page: 1678263179
hello: find_get_page
Page: 15

hello: filemap_fault
Page: 1678263179
hello: find_get_page
Page: 1

hello: filemap_fault
Page: 1678263179
hello: find_get_page
Page: 10

etc. etc.

Both functions are from mm/filemap.c. filemap_fault does this:

pgoff_t offset = vmf->offset;
find_get_page(mapping, offset);

Basically, printing the offset in find_get_page works but printing
vmf->offset in filemap_fault doesn't.

Why?

Thanks,
P

[-- Attachment #2: pages.stp --]
[-- Type: application/octet-stream, Size: 330 bytes --]

#!/usr/bin/stap

probe kernel.function("filemap_fault")
{
	if (execname() != "hello") next;
	printf("%s: filemap_fault\n", execname());
	printf("Page: %lu\n", $vmf->pgoff);
}

probe kernel.function("find_get_page")
{
	if (execname() != "hello") next;
	printf("%s: find_get_page\n", execname());
	printf("Page: %lu\n", $offset);
}

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

end of thread, other threads:[~2013-09-10 21:38 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-09-09 20:36 Page faults Paddie O'Brien
2013-09-09 21:00 ` David Smith
2013-09-10 16:14   ` Paddie O'Brien
2013-09-10 18:12     ` David Smith
2013-09-10 20:12     ` Frank Ch. Eigler
2013-09-10 21:38       ` Paddie O'Brien

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).