Re: [PATCH 32/32] bpf: Introduce function for outputing data to perf event

2015-08-28 Thread Wangnan (F)
On 2015/8/29 10:49, Alexei Starovoitov wrote: On 8/28/15 7:36 PM, Wangnan (F) wrote: For current patch 32/32, I think it is useful enough for some simple cases, and we have already start using it internally. What about keep it as what it is now and create a independent method for your usecase

Re: [PATCH 32/32] bpf: Introduce function for outputing data to perf event

2015-08-28 Thread Alexei Starovoitov
On 8/28/15 7:36 PM, Wangnan (F) wrote: For current patch 32/32, I think it is useful enough for some simple cases, and we have already start using it internally. What about keep it as what it is now and create a independent method for your usecase? well, though the patch is small and contained,

Re: [PATCH 32/32] bpf: Introduce function for outputing data to perf event

2015-08-28 Thread Wangnan (F)
On 2015/8/29 10:22, Alexei Starovoitov wrote: On 8/28/15 7:15 PM, Wangnan (F) wrote: I'd like to see whether it is possible to create dynamic tracepoints so different receivers can listen on different tracepoints. see my proposal A. I think ftrace instances might work for this. I'm not sure

Re: [PATCH 32/32] bpf: Introduce function for outputing data to perf event

2015-08-28 Thread Alexei Starovoitov
On 8/28/15 7:15 PM, Wangnan (F) wrote: I'd like to see whether it is possible to create dynamic tracepoints so different receivers can listen on different tracepoints. see my proposal A. I think ftrace instances might work for this. I'm not sure about 'format' part though. Kernel side shouldn'

Re: [PATCH 32/32] bpf: Introduce function for outputing data to perf event

2015-08-28 Thread Wangnan (F)
On 2015/8/29 9:34, Alexei Starovoitov wrote: On 8/28/15 6:19 PM, Wangnan (F) wrote: For me, I use bpf_output_trace_data() to output information like PMU count value. Perf is the only receiver, so global collector is perfect. Could you please describe your usecase in more detail? there is a

Re: [PATCH 32/32] bpf: Introduce function for outputing data to perf event

2015-08-28 Thread Alexei Starovoitov
On 8/28/15 6:19 PM, Wangnan (F) wrote: For me, I use bpf_output_trace_data() to output information like PMU count value. Perf is the only receiver, so global collector is perfect. Could you please describe your usecase in more detail? there is a special receiver in user space that only wants th

Re: [PATCH 32/32] bpf: Introduce function for outputing data to perf event

2015-08-28 Thread Wangnan (F)
On 2015/8/29 8:45, Alexei Starovoitov wrote: On 8/28/15 12:06 AM, Wang Nan wrote: his patch adds a new trace event to establish infrastruction for bpf to output data to perf. Userspace perf tools can detect and use this event as using the existing tracepoint events. New bpf trace event entry

Re: [PATCH 32/32] bpf: Introduce function for outputing data to perf event

2015-08-28 Thread Alexei Starovoitov
On 8/28/15 12:06 AM, Wang Nan wrote: his patch adds a new trace event to establish infrastruction for bpf to output data to perf. Userspace perf tools can detect and use this event as using the existing tracepoint events. New bpf trace event entry in debugfs: /sys/kernel/debug/tracing/eve

[PATCH 32/32] bpf: Introduce function for outputing data to perf event

2015-08-28 Thread Wang Nan
From: He Kuang There're scenarios that we need an eBPF program to record not only kprobe point args, but also the PMU counters, time latencies or the number of cache misses between two probe points and other information when the probe point is entered. This patch adds a new trace event to establ