[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Sat, 30 Jul 2016 11:34:49 +0800
From: "Wangnan (F)" <wangnan0@...wei.com>
To: Brendan Gregg <bgregg@...flix.com>,
Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...hat.com>,
Arnaldo Carvalho de Melo <acme@...nel.org>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>
CC: <linux-kernel@...r.kernel.org>, Alexei Starovoitov <ast@...nel.org>
Subject: Re: [PATCH] perf/core: Add a tracepoint for perf sampling
On 2016/7/30 2:05, Brendan Gregg wrote:
> On Tue, Jul 19, 2016 at 4:20 PM, Brendan Gregg <bgregg@...flix.com> wrote:
>> When perf is performing hrtimer-based sampling, this tracepoint can be used
>> by BPF to run additional logic on each sample. For example, BPF can fetch
>> stack traces and frequency count them in kernel context, for an efficient
>> profiler.
> Any comments on this patch? Thanks,
>
> Brendan
Sorry for the late.
I think it is a useful feature. Could you please provide an example
to show how to use it in perf?
If I understand correctly, I can have a BPF script run 99 times per
second using
# perf -e cpu-clock/freq=99/ -e mybpf.c ...
And in mybpf.c, attach a BPF script on the new tracepoint. Right?
Also, since we already have timer:hrtimer_expire_entry, please provide
some further information about why we need a new tracepoint.
Thank you.
Powered by blists - more mailing lists