Message ID | 1441523623-152703-1-git-send-email-wangnan0@huawei.com |
---|---|
State | New |
Headers | show
Return-Path: <patchwork-forward+bncBD2YXXXCQEBBBQGQV6XQKGQENZ4EVRI@linaro.org> X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f200.google.com (mail-lb0-f200.google.com [209.85.217.200]) by patches.linaro.org (Postfix) with ESMTPS id C930822B05 for <linaro@patches.linaro.org>; Sun, 6 Sep 2015 07:16:17 +0000 (UTC) Received: by lbbmp1 with SMTP id mp1sf17386682lbb.2 for <linaro@patches.linaro.org>; Sun, 06 Sep 2015 00:16:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:cc:subject:date:message-id :mime-version:content-type:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=rpmFqIs39pX8oHXfs77k5j5wi3+hb9pZDtsjVz8FKgM=; b=Yva56mISNxs2mhCIqgQIIxzLiEB1NddQ12FhrhTIB1V5i5L4B5y4MpAiI/bBSBULJr 49eGOcmFnZunGDOJFwI7Z+pLOPzN7cUQ+5bDegarhemMcT4UKtqxIjdBfe6+S+7+thuE 6hnH1dTEdf5rbqU6csFPShLpnbiJ6FIyd/rDS5Gt77jNHjJ7+WV78Y+QNTqbuMpV2bns Y6Xryc00/P8+QrPrndCnw4SyCZyFuIAy63yg5Wih9Ch5U69SzkxotGIFnLcPGPLx/ERC xpOtiq14d5gbgrZwljbJoa46BFoaloNnRZiYuRI5/Dn9knnZfTGpunEcMtK1fcRr4+tI hJpg== X-Gm-Message-State: ALoCoQlocNWxgrCJDG21blJb26E1ZS/BqhD3g9J/kWb+wM9i9lYKsaDiT8AtG11TlaKzgKAMk2wj X-Received: by 10.195.18.100 with SMTP id gl4mr3334497wjd.4.1441523776792; Sun, 06 Sep 2015 00:16:16 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.120.164 with SMTP id ld4ls489696lab.62.gmail; Sun, 06 Sep 2015 00:16:16 -0700 (PDT) X-Received: by 10.152.6.73 with SMTP id y9mr11620306lay.45.1441523776467; Sun, 06 Sep 2015 00:16:16 -0700 (PDT) Received: from mail-la0-f50.google.com (mail-la0-f50.google.com. [209.85.215.50]) by mx.google.com with ESMTPS id ap7si7203688lac.178.2015.09.06.00.16.16 for <patchwork-forward@linaro.org> (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 06 Sep 2015 00:16:16 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.50 as permitted sender) client-ip=209.85.215.50; Received: by lamp12 with SMTP id p12so34687084lam.0 for <patchwork-forward@linaro.org>; Sun, 06 Sep 2015 00:16:16 -0700 (PDT) X-Received: by 10.112.131.98 with SMTP id ol2mr11898729lbb.56.1441523776355; Sun, 06 Sep 2015 00:16:16 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.164.42 with SMTP id yn10csp843758lbb; Sun, 6 Sep 2015 00:16:15 -0700 (PDT) X-Received: by 10.66.163.161 with SMTP id yj1mr30403231pab.34.1441523774812; Sun, 06 Sep 2015 00:16:14 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ya7si2879962pab.157.2015.09.06.00.16.13; Sun, 06 Sep 2015 00:16:14 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752559AbbIFHQG (ORCPT <rfc822;matthew.hart@linaro.org> + 28 others); Sun, 6 Sep 2015 03:16:06 -0400 Received: from szxga01-in.huawei.com ([58.251.152.64]:7310 "EHLO szxga01-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751299AbbIFHOm (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sun, 6 Sep 2015 03:14:42 -0400 Received: from 172.24.1.48 (EHLO SZXEML423-HUB.china.huawei.com) ([172.24.1.48]) by szxrg01-dlp.huawei.com (MOS 4.3.7-GA FastPath queued) with ESMTP id CUK94002; Sun, 06 Sep 2015 15:14:00 +0800 (CST) Received: from linux-4hy3.site (10.107.193.248) by SZXEML423-HUB.china.huawei.com (10.82.67.154) with Microsoft SMTP Server id 14.3.235.1; Sun, 6 Sep 2015 15:13:53 +0800 From: Wang Nan <wangnan0@huawei.com> To: <acme@redhat.com>, <ast@plumgrid.com>, <masami.hiramatsu.pt@hitachi.com>, <namhyung@kernel.org> CC: <a.p.zijlstra@chello.nl>, <brendan.d.gregg@gmail.com>, <daniel@iogearbox.net>, <dsahern@gmail.com>, <hekuang@huawei.com>, <jolsa@kernel.org>, <lizefan@huawei.com>, <paulus@samba.org>, <wangnan0@huawei.com>, <xiakaixu@huawei.com>, <pi3orama@163.com>, <linux-kernel@vger.kernel.org> Subject: [GIT PULL 00/27] perf tools: filtering events using eBPF programs Date: Sun, 6 Sep 2015 07:13:16 +0000 Message-ID: <1441523623-152703-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 Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: <patchwork-forward.linaro.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: wangnan0@huawei.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.50 as permitted sender) smtp.mailfrom=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: <http://groups.google.com/a/linaro.org/group/patchwork-forward/post>, <mailto:patchwork-forward@linaro.org> List-Help: <http://support.google.com/a/linaro.org/bin/topic.py?topic=25838>, <mailto:patchwork-forward+help@linaro.org> List-Archive: <http://groups.google.com/a/linaro.org/group/patchwork-forward/> List-Unsubscribe: <mailto:googlegroups-manage+836684582541+unsubscribe@googlegroups.com>, <http://groups.google.com/a/linaro.org/group/patchwork-forward/subscribe> |
(I forget to CC mailing list when sending previous pull req. Sorry for the noisy.) Hi Arnaldo, I rebased my code on your perf/core and send a new pull request. You can find main changes in the tag message. The most biggest changes are the resesigning of dummy placeholder and the new testcase for BPF prologue. They are patch 10, patch 11, patch 26 and patch 27. Please have a look at them. The following changes since commit 0959e527b1593e662cb99639a587eac39ea1232d: perf stat: Move sw clock metrics printout to stat-shadow (2015-09-04 20:30:01 -0300) are available in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/pi3orama/linux tags/perf-ebpf-for-acme for you to fetch changes up to 3af1c7f44478d1545f202bd0054e767d3f0f8130: perf test: Test BPF prologue (2015-09-06 06:10:12 +0000) ---------------------------------------------------------------- BPF related bugfix and improve 1. Enforce the assumption that event parser never return empty list. 2. Reuse code and API from kernel's regs_query_register_offset(). 3. Totally redesign dummy placeholder. Reuse existing dummy event instead of creating a new one. 4. Introduce new testcases, test LLVM kbuild searching and BPF prologue. 5. Adding a missing '!' in add_perf_probe_events. 6. Use new API ({convert,apply,cleanup}_perf_probe_events) to probe events. (while fix a bug that non-root user can't trace non-BPF events, like cycles) Signed-off-by: Wang Nan <wangnan0@huawei.com> ---------------------------------------------------------------- He Kuang (2): perf tools: Add prologue for BPF programs for fetching arguments perf record: Support custom vmlinux path Wang Nan (25): perf tools: Don't write to evsel if parser doesn't collect evsel perf tools: Make perf depend on libbpf perf ebpf: Add the libbpf glue perf tools: Enable passing bpf object file to --event perf record, bpf: Parse and create probe points for BPF programs perf bpf: Collect 'struct perf_probe_event' for bpf_program perf record: Load all eBPF object into kernel perf tools: Add bpf_fd field to evsel and config it perf tools: Attach eBPF program to perf event perf tools: Allow BPF placeholder dummy events to collect --filter options perf tools: Sync setting of real bpf events with placeholder perf record: Add clang options for compiling BPF scripts perf tools: Compile scriptlets to BPF objects when passing '.c' to --event perf test: Enforce LLVM test for BPF test perf test: Add 'perf test BPF' bpf tools: Load a program with different instances using preprocessor perf probe: Reset args and nargs for probe_trace_event when failure perf tools: Add BPF_PROLOGUE config options for further patches perf tools: Introduce regs_query_register_offset() for x86 perf tools: Generate prologue for BPF programs perf tools: Use same BPF program if arguments are identical perf probe: Init symbol as kprobe perf tools: Allow BPF program attach to uprobe events perf test: Enforce LLVM test, add kbuild test perf test: Test BPF prologue tools/build/Makefile.feature | 6 +- tools/lib/bpf/libbpf.c | 143 +++++- tools/lib/bpf/libbpf.h | 22 + tools/perf/MANIFEST | 3 + tools/perf/Makefile.perf | 19 +- tools/perf/arch/x86/Makefile | 1 + tools/perf/arch/x86/util/Build | 1 + tools/perf/arch/x86/util/dwarf-regs.c | 122 +++-- tools/perf/builtin-record.c | 58 ++- tools/perf/builtin-stat.c | 8 +- tools/perf/builtin-top.c | 10 +- tools/perf/builtin-trace.c | 6 +- tools/perf/config/Makefile | 36 +- tools/perf/tests/Build | 24 +- tools/perf/tests/bpf-script-example.c | 48 ++ tools/perf/tests/bpf-script-test-kbuild.c | 21 + tools/perf/tests/bpf-script-test-prologue.c | 35 ++ tools/perf/tests/bpf.c | 229 +++++++++ tools/perf/tests/builtin-test.c | 12 + tools/perf/tests/llvm.c | 210 +++++++- tools/perf/tests/llvm.h | 29 ++ tools/perf/tests/make | 4 +- tools/perf/tests/tests.h | 3 + tools/perf/util/Build | 2 + tools/perf/util/bpf-loader.c | 756 ++++++++++++++++++++++++++++ tools/perf/util/bpf-loader.h | 94 ++++ tools/perf/util/bpf-prologue.c | 443 ++++++++++++++++ tools/perf/util/bpf-prologue.h | 34 ++ tools/perf/util/evlist.c | 115 +++++ tools/perf/util/evlist.h | 1 + tools/perf/util/evsel.c | 49 ++ tools/perf/util/evsel.h | 24 + tools/perf/util/include/dwarf-regs.h | 8 + tools/perf/util/parse-events.c | 82 ++- tools/perf/util/parse-events.h | 4 + tools/perf/util/parse-events.l | 6 + tools/perf/util/parse-events.y | 29 +- tools/perf/util/probe-event.c | 2 +- tools/perf/util/probe-finder.c | 4 + 39 files changed, 2618 insertions(+), 85 deletions(-) create mode 100644 tools/perf/tests/bpf-script-example.c create mode 100644 tools/perf/tests/bpf-script-test-kbuild.c create mode 100644 tools/perf/tests/bpf-script-test-prologue.c create mode 100644 tools/perf/tests/bpf.c create mode 100644 tools/perf/tests/llvm.h create mode 100644 tools/perf/util/bpf-loader.c create mode 100644 tools/perf/util/bpf-loader.h create mode 100644 tools/perf/util/bpf-prologue.c create mode 100644 tools/perf/util/bpf-prologue.h