Re: [Patch 11/11] ftrace plugin for kernel symbol tracing using HWBreakpoint interfaces - v2

From: Ingo Molnar
Date: Sun Mar 08 2009 - 06:10:24 EST



* KOSAKI Motohiro <kosaki.motohiro@xxxxxxxxxxxxxx> wrote:

> Hi
>
> > This patch adds an ftrace plugin to detect and profile memory access over
> > kernel variables. It uses HW Breakpoint interfaces to 'watch memory
> > addresses.
> >
> > Signed-off-by: K.Prasad <prasad@xxxxxxxxxxxxxxxxxx>
> > ---
> > kernel/trace/Kconfig | 6
> > kernel/trace/Makefile | 1
> > kernel/trace/trace.h | 16 +
> > kernel/trace/trace_ksym.c | 448 ++++++++++++++++++++++++++++++++++++++++++
> > kernel/trace/trace_selftest.c | 36 +++
> > 5 files changed, 507 insertions(+)
>
> Could you please update Documentation/ftrace.txt?
> I guess many user interesting this patch. :)

Yeah, it has become a really nice feature this way. As i told it
to K.Prasad before: we need this tracer because the data tracer
will likely become the most common usecase of this facility. We
will get the hw breakpoints facility tested and used.

And in fact we can go one step further: it would also be nice to
wire it up with the ftrace histogram code: so that we can get
usage histograms of kernel symbol read/write activities without
the overhead of tracing. (The branch tracer already has this.)

Especially frequently used variables generate a _lot_ of events.

Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/