Re: [PATCH 09/10][RFC] tracing: Remove duplicate id information inevent structure

From: Steven Rostedt
Date: Wed Apr 28 2010 - 20:04:20 EST


On Wed, 2010-04-28 at 17:06 -0400, Mathieu Desnoyers wrote:
> * Steven Rostedt (rostedt@xxxxxxxxxxx) wrote:
> > From: Steven Rostedt <srostedt@xxxxxxxxxx>
> >
> > Now that the trace_event structure is embedded in the ftrace_event_call
> > structure, there is no need for the ftrace_event_call id field.
> > The id field is the same as the trace_event type field.
> >
> > Removing the id and re-arranging the structure brings down the tracepoint
> > footprint by another 5K.
>
> I might have missed it, but how exactly is the event type allocated
> uniquely ? Is it barely a duplicate of the call "id" field ?

It is allocated in kernel/trace/trace_events.c.

The code there scans the "_ftrace_events" section to find all the events
that are created, and it assigns the events a unique id. Currently the
id is just copied from the trace_event field to the ftrace_event_call
data. The two are the same.

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