perf update
Ingo,
Please pull the perf/core branch that can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/frederic/random-tracing.git
perf/core
Thanks,
Frederic
---
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(-)
---
commit f428cfd78b30c807285e44bd9b134220772046ad
Author: Frederic Weisbecker <[email protected]> Date: Thu May 19 19:55:04 2011 +0200
perf: Split up buffer handling from core code
And create the internal perf events header.
v2: Keep an internal inlined perf_output_copy()
kernel/events/Makefile +1 -1
@@ -2,5 +2,5 @@ ifdef CONFIG_FUNCTION_TRACER CFLAGS_REMOVE_core.o = -pg endif -obj-y := core.o +obj-y := core.o buffer.o obj-$(CONFIG_HAVE_HW_BREAKPOINT) += hw_breakpoint.o
kernel/events/buffer.c new file +400 -0
400 lines not on this page · raw message
kernel/events/core.c +16 -442
535 lines not on this page · raw message
kernel/events/internal.h new file +70 -0
70 lines not on this page · raw message
Peter Zijlstra
Acked-byQuoted 9 lines · Frederic Weisbecker
Frederic Weisbecker (1):
perf: Split up buffer handling from core codekernel/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.
Quoted 12 lines · Peter Zijlstra
Quoted 9 lines · Frederic Weisbecker
Frederic Weisbecker (1):
perf: Split up buffer handling from core codekernel/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(-)
Quoted 3 lines
Looks about right.
Acked-by Peter Zijlstra <[email protected]>
thanks, i'll pull it it and test it.
Ingo
Quoted 15 lines · Ingo Molnar
Quoted 12 lines · Peter Zijlstra
Quoted 9 lines · Frederic Weisbecker
Frederic Weisbecker (1):
perf: Split up buffer handling from core codekernel/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(-)
Quoted 5 lines
Quoted 3 lines
Looks about right.
Acked-by Peter Zijlstra <[email protected]>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.
Thanks,
Ingo
Quoted 48 lines · Ingo Molnar
Quoted 15 lines · Ingo Molnar
Quoted 12 lines · Peter Zijlstra
Quoted 9 lines · Frederic Weisbecker
Frederic Weisbecker (1):
perf: Split up buffer handling from core codekernel/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(-)Quoted 5 lines
Quoted 3 lines
Looks about right.
Acked-by Peter Zijlstra <[email protected]>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_bufferinternalized viainternal.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()
Quoted 5 lines
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.
perf_rb_* namespace would be fine as well.
Thanks.
Quoted 4 lines
Thanks,
Ingo
Quoted 49 lines · Frederic Weisbecker
Quoted 48 lines · Ingo Molnar
Quoted 15 lines · Ingo Molnar
Quoted 12 lines · Peter Zijlstra
Quoted 9 lines · Frederic Weisbecker
Frederic Weisbecker (1):
perf: Split up buffer handling from core codekernel/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(-)Quoted 5 lines
Quoted 3 lines
Looks about right.
Acked-by Peter Zijlstra <[email protected]>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_bufferinternalized viainternal.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()
Quoted 8 lines
Quoted 5 lines
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.
Quoted 1 line
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
Quoted 44 lines · Ingo Molnar
Quoted 21 lines
Quoted 21 lines
- 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_bufferinternalized viainternal.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()Quoted 8 lines
Quoted 5 lines
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 withrbtree.hprimitives.Quoted 1 line
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()
Quoted 3 lines
?
It doesn't clash with existing names.
For the same reasons I don't like the rename you did of the perf buffer into struct ring_buffer, I think we shouldn't do this.
This is a generic naming that belongs to some very universal datatype. There is no good reason to find that generic concept naming exported from a subsystem that is not a generic implementation of that datatype.
And it's not because it doesn't yet clash with existing names that it's a good choice.
Why not "struct perf_ring_buffer" ? And then perf_ring_buffer_begin()? or perf_rb_begin() if it's too long.
Quoted 4 lines
Thanks,
Ingo