Re: [PATCH 0/2] perf_counter: add tracepoint support

From: Frederic Weisbecker
Date: Wed Jul 08 2009 - 23:10:44 EST


On Mon, Jul 06, 2009 at 05:11:53PM -0400, Jason Baron wrote:
>
> hi,
>
> The following two patches build on Peter's initial tracepoint perf counter work.
> The first patches enables the kernel side, and the second patch adds support to
> the 'perf' tool itself. The debugfs filesystem needs to be mounted to make this
> work and it is searched in the default location '/sys/kernel/debug'. We can
> add an optional parameter to search for it elsewhere if need be.
>
> Below, I show the output of 'perf list', and 'perf stat' for a tbench run.
>
[...]
> > perf stat -a -e sched:sched_switch -e sched:sched_wakeup -e irq:irq_handler_entry tbench 4
>
> Performance counter stats for 'tbench 4':
>
> 194658693 sched:sched_switch
> 97479295 sched:sched_wakeup
> 9122 irq:irq_handler_entry
>
> 720.171439729 seconds time elapsed
>


Cool, now the next stage that would be nice would be to have the
events themselves and not only the counts so that we can sort the
stats using values from the fields.

I have some ideas about that. We shouldn't interfere with ftrace job
and then use a private buffer for ftrace events used by perf.
But still this private buffer should be a private instance of the
ring buffer implemented in kernel/trace/, which is already well adapted for
the ftrace events (handles recursion).

(RFD parenthesis: why not using the one in kernel/trace for all perf events?
Now that it is lockless, it would fit nicely inside: no fear about NMI
context).

Anyway, unless you are already working on it, I'll try to adapt the content
of these events with perfcounter.

Thanks,
Frederic.


>
> -add kernel tracepoint support
> -add support for tracepoints to the perf tool
>
> init/Kconfig | 2 +-
> kernel/perf_counter.c | 6 +-
> tools/perf/util/parse-events.c | 195 +++++++++++++++++++++++++++++++++++++++-
> tools/perf/util/util.h | 2 +
> 4 files changed, 200 insertions(+), 5 deletions(-)
>

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