[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c62985530912070627l1ba96ce7x922ab5a2f4c93648@mail.gmail.com>
Date: Mon, 7 Dec 2009 15:27:05 +0100
From: Frederic Weisbecker <fweisbec@...il.com>
To: Li Zefan <lizf@...fujitsu.com>
Cc: Ingo Molnar <mingo@...e.hu>, Steven Rostedt <rostedt@...dmis.org>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 01/13] tracing: Extract duplicate ftrace_raw_init_event_foo()
2009/12/7 Li Zefan <lizf@...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?
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).
Powered by blists - more mailing lists