lkml.org 
[lkml]   [2009]   [Dec]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 01/13] tracing: Extract duplicate ftrace_raw_init_event_foo()
Frederic Weisbecker wrote:
> 2009/12/7 Li Zefan <lizf@cn.fujitsu.com>:
>
>> +static int ftrace_raw_init_event_##call(struct ftrace_event_call *event_call)\
>> +{ \
>> + int id; \
>> + \
>> + id = register_ftrace_event(event_call->event); \
>> + if (!id) \
>> + return -ENODEV; \
>> + event_call->id = id; \
>> + INIT_LIST_HEAD(&event_call->fields); \
>> + return 0; \
>> }
>
>
> This function doesn't vary anymore in this form.
> May be can we define a generic one in trace_event.c and only reference
> this one?
>

Ah, you're right. I should have noticed this.

I'll make a patch to do this later on.

> Or even better, may be can we drop this callback field and statically call this
> code when we intialize an event. IIRC, the syscall raw_init_event has the
> same callback, may be it's even the same for kprobes events (I can't
> check right now).

I'll check it.



\
 
 \ /
  Last update: 2009-12-08 01:57    [W:0.034 / U:1.472 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site