From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964839AbbJVCDy (ORCPT ); Wed, 21 Oct 2015 22:03:54 -0400 Received: from szxga03-in.huawei.com ([119.145.14.66]:41729 "EHLO szxga03-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751478AbbJVCBA (ORCPT ); Wed, 21 Oct 2015 22:01:00 -0400 Message-ID: <5628423B.4010504@huawei.com> Date: Thu, 22 Oct 2015 09:56:11 +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: Peter Zijlstra , Alexei Starovoitov CC: xiakaixu , , , , , , , , , , Subject: Re: [PATCH V5 1/1] bpf: control events stored in PERF_EVENT_ARRAY maps trace data output when perf sampling 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> In-Reply-To: <56279634.5000606@huawei.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 X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A090201.5628424F.005E,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2013-05-26 15:14:31, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 9f9f962feadb3ce873b960582331ede0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@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.