lkml.org 
[lkml]   [2010]   [Feb]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 02/11] tracing: Introduce TRACE_EVENT_INJECT
From
Date
On Wed, 2010-02-03 at 10:14 +0100, Frederic Weisbecker wrote:
> TRACE_EVENT_INJECT macro is the same as TRACE_EVENT but takes one

> #undef DEFINE_EVENT
> #define DEFINE_EVENT(template, call, proto, args) \
> static void ftrace_profile_##call(proto) \
> diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c
> index 189b09b..5c75cc7 100644
> --- a/kernel/trace/trace_events.c
> +++ b/kernel/trace/trace_events.c
> @@ -142,6 +142,9 @@ static int ftrace_event_enable_disable(struct ftrace_event_call *call,
> break;
> }
> call->enabled = 1;
> +
> + if (call->inject)
> + call->inject();
> }
> break;
> }

With the proposal I'm suggesting:

register_event_command(event, NULL, NULL, inject_me, inject_me, data);

The above would do basically what this patch does. When ever the event
is enabled or disabled the inject_me function will be called.

Would this work?

-- Steve




\
 
 \ /
  Last update: 2010-02-05 15:51    [W:0.471 / U:0.080 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site