Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752170AbbH2CQb (ORCPT ); Fri, 28 Aug 2015 22:16:31 -0400 Received: from szxga02-in.huawei.com ([119.145.14.65]:19420 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751559AbbH2CQ3 (ORCPT ); Fri, 28 Aug 2015 22:16:29 -0400 Message-ID: <55E115BD.6090909@huawei.com> Date: Sat, 29 Aug 2015 10:15:25 +0800 From: "Wangnan (F)" User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Alexei Starovoitov , CC: , , , , , , , , , , , , Arnaldo Carvalho de Melo , Ingo Molnar , Steven Rostedt Subject: Re: [PATCH 32/32] bpf: Introduce function for outputing data to perf event References: <1440745570-150857-1-git-send-email-wangnan0@huawei.com> <1440745570-150857-33-git-send-email-wangnan0@huawei.com> <55E10091.6020107@plumgrid.com> <55E108BC.4050107@huawei.com> <55E10C2D.5090300@plumgrid.com> In-Reply-To: <55E10C2D.5090300@plumgrid.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.111.66.109] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1633 Lines: 46 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 special receiver in user space that only wants the data from > the bpf program that it loaded. It shouldn't conflict with any other > processes. Like when it's running, I still should be able to use perf > for other performance analysis. There is no way to share single > bpf:bpf_output_data event, since these user processes are completely > independent. > I'd like to see whether it is possible to create dynamic tracepoints so different receivers can listen on different tracepoints. For my side, maybe I can encode format information into the new tracepoints so don't need those LLVM patches. For example: # echo 'dynamic_tracepoint:mytracepoint ' >> /sys/kernel/debug/tracing/dynamic_trace_events # perf list ... dynamic_tracepoint:mytracepoint ... In perf side we can encode the creation of dynamic tracepoint into bpf-loader like what we currectly do for probing the kprobes. This way reqires us to create a fresh new event source, in parallel with tracepoint. I'm not sure how much work it needs. What do you think? Thank you. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/