All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <a.p.zijlstra@chello.nl>
To: Ingo Molnar <mingo@elte.hu>
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 16:06:03 +0100	[thread overview]
Message-ID: <1236697563.25234.374.camel@laptop> (raw)
In-Reply-To: <20090310145915.GK3850@elte.hu>

On Tue, 2009-03-10 at 15:59 +0100, Ingo Molnar wrote:
> * 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?

Yeah, but unsurprising all pagefaults I generated were in userspace, so
kerneltop stayed empty.

Found that perfstat went bokers though, forgot to handle the case where
there's no overflow interrupt.

/me goes poke at the code a bit more.




  reply	other threads:[~2009-03-10 15:06 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
2009-03-10 15:06     ` Peter Zijlstra [this message]
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=1236697563.25234.374.camel@laptop \
    --to=a.p.zijlstra@chello.nl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.