Re: [Patch 11/12] ftrace plugin for kernel symbol tracing using HW Breakpoint interfaces - v3

Frederic Weisbecker
2009-04-24T20:57:58Z

On Fri, Apr 24, 2009 at 02:43:47PM +0530, K.Prasad wrote:
> On Fri, Apr 24, 2009 at 09:21:42AM +0200, Frederic Weisbecker wrote:
> > On Fri, Apr 24, 2009 at 11:48:50AM +0530, K.Prasad wrote:
> > > This patch adds an ftrace plugin to detect and profile memory access over kernel
> > > variables. It uses HW Breakpoint interfaces to 'watch memory addresses.
> >
> >
> > Just a small concern, but it would be nice if you could include the history
> > of this patch in the changelogs.
> >
> >
> >
>
> Hi Frederic,
> Thanks for looking into the patch. I will provide the history of
> changes here. The ULONG_MAX definition from linux/kernel.h is now used
> and the permission for the 'ksym_trace_filter' file is now set to 644
> (similar to other ftrace plugin filters).
>
> Changelog
> ---------
> (since the first post of this patch here: http://lkml.org/lkml/2009/3/4/418)
>
> - Addition of a startup selftest to test basic sanity of HW Breakpoint
> infrastructure.
> - Implementation of a ftrace's stats facility over ksym_tracer to
> provide aggregate 'hit' counter values.
> - Conversion of all locking primitives into spinlocks (ksym_tracer_lock)
> from previous mutex implementation (since stats collection happens inside
> the context of the breakpoint exception and we cannot sleep).
> - A few changes in ksym_trace_filter_write() and
> process_new_ksym_entry() to eliminate passing of unnecessary values.
> - Fixed a few potential memory leak scenarios (missing kfree()
> operations in return path) along with other minor issues pointed out in LKML.
> - Minor code changes such as unconditional definition of 'struct
> trace_ksym' - irrespective of CONFIG_KSYM_TRACER.

Thanks! Such history is very useful to understand a patch. They
can explain some logic reasoning of a patch, especially between
versions.

> ftrace plugin for kernel symbol tracing using HW Breakpoint interfaces - v3
>
> 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@linux.vnet.ibm.com>

It looks good.
Thanks!