From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Wangnan (F)" Subject: Re: [PATCH V5 1/1] bpf: control events stored in PERF_EVENT_ARRAY maps trace data output when perf sampling Date: Thu, 22 Oct 2015 09:56:11 +0800 Message-ID: <5628423B.4010504@huawei.com> References: <1445325735-121694-1-git-send-email-xiakaixu@huawei.com> <1445325735-121694-2-git-send-email-xiakaixu@huawei.com> <5626C5CE.8080809@plumgrid.com> <20151021091254.GF2881@worktop.programming.kicks-ass.net> <56276968.6070604@huawei.com> <20151021113316.GM17308@twins.programming.kicks-ass.net> <56277BCE.6030400@huawei.com> <20151021121713.GC3604@twins.programming.kicks-ass.net> <56279634.5000606@huawei.com> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit Cc: xiakaixu , , , , , , , , , , To: Peter Zijlstra , Alexei Starovoitov Return-path: In-Reply-To: <56279634.5000606@huawei.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: netdev.vger.kernel.org Hi Alexei, On 2015/10/21 21:42, Wangnan (F) wrote: > > > One alternative solution I can image is to attach a BPF program > at sampling like kprobe, and return 0 if we don't want sampling > take action. Thought? Do you think attaching BPF programs to sampling is an acceptable idea? Thank you. > Actually speaking I don't like it very much > because the principle of soft-disable is much simpler and safe, but > if you really like it I think we can try.