Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1452650

Re: [PATCH] perf/core: Add a tracepoint for perf sampling

From "Wangnan (F)" <wangnan0@huawei.com>
Newsgroups linux.kernel
Subject Re: [PATCH] perf/core: Add a tracepoint for perf sampling
Date 2016-07-30 05:50 +0200
Message-ID <s0trH-5zQ-3@gated-at.bofh.it> (permalink)
References <rWMCC-1Wj-15@gated-at.bofh.it> <s0kop-8aN-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw



On 2016/7/30 2:05, Brendan Gregg wrote:
> On Tue, Jul 19, 2016 at 4:20 PM, Brendan Gregg <bgregg@netflix.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.

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [PATCH] perf/core: Add a tracepoint for perf sampling Brendan Gregg <bgregg@netflix.com> - 2016-07-29 20:10 +0200
  Re: [PATCH] perf/core: Add a tracepoint for perf sampling "Wangnan (F)" <wangnan0@huawei.com> - 2016-07-30 05:50 +0200
    Re: [PATCH] perf/core: Add a tracepoint for perf sampling Brendan Gregg <bgregg@netflix.com> - 2016-08-03 05:00 +0200

csiph-web