From: "Wangnan (F)" <wangnan0@huawei.com>
To: Brendan Gregg <bgregg@netflix.com>,
Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>,
Arnaldo Carvalho de Melo <acme@kernel.org>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: <linux-kernel@vger.kernel.org>, Alexei Starovoitov <ast@kernel.org>
Subject: Re: [PATCH] perf/core: Add a tracepoint for perf sampling
Date: Sat, 30 Jul 2016 11:34:49 +0800 [thread overview]
Message-ID: <579C2059.9@huawei.com> (raw)
In-Reply-To: <CAJN39oibpBU9rZpAX2KJp2bNDj-gdrOMU+4xG14iuab5aPG-xg@mail.gmail.com>
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.
next prev parent reply other threads:[~2016-07-30 3:42 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-19 23:20 [PATCH] perf/core: Add a tracepoint for perf sampling Brendan Gregg
2016-07-29 18:05 ` Brendan Gregg
2016-07-30 3:34 ` Wangnan (F) [this message]
2016-08-03 2:44 ` Brendan Gregg
2016-07-29 19:21 ` Arnaldo Carvalho de Melo
2016-07-29 19:55 ` Brendan Gregg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=579C2059.9@huawei.com \
--to=wangnan0@huawei.com \
--cc=acme@kernel.org \
--cc=alexander.shishkin@linux.intel.com \
--cc=ast@kernel.org \
--cc=bgregg@netflix.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.