public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: paulus@samba.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/4] perf_counter: provide pagefault software events
Date: Tue, 10 Mar 2009 15:59:15 +0100	[thread overview]
Message-ID: <20090310145915.GK3850@elte.hu> (raw)
In-Reply-To: <20090310142015.761644317@chello.nl>


* Peter Zijlstra <a.p.zijlstra@chello.nl> wrote:

> Index: linux-2.6/arch/powerpc/mm/fault.c
> ===================================================================
> --- linux-2.6.orig/arch/powerpc/mm/fault.c
> +++ linux-2.6/arch/powerpc/mm/fault.c
> @@ -29,6 +29,7 @@
>  #include <linux/module.h>
>  #include <linux/kprobes.h>
>  #include <linux/kdebug.h>
> +#include <linux/perf_counter.h>
>  
>  #include <asm/firmware.h>
>  #include <asm/page.h>
> @@ -170,6 +171,8 @@ int __kprobes do_page_fault(struct pt_re
>  		die("Weird page fault", regs, SIGSEGV);
>  	}
>  
> +	perf_swcount_event(PERF_COUNT_PAGE_FAULTS, 1, regs);

Wow, that's really nice - this way we can display a profile of 
pagefault events in KernelTop - as if it was a real cycles or 
other hw event based profile. Have you tried it out?

	Ingo

  reply	other threads:[~2009-03-10 14:59 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-10 14:19 [PATCH 0/4] generic software counters Peter Zijlstra
2009-03-10 14:19 ` [PATCH 1/4] perf_counter: software counter event infrastructure Peter Zijlstra
2009-03-10 14:19 ` [PATCH 2/4] perf_counter: provide pagefault software events Peter Zijlstra
2009-03-10 14:59   ` Ingo Molnar [this message]
2009-03-10 15:06     ` Peter Zijlstra
2009-03-10 14:19 ` [PATCH 3/4] perf_counter: x86: fix 32bit irq_period assumption Peter Zijlstra
2009-03-10 14:19 ` [PATCH 4/4] perf_counter: use list_move_tail Peter Zijlstra
2009-03-10 14:35 ` [PATCH 0/4] generic software counters Peter Zijlstra

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=20090310145915.GK3850@elte.hu \
    --to=mingo@elte.hu \
    --cc=a.p.zijlstra@chello.nl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paulus@samba.org \
    /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