Re: [RFC PATCH 0/4] perf tools: Use the new ability of eBPF programs to access hardware PMU counter

2015-08-28 Thread Alexei Starovoitov
On 8/28/15 7:14 PM, xiakaixu wrote: Right, this is just a little example. Actually, I have tested this ability on kernel side and user space side, that is kprobe and uprobe. great to hear. At this time i wish to get your comment on the current chosen implementation. Now the struct perf_event_

Re: [RFC PATCH 0/4] perf tools: Use the new ability of eBPF programs to access hardware PMU counter

2015-08-28 Thread xiakaixu
于 2015/8/29 9:28, Alexei Starovoitov 写道: > 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

Re: [RFC PATCH 0/4] perf tools: Use the new ability of eBPF programs to access hardware PMU counter

2015-08-28 Thread Alexei Starovoitov
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

[RFC PATCH 0/4] perf tools: Use the new ability of eBPF programs to access hardware PMU counter

2015-08-27 Thread Kaixu Xia
According to the discussions on this subject https://lkml.org/lkml/2015/5/27/1027, we want to give eBPF programs the ability to access hardware PMU counter and use this ability with perf. Now the kernel side patch set 'bpf: Introduce the new ability of eBPF programs to access hardware PMU counter