All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexei Starovoitov <ast@plumgrid.com>
To: Kaixu Xia <xiakaixu@huawei.com>,
	davem@davemloft.net, daniel@iogearbox.net, acme@kernel.org,
	mingo@redhat.com, a.p.zijlstra@chello.nl,
	masami.hiramatsu.pt@hitachi.com, jolsa@kernel.org
Cc: linux-kernel@vger.kernel.org, wangnan0@huawei.com, pi3orama@163.com
Subject: Re: [RFC PATCH 0/4] perf tools: Use the new ability of eBPF programs to access hardware PMU counter
Date: Fri, 28 Aug 2015 18:28:33 -0700	[thread overview]
Message-ID: <55E10AC1.1000706@plumgrid.com> (raw)
In-Reply-To: <1440672142-89311-1-git-send-email-xiakaixu@huawei.com>

On 8/27/15 3:42 AM, Kaixu Xia wrote:
> An example is pasted at the bottom of this cover letter. In that example,
> we can get the cpu_cycles and exception taken in sys_write.
>
>   $ cat /sys/kernel/debug/tracing/trace_pipe
>   $ ./perf record --event perf-bpf.o ls
> 	...
>               cat-1653  [003] d..1 88174.613854: : ente:  CPU-3	cyc:48746333	exc:84
>               cat-1653  [003] d..2 88174.613861: : exit:  CPU-3	cyc:48756041	exc:84

nice. probably more complex example that computes the delta of the pmu
counters on the kernel side would be even more interesting.
Do you think you can extend 'perf stat' with a flag that does
stats collection for a given kernel or user function instead of the
whole process ?
Then we can use perf record/report to figure out hot functions and
follow with 'perf stat -f my_hot_func my_process' to drill into
particular function stats.


  parent reply	other threads:[~2015-08-29  1:28 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-27 10:42 [RFC PATCH 0/4] perf tools: Use the new ability of eBPF programs to access hardware PMU counter Kaixu Xia
2015-08-27 10:42 ` [RFC PATCH 1/4] bpf tools: Add bpf_update_elem() and perf_event_open() for common bpf operations Kaixu Xia
2015-08-27 10:42 ` [RFC PATCH 2/4] bpf tools: Collect BPF_MAP_TYPE_PERF_EVENT_ARRAY map definitions from 'maps' section Kaixu Xia
2015-08-27 10:42 ` [RFC PATCH 3/4] bpf tools: Save the perf event fds from "maps" sections to 'struct bpf_object' Kaixu Xia
2015-08-27 10:42 ` [RFC PATCH 4/4] bpf tools: Enable/disable the perf events stored in " Kaixu Xia
2015-08-29  1:28 ` Alexei Starovoitov [this message]
2015-08-29  2:14   ` [RFC PATCH 0/4] perf tools: Use the new ability of eBPF programs to access hardware PMU counter xiakaixu
2015-08-29  2:42     ` Alexei Starovoitov

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=55E10AC1.1000706@plumgrid.com \
    --to=ast@plumgrid.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masami.hiramatsu.pt@hitachi.com \
    --cc=mingo@redhat.com \
    --cc=pi3orama@163.com \
    --cc=wangnan0@huawei.com \
    --cc=xiakaixu@huawei.com \
    /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.