From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752092AbbJTCf4 (ORCPT ); Mon, 19 Oct 2015 22:35:56 -0400 Received: from szxga03-in.huawei.com ([119.145.14.66]:30943 "EHLO szxga03-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750893AbbJTCfy (ORCPT ); Mon, 19 Oct 2015 22:35:54 -0400 Message-ID: <5625A86D.6050102@huawei.com> Date: Tue, 20 Oct 2015 10:35:25 +0800 From: xiakaixu User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:17.0) Gecko/20130801 Thunderbird/17.0.8 MIME-Version: 1.0 To: Alexei Starovoitov CC: , , , , , , , , , , , Subject: Re: [PATCH V4 1/1] bpf: control events stored in PERF_EVENT_ARRAY maps trace data output when perf sampling References: <1445251060-114617-1-git-send-email-xiakaixu@huawei.com> <1445251060-114617-2-git-send-email-xiakaixu@huawei.com> <5625A36D.8070200@plumgrid.com> In-Reply-To: <5625A36D.8070200@plumgrid.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Originating-IP: [10.111.101.23] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020206.5625A882.00DF,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: ad33e95b51eddfcf96dc988ddb87b519 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 于 2015/10/20 10:14, Alexei Starovoitov 写道: > On 10/19/15 3:37 AM, Kaixu Xia wrote: >> +/* flags for PERF_EVENT_ARRAY maps*/ >> +enum { >> + BPF_EVENT_CTL_BIT_CUR = 0, >> + BPF_EVENT_CTL_BIT_ALL = 1, >> + __NR_BPF_EVENT_CTL_BITS, >> +}; >> + >> +#define BPF_CTL_BIT_FLAG_MASK \ >> + ((1ULL << __NR_BPF_EVENT_CTL_BITS) - 1) >> +#define BPF_CTL_BIT_DUMP_CUR \ >> + (1ULL << BPF_EVENT_CTL_BIT_CUR) >> +#define BPF_CTL_BIT_DUMP_ALL \ >> + (1ULL << BPF_EVENT_CTL_BIT_ALL) >> + > > the above shouldn't be part of uapi header. It can stay in bpf_trace.c > Just document these bits next to helper similar to skb_store_bytes() > > The rest looks ok. > It still needs an ack from Peter for perf_event bits Thanks for your comments! This part will be moved to bpf_trace.c in next version. > > > . >