lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110609131732.GA21100@elte.hu>
Date:	Thu, 9 Jun 2011 15:17:32 +0200
From:	Ingo Molnar <mingo@...e.hu>
To:	Frederic Weisbecker <fweisbec@...il.com>
Cc:	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	LKML <linux-kernel@...r.kernel.org>,
	Borislav Petkov <bp@...en8.de>,
	Stephane Eranian <eranian@...gle.com>
Subject: Re: [GIT PULL] perf update


* Frederic Weisbecker <fweisbec@...il.com> wrote:

> On Thu, Jun 09, 2011 at 01:43:13PM +0200, Ingo Molnar wrote:
> > 
> > * Ingo Molnar <mingo@...e.hu> wrote:
> > 
> > > 
> > > * Peter Zijlstra <a.p.zijlstra@...llo.nl> wrote:
> > > 
> > > > On Tue, 2011-06-07 at 16:56 +0200, Frederic Weisbecker wrote:
> > > > 
> > > > > Frederic Weisbecker (1):
> > > > >       perf: Split up buffer handling from core code
> > > > > 
> > > > > 
> > > > >  kernel/events/Makefile   |    2 +-
> > > > >  kernel/events/buffer.c   |  400 ++++++++++++++++++++++++++++++++++++++++
> > > > >  kernel/events/core.c     |  458 ++--------------------------------------------
> > > > >  kernel/events/internal.h |   70 +++++++
> > > > >  4 files changed, 487 insertions(+), 443 deletions(-)
> > > > 
> > > > Looks about right.
> > > > 
> > > > Acked-by: Peter Zijlstra <a.p.zijlstra@...llo.nl>
> > > 
> > > thanks, i'll pull it it and test it.
> > 
> > Note, i ended up applying it by hand:
> > 
> >  - fixed a build error,
> > 
> >  - streamlined the renaming: we really want this to be ring_buffer.c 
> >    (most of the complexity comes from this not being a simple buffer 
> >    but a ring-buffer)
> > 
> >  - i streamlined the naming around it: struct ring_buffer 
> >    internalized via internal.h (it does not clash with ftrace's 
> >    ring-buffer)
> > 
> > It all looks and reads much nicer now, but please double check the 
> > commit as well :-)
> > 
> > One other rename i'd like to do is:
> > 
> >    struct perf_output_handle		=> struct rb_handle
> > 
> >    perf_output_begin()			=> rb_open()
> >    perf_output_copy()			=> rb_write()
> >    perf_output_sample()			=> rb_write_sample()
> >    perf_output_end()			=> rb_close()
> > 
> > Which really makes it a lot more apparent that it's a regular 
> > input/output flow defined over the ring-buffer!
> > 
> > I can do this if this is fine with everyone. There will be no change 
> > in functionality.
> 
> I feel more comfortable if we keep the perf_outpout_*() naming, having some
> global rb_* would pollute the global namespace.

Hm, using the rb_ prefix is not good due to the (conceptual) clash 
with rbtree.h primitives.

> perf_rb_* namespace would be fine as well.

How about:

    struct perf_output_handle		=> struct ring_buffer_handle
 
    perf_output_begin()			=> ring_buffer_open()
    perf_output_copy()			=> ring_buffer_write()
    perf_output_sample()		=> ring_buffer_write_sample()
    perf_output_end()			=> ring_buffer_close()

?

It doesn't clash with existing names.

Thanks,

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

Powered by Openwall GNU/*/Linux Powered by OpenVZ