mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andi Kleen <andi@halobates.de>
To: Taras Glek <tglek@mozilla.com>
Cc: lkml <linux-kernel@vger.kernel.org>
Subject: Re: How to use perf to log page faults
Date: Wed, 12 May 2010 22:07:03 +0200	[thread overview]
Message-ID: <8739xwvq8o.fsf@basil.nowhere.org> (raw)
In-Reply-To: <4BEB03B6.6080706@mozilla.com> (Taras Glek's message of "Wed\, 12 May 2010 12\:38\:30 -0700")

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.

      parent reply	other threads:[~2010-05-12 20:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-12 19:38 Taras Glek
2010-05-12 19:59 ` Frederic Weisbecker
2010-05-12 21:18   ` Taras Glek
2010-05-12 21:29     ` Frederic Weisbecker
2010-05-12 20:07 ` Andi Kleen [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8739xwvq8o.fsf@basil.nowhere.org \
    --to=andi@halobates.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tglek@mozilla.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome