Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751953AbbH1GV2 (ORCPT ); Fri, 28 Aug 2015 02:21:28 -0400 Received: from szxga03-in.huawei.com ([119.145.14.66]:47485 "EHLO szxga03-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751005AbbH1GV1 (ORCPT ); Fri, 28 Aug 2015 02:21:27 -0400 From: Wang Nan To: CC: , , , , , , , , , , , , , Wang Nan Subject: [PATCH 0/4] perf tools: Allow adding --filter to BPF object Date: Fri, 28 Aug 2015 06:20:17 +0000 Message-ID: <1440742821-44548-1-git-send-email-wangnan0@huawei.com> X-Mailer: git-send-email 1.8.3.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.107.193.248] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020202.55DFFDD3.0079,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: ad409c6bc6cdb055e5d3033e43655222 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1151 Lines: 31 This 4 patches will be appended into my next perf BPF pull request. Without them, current perf BPF implementation has a small problem that, if passing '--filter' after '--event test_bpf.o' event selection, the filter won't be correctly applied. Patch 1/4 append a new function to libbpf which allow fetching object name from bpf_object. Patch 2/4 add a safety check to avoid access invalid memory if the list is empty during event parsing. Patch 3/4 introduces a dummy evsel mechanism. Patch 4/4 utilizes dummy evsel mechanism, make BPF event collect filter options by dummy evsel and sync with them after real evsel generated. The 4th patch should be applied after patch 'perf tools: Add bpf_fd field to evsel and config it'. Patch 'perf tools: Enable passing bpf object file to --event' should also be modified to utilize dummy evsel. Please see my following pull request. Thank you. -- 1.8.3.4 -- 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/