[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090310145915.GK3850@elte.hu>
Date: Tue, 10 Mar 2009 15:59:15 +0100
From: Ingo Molnar <mingo@...e.hu>
To: Peter Zijlstra <a.p.zijlstra@...llo.nl>
Cc: paulus@...ba.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/4] perf_counter: provide pagefault software events
* Peter Zijlstra <a.p.zijlstra@...llo.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists