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

From: Steven Rostedt
Date: Tue Mar 24 2009 - 23:48:37 EST



On Wed, 25 Mar 2009, K.Prasad wrote:
>
> Thanks for pointing that out. I will make those changes and send out a
> new patchset.
>
> However, looking at some of the existing plugins I find that many of
> them do this check after trace_assign_type() or not do at all (e.g.
> trace_branch_print()). They may need similar changes too.

Ah, that was the other option I was going to mention. The
trace_branch_print is not called by tracer->print_line, like you have.
What you did is not wrong, but there are other options.

The other option is to register an event callback. That is, the ftrace
infrastructure will call the event registered to an id. I register
the trace_branch_event with the TRACE_BRANCH id. Then the ftrace
infrastructure will call the trace_branch_print if it encounters the
TRACE_BRANCH entry.

This means you can do the UNHANDLED return as I suggested. Or you remove
the print_line from you tracer and register an event for TRACE_KSYM
instead.

The choice is up to you ;-)

-- Steve

--
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/