Re: [RFC PATCH -v2 3/4] perf: Add persistent event facilities

Borislav Petkov
2012-12-09T12:06:09Z

On Thu, Aug 16, 2012 at 06:12:35PM -0400, Steven Rostedt wrote:
> On Thu, 2012-08-16 at 19:45 +0200, Borislav Petkov wrote:
> >
> > -static void ring_buffer_put(struct ring_buffer *rb)
> > +void ring_buffer_put(struct ring_buffer *rb)
> > {
> > struct perf_event *event, *n;
> > unsigned long flags;
>
> I have to say that it is really unfortunate that we have two ring
> buffers in the kernel, called struct ring_buffer. One being global and
> one being local to events. And now we are exporting the name
> "ring_buffer_*" too! This is going to confuse the hell out of people.
>
> Perhaps this should have been called perf_buffer, as that is what it's
> used for.

How about we prepend all non-static stuff which is part of the perf ring
buffer with "perf_" ?

This way we'll have perf_ring_buffer_put() and the namespace is still
short enough and tells you exactly which buffer we're talking about.

Hmm?

--
Regards/Gruss,
Boris.