[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5df78e1d0904142040v3a46ce24m77a4fcea84f92027@mail.gmail.com>
Date: Tue, 14 Apr 2009 20:40:02 -0700
From: Jiaying Zhang <jiayingz@...gle.com>
To: Steven Rostedt <rostedt@...dmis.org>
Cc: Peter Zijlstra <peterz@...radead.org>,
linux-kernel@...r.kernel.org, Ingo Molnar <mingo@...e.hu>,
Andrew Morton <akpm@...ux-foundation.org>,
Thomas Gleixner <tglx@...utronix.de>,
Frederic Weisbecker <fweisbec@...il.com>,
Theodore Tso <tytso@....edu>,
Arjan van de Ven <arjan@...radead.org>,
Christoph Hellwig <hch@....de>,
Mathieu Desnoyers <compudj@...stal.dyndns.org>,
Jeremy Fitzhardinge <jeremy@...p.org>,
Lai Jiangshan <laijs@...fujitsu.com>,
Zhaolei <zhaolei@...fujitsu.com>, Li Zefan <lizf@...fujitsu.com>,
KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>,
Masami Hiramatsu <mhiramat@...hat.com>,
"Frank Ch. Eigler" <fche@...stic.org>,
Tom Zanussi <tzanussi@...il.com>,
Michael Rubin <mrubin@...gle.com>,
Martin Bligh <mbligh@...gle.com>
Subject: Re: [PATCH 5/8] tracing/events: move the ftrace event tracing code to
core
I think merging these structures together can also allow you to move
certain parts of code to the general functions in kernel/trace/trace_events.c
so you don't need to define those functions for individual events.
Jiaying
On Tue, Apr 14, 2009 at 7:25 PM, Steven Rostedt <rostedt@...dmis.org> wrote:
>
> On Tue, 14 Apr 2009, Peter Zijlstra wrote:
>
>> On Tue, 2009-04-14 at 13:23 -0400, Steven Rostedt wrote:
>> > + * static struct trace_event ftrace_event_type_<call> = {
>> > + * .trace = ftrace_raw_output_<call>, <-- stage 2
>> > + * };
>>
>> > + * static struct ftrace_event_call __used
>> > + * __attribute__((__aligned__(4)))
>> > + * __attribute__((section("_ftrace_events"))) event_<call> = {
>> > + * .name = "<call>",
>> > + * .system = "<system>",
>> > + * .raw_init = ftrace_raw_init_event_<call>,
>> > + * .regfunc = ftrace_reg_event_<call>,
>> > + * .unregfunc = ftrace_unreg_event_<call>,
>> > + * .show_format = ftrace_format_<call>,
>> > + * }
>>
>> Is there a good reason these are two different structs?
>>
>> I've always wondered about that, it seems natural to unify them and to
>> generalize the reverse lookup hash that is now private to trace_output.
>>
>> The trace_event_profile code could use that reverse lookup, that linear
>> search it currently does it really lame.
>
> Hmm, I'll have to look at that. Of course that means touching these crazy
> macros again ;-)
>
> -- Steve
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists