Re: [PATCH 2/4] tracing: add ring_buffer_event_discard() to ringbuffer
From: Steven Rostedt
Date: Mon Mar 23 2009 - 14:54:35 EST
On Sun, 22 Mar 2009, Frederic Weisbecker wrote:
> >
> > -/* inline for ring buffer fast paths */
[...]
> > static unsigned
> > -rb_event_length(struct ring_buffer_event *event)
> > +rb_event_data_length(struct ring_buffer_event *event)
> > {
> > unsigned length;
> >
> > + if (event->len)
> > + length = event->len * RB_ALIGNMENT;
> > + else
> > + length = event->array[0];
> > + return length + RB_EVNT_HDR_SIZE;
> > +}
> > +
> > +/* inline for ring buffer fast paths */
>
>
> I don't see an inline here.
That was my comment. I use to have a bunch of inlines, but someone thought
gcc could do better and took them all out. The comment needs to be
removed.
-- Steve
>
>
> > +static unsigned
> > +rb_event_length(struct ring_buffer_event *event)
> > +{
> > switch (event->type) {
> > case RINGBUF_TYPE_PADDING:
> > - /* undefined */
> > - return -1;
> > + if (rb_null_event(event))
> > + /* undefined */
> > + return -1;
> > + return rb_event_data_length(event);
> >
> > case RINGBUF_TYPE_TIME_EXTEND:
--
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/